Use inline navigationBarTitleDisplayMode with transparent appearance

This commit is contained in:
Angelo Stavrow 2020-09-21 16:15:16 -04:00
parent 65edd393d3
commit 9de53d828f
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE
4 changed files with 27 additions and 2 deletions

View File

@ -55,6 +55,7 @@ struct PostEditorView: View {
}
}
}
.navigationBarTitleDisplayMode(.inline)
.padding()
.toolbar {
ToolbarItem(placement: .principal) {

View File

@ -44,6 +44,7 @@
1756DC0424FEE18400207AB8 /* WFACollection+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1756DC0024FEE18400207AB8 /* WFACollection+CoreDataProperties.swift */; };
1765F62A24E18EA200C9EBF0 /* SidebarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1765F62924E18EA200C9EBF0 /* SidebarView.swift */; };
1765F62B24E18EA200C9EBF0 /* SidebarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1765F62924E18EA200C9EBF0 /* SidebarView.swift */; };
17681E412519410E00D394AE /* UINavigationController+Appearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17681E402519410E00D394AE /* UINavigationController+Appearance.swift */; };
17A5388824DDA31F00DEFF9A /* MacAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17A5388724DDA31F00DEFF9A /* MacAccountView.swift */; };
17A5388C24DDC83F00DEFF9A /* AccountModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17A5388B24DDC83F00DEFF9A /* AccountModel.swift */; };
17A5388F24DDEC7400DEFF9A /* AccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17A5388D24DDEC7400DEFF9A /* AccountView.swift */; };
@ -118,6 +119,7 @@
1756DBFF24FEE18400207AB8 /* WFACollection+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WFACollection+CoreDataClass.swift"; sourceTree = SOURCE_ROOT; };
1756DC0024FEE18400207AB8 /* WFACollection+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WFACollection+CoreDataProperties.swift"; sourceTree = SOURCE_ROOT; };
1765F62924E18EA200C9EBF0 /* SidebarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarView.swift; sourceTree = "<group>"; };
17681E402519410E00D394AE /* UINavigationController+Appearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UINavigationController+Appearance.swift"; sourceTree = "<group>"; };
17A5388724DDA31F00DEFF9A /* MacAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacAccountView.swift; sourceTree = "<group>"; };
17A5388B24DDC83F00DEFF9A /* AccountModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountModel.swift; sourceTree = "<group>"; };
17A5388D24DDEC7400DEFF9A /* AccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountView.swift; sourceTree = "<group>"; };
@ -239,6 +241,14 @@
path = Preferences;
sourceTree = "<group>";
};
17681E3F251940F200D394AE /* Extensions */ = {
isa = PBXGroup;
children = (
17681E402519410E00D394AE /* UINavigationController+Appearance.swift */,
);
path = Extensions;
sourceTree = "<group>";
};
17A5388924DDA50500DEFF9A /* Settings */ = {
isa = PBXGroup;
children = (
@ -311,6 +321,7 @@
children = (
17DF328B24C87D3500BCE2E3 /* Info.plist */,
17B3E964250FAA9000EE9748 /* LaunchScreen.storyboard */,
17681E3F251940F200D394AE /* Extensions */,
17120DA624E19CE2002B9F6C /* Settings */,
);
path = iOS;
@ -633,6 +644,7 @@
17C42E70250AA12300072984 /* NSManagedObjectContext+ExecuteAndMergeChanges.swift in Sources */,
17120DA124E19839002B9F6C /* AccountView.swift in Sources */,
1756AE7424CB26FA00FD7257 /* PostCellView.swift in Sources */,
17681E412519410E00D394AE /* UINavigationController+Appearance.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -7,12 +7,12 @@
<key>WriteFreely-MultiPlatform (iOS).xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
<key>WriteFreely-MultiPlatform (macOS).xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>

View File

@ -0,0 +1,12 @@
import UIKit
extension UINavigationController {
override open func viewDidLoad() {
super.viewDidLoad()
let standardAppearance = UINavigationBarAppearance()
standardAppearance.configureWithTransparentBackground()
navigationBar.standardAppearance = standardAppearance
}
}