Ind.ie is now Small Technology Foundation.
Commit dc3582b5 authored by Aral Balkan's avatar Aral Balkan

Fixes #1; fixes issues with the spike interface

parent 4a737fb3
Pipeline #701 failed with stages
......@@ -49,6 +49,8 @@ class ViewController: UIViewController, UITextViewDelegate {
// Enable layout guides to debug layout and responsiveness.
var showLayoutGuides = false
var layoutElementBackgroundColours: [UIView: UIColor] = [:]
let betterFonts: [BetterFontSize:BetterFontSet] = [
......@@ -83,7 +85,15 @@ class ViewController: UIViewController, UITextViewDelegate {
// Initialise the success and failure images for the data update.
blockerDisabledShieldImage = UIImage(named: "Disabled")
blockerEnabledShieldImage = UIImage(named: "Enabled")
// Save the initial background colours of the layout elements so
// they can be restored later.
layoutElementBackgroundColours[layoutElementStatusBadge] = layoutElementStatusBadge.backgroundColor!
layoutElementBackgroundColours[layoutElementStatusText] = layoutElementStatusText.backgroundColor!
// Update initial state of the switches.
updateSwitches()
// Should we show layout guides?
updateLayoutGuides()
......@@ -199,7 +209,10 @@ class ViewController: UIViewController, UITextViewDelegate {
// to the app after making changes to the Dynamic Type settings under Settings.
statusImageView.imageContentMode = LDImageContentModeScaleAspectFill
statusImageView.imageContentMode = LDImageContentModeScaleAspectFit
updateStatusImageHorizontalAlignmentBasedOnTraitCollection(self.traitCollection)
_ = delay(0) {
self.updateStatusImageHorizontalAlignmentBasedOnTraitCollection(self.traitCollection)
}
}
......@@ -236,6 +249,7 @@ class ViewController: UIViewController, UITextViewDelegate {
if (showLayoutGuides) {
for layoutGuide in layoutGuides { layoutGuide!.isHidden = false }
for layoutElement in layoutElements { layoutElement!.backgroundColor = layoutElementBackgroundColours[layoutElement!] }
} else {
// Hide the layout guides and reset the background colours on the layout elements.
for layoutGuide in layoutGuides { layoutGuide!.isHidden = true }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment