diff --git a/Example/PinpointKitExample/Base.lproj/Main.storyboard b/Example/PinpointKitExample/Base.lproj/Main.storyboard index 5f2ebe9..e09f40f 100644 --- a/Example/PinpointKitExample/Base.lproj/Main.storyboard +++ b/Example/PinpointKitExample/Base.lproj/Main.storyboard @@ -1,19 +1,18 @@ - - + + + - - - + + - - + @@ -29,33 +28,32 @@ - + - - + - + - + - + - + @@ -72,25 +70,25 @@ - + - + - + - + @@ -107,25 +105,25 @@ - + - + - + - + @@ -142,25 +140,25 @@ - + - + - + - + @@ -177,25 +175,25 @@ - + - + - + - + @@ -212,25 +210,25 @@ - + - + - + - + @@ -247,25 +245,25 @@ - + - + - + - + @@ -297,12 +295,12 @@ - - - - + + + + - - + + diff --git a/PinpointKit/PinpointKit/Sources/Core/InterfaceCustomization.swift b/PinpointKit/PinpointKit/Sources/Core/InterfaceCustomization.swift index a8a7d02..ce88169 100644 --- a/PinpointKit/PinpointKit/Sources/Core/InterfaceCustomization.swift +++ b/PinpointKit/PinpointKit/Sources/Core/InterfaceCustomization.swift @@ -26,7 +26,6 @@ public struct InterfaceCustomization { * A struct containing information about the appearance of displayed components. */ public struct Appearance { - /// The status bar style of PinpointKit. let statusBarStyle: UIStatusBarStyle @@ -100,7 +99,7 @@ public struct InterfaceCustomization { annotationFillColor: UIColor? = nil, annotationStrokeColor: UIColor = .white, annotationTextAttributes: [NSAttributedString.Key: AnyObject]? = nil, - navigationTitleColor: UIColor = .darkText, + navigationTitleColor: UIColor = Self.defaultNavigationTitleColor, navigationTitleFont: UIFont = .sourceSansProFont(ofSize: 19, weight: .semibold), feedbackSendButtonFont: UIFont = .sourceSansProFont(ofSize: 19, weight: .semibold), feedbackCancelButtonFont: UIFont = .sourceSansProFont(ofSize: 19), @@ -139,6 +138,15 @@ public struct InterfaceCustomization { self.editorTextAnnotationDismissButtonFont = editorTextAnnotationDismissButtonFont self.editorDoneButtonFont = editorDoneButtonFont } + + /// A default color to use for text within a navigation bar. Defaults to `UIColor.label` on iOS 13+ and `UIColor.darkText` on earlier versions. + public static var defaultNavigationTitleColor: UIColor { + if #available(iOS 13.0, *) { + return .label + } else { + return .darkText + } + } } /**