Skip to content

Commit 670d971

Browse files
committed
Merge branch '363-prepare-for-multiple-slider' into 'master'
Resolve "Prepare for multiple slider" Closes #363 See merge request pace/mobile/ios/pace-cloud-sdk!416
2 parents 292e600 + 84b9f42 commit 670d971

File tree

10 files changed

+55
-8
lines changed

10 files changed

+55
-8
lines changed

ExampleApp/PACECloudSDKExample.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@
195195
3BEF1E312864922400852A18 /* PaymentMethodVendorsRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentMethodVendorsRow.swift; sourceTree = "<group>"; };
196196
6ACBC02F26FB758800E6AC05 /* ExampleLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleLogger.swift; sourceTree = "<group>"; };
197197
6ACBC03526FDC17D00E6AC05 /* ShareObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareObject.swift; sourceTree = "<group>"; };
198+
9A2B25BC2C3679CA000E7233 /* SameBrand.gpx */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = SameBrand.gpx; sourceTree = "<group>"; };
199+
9A2B25BD2C3679CA000E7233 /* DifferentBrands.gpx */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = DifferentBrands.gpx; sourceTree = "<group>"; };
200+
9A2B25BE2C3679CA000E7233 /* TestStationLinkenheimHochstetten.gpx */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = TestStationLinkenheimHochstetten.gpx; sourceTree = "<group>"; };
198201
/* End PBXFileReference section */
199202

200203
/* Begin PBXFrameworksBuildPhase section */
@@ -285,6 +288,9 @@
285288
3B784C5026B3E84B00B1D859 /* GPX */ = {
286289
isa = PBXGroup;
287290
children = (
291+
9A2B25BD2C3679CA000E7233 /* DifferentBrands.gpx */,
292+
9A2B25BC2C3679CA000E7233 /* SameBrand.gpx */,
293+
9A2B25BE2C3679CA000E7233 /* TestStationLinkenheimHochstetten.gpx */,
288294
3B784C5126B3E85700B1D859 /* HEM(Baden).gpx */,
289295
3B784C5326B3E86000B1D859 /* Kirche-Jet.gpx */,
290296
3B784C4C26B3E83F00B1D859 /* PACE.gpx */,
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2+
<gpx>
3+
<wpt lat="48.990567" lon="8.375001">
4+
<name>WP001</name>
5+
<time>2017-11-03T15:42:26Z</time>
6+
</wpt>
7+
</gpx>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2+
<gpx>
3+
<wpt lat="49.311269" lon="12.106522">
4+
<name>WP001</name>
5+
<time>2017-11-03T15:42:26Z</time>
6+
</wpt>
7+
</gpx>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2+
<gpx>
3+
<wpt lat="49.00843678628607" lon="8.387542515993118">
4+
<name>WP001</name>
5+
<time>2017-11-03T15:42:26Z</time>
6+
</wpt>
7+
</gpx>

PACECloudSDK/AppKit/AppModels/AppData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public extension AppKit {
3636

3737
internal var shouldShowDistance: Bool = false
3838

39-
init(appID: String?, title: String?, subtitle: String?, appUrl: String?, metadata: [AppKit.AppMetadata: AnyHashable]) {
39+
public init(appID: String?, title: String?, subtitle: String?, appUrl: String?, metadata: [AppKit.AppMetadata: AnyHashable]) {
4040
self.appID = appID
4141
self.title = title
4242
self.subtitle = subtitle
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "default_notification_logo.pdf",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}

PACECloudSDK/AppKit/Drawer/AppDrawer.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension AppKit {
3434
let labelsPadding = AppDrawer.drawerSize + 8
3535
var lastSlideDirection: SlideDirection = .left
3636

37-
var appDrawerBackgroundColor: UIColor = AppStyle.lightColor
37+
var appDrawerBackgroundColor: UIColor = AppStyle.blueColor
3838
let appIconBackgroundColor: UIColor
3939
var distanceViewLeadingConstraint: NSLayoutConstraint?
4040
var subtitleTrailingConstraint: NSLayoutConstraint?
@@ -60,7 +60,7 @@ extension AppKit {
6060
return label
6161
}()
6262

63-
lazy var distanceView: UIView = {
63+
public lazy var distanceView: UIView = {
6464
let view = UIView()
6565
view.layer.cornerRadius = 4
6666
return view
@@ -114,7 +114,7 @@ extension AppKit {
114114
self.appData = appData
115115

116116
let appColorString = appData.appManifest?.iconBackgroundColor ?? ""
117-
appIconBackgroundColor = UIColor(hex: appColorString) ?? AppStyle.lightColor
117+
appIconBackgroundColor = UIColor(hex: appColorString) ?? AppStyle.darkColor
118118

119119
super.init(frame: CGRect())
120120

@@ -218,8 +218,8 @@ extension AppKit {
218218
appDrawerBackgroundColor = themeColor
219219
appDrawerTextColor = textColor
220220
} else {
221-
appDrawerBackgroundColor = theme == .light ? AppStyle.lightColor : AppStyle.darkColor
222-
appDrawerTextColor = UIColor.contrastColor(hex: appDrawerBackgroundColor.hexString)
221+
appDrawerBackgroundColor = AppStyle.blueColor
222+
appDrawerTextColor = AppStyle.darkColor
223223
}
224224

225225
self.appDrawerBackgroundColor = appDrawerBackgroundColor
@@ -368,7 +368,11 @@ extension AppKit.AppDrawer {
368368
requestedSize: (Int(Self.drawerSize), Int(Self.drawerSize))),
369369
let iconSource = icon.source,
370370
let iconUrlString = URLBuilder.buildAppIconUrl(baseUrl: appData.appBaseUrl, iconSrc: iconSource)
371-
else { return }
371+
else {
372+
AppKitLogger.d("[AppDrawer] Set default app drawer image")
373+
appImageView.image = AppStyle.iconDefaultAppDrawer
374+
return
375+
}
372376

373377
appImageView.load(urlString: iconUrlString.absoluteString)
374378
}

PACECloudSDK/AppKit/Extensions/UIImageView+Extension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ extension UIImageView {
1111
func load(urlString: String) {
1212
URLDataRequest.requestData(with: urlString, headers: nil) { [weak self] result in
1313
guard case let .success(data) = result, let image = UIImage(data: data) else { return }
14-
14+
AppKitLogger.d("Successfully loaded app drawer image")
1515
DispatchQueue.main.async {
1616
self?.image = image
1717
}

PACECloudSDK/AppKit/Styles/AppStyle+Images.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ extension AppStyle {
4040
return imageNamed("icon_distance").withRenderingMode(.alwaysTemplate)
4141
}
4242

43+
static var iconDefaultAppDrawer: UIImage {
44+
return imageNamed("default_notification_logo")
45+
}
46+
4347
private static func imageNamed(_ imageName: String) -> UIImage {
4448
return UIImage(named: imageName, in: Bundle.paceCloudSDK, compatibleWith: nil) ?? UIImage()
4549
}

0 commit comments

Comments
 (0)