Commit d5651dff authored by Jose Blaya's avatar Jose Blaya
Browse files

Merge branch '177-title-not-visible-in-getstartviewcontroller-for-dark-mode'...

Merge branch '177-title-not-visible-in-getstartviewcontroller-for-dark-mode' into '173-implement-wireguard-protocol'

Resolve "Title not visible in GetStartViewController for dark mode"

See merge request ios/client-library-apple!233
parents 9a4f28c0 0d8a01f4
......@@ -80,6 +80,8 @@ public class GetStartedViewController: AutolayoutViewController, ConfigurationAc
image: Asset.imageWalkthrough3.image
)
]
private var tutorialViews: [WalkthroughPageView] = []
private var currentPageIndex = 0
......@@ -299,6 +301,7 @@ public class GetStartedViewController: AutolayoutViewController, ConfigurationAc
for (i, data) in allData.enumerated() {
let page = WalkthroughPageView(data: data)
tutorialViews.append(page)
page.translatesAutoresizingMaskIntoConstraints = false
parent.addSubview(page)
......@@ -362,6 +365,9 @@ public class GetStartedViewController: AutolayoutViewController, ConfigurationAc
Theme.current.applyPageControl(pageControl)
Theme.current.applyLinkAttributes(textAgreement)
Theme.current.applyActivityIndicator(spinner)
tutorialViews.forEach({
$0.applyStyles()
})
imvLogo.image = Theme.current.palette.logo
}
......
......@@ -34,6 +34,9 @@ class WalkthroughPageView: UIView {
}
private let data: PageData
private(set) var labelTitle = UILabel()
private(set) var labelDetail = UILabel()
required init?(coder aDecoder: NSCoder) {
data = PageData(title: "", detail: "", image: nil)
......@@ -49,8 +52,7 @@ class WalkthroughPageView: UIView {
private func configure() {
let imvImage = UIImageView()
let labelTitle = UILabel()
let labelDetail = UILabel()
addSubview(imvImage)
addSubview(labelTitle)
addSubview(labelDetail)
......@@ -94,11 +96,14 @@ class WalkthroughPageView: UIView {
labelDetail.text = data.detail
imvImage.image = data.image
Theme.current.applySubtitle(labelDetail)
Theme.current.applyTitle(labelTitle, appearance: .dark)
labelTitle.textAlignment = .center
labelDetail.textAlignment = .center
}
func applyStyles() {
Theme.current.applySubtitle(labelDetail)
Theme.current.applyTitle(labelTitle, appearance: .dark)
}
}
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