@ -31,7 +31,7 @@ public class OnboardingBaseViewController: OWSViewController {
let titleLabel = UILabel ( )
let titleLabel = UILabel ( )
titleLabel . text = text
titleLabel . text = text
titleLabel . textColor = Theme . primaryColor
titleLabel . textColor = Theme . primaryColor
titleLabel . font = UIFont . ows_dynamicTypeTitle1 . ows_mediumWeight ( )
titleLabel . font = UIFont . ows_dynamicTypeTitle1 Clamped . ows_mediumWeight ( )
titleLabel . numberOfLines = 0
titleLabel . numberOfLines = 0
titleLabel . lineBreakMode = . byWordWrapping
titleLabel . lineBreakMode = . byWordWrapping
titleLabel . textAlignment = . center
titleLabel . textAlignment = . center
@ -41,7 +41,7 @@ public class OnboardingBaseViewController: OWSViewController {
func explanationLabel ( explanationText : String ) -> UILabel {
func explanationLabel ( explanationText : String ) -> UILabel {
let explanationLabel = UILabel ( )
let explanationLabel = UILabel ( )
explanationLabel . textColor = Theme . secondaryColor
explanationLabel . textColor = Theme . secondaryColor
explanationLabel . font = UIFont . ows_dynamicType Caption1
explanationLabel . font = UIFont . ows_dynamicType SubheadlineClamped
explanationLabel . text = explanationText
explanationLabel . text = explanationText
explanationLabel . numberOfLines = 0
explanationLabel . numberOfLines = 0
explanationLabel . textAlignment = . center
explanationLabel . textAlignment = . center
@ -51,9 +51,11 @@ public class OnboardingBaseViewController: OWSViewController {
func button ( title : String , selector : Selector ) -> OWSFlatButton {
func button ( title : String , selector : Selector ) -> OWSFlatButton {
// TODO: M a k e s u r e t h i s a l l f i t s i f d y n a m i c f o n t s i z e s a r e m a x e d o u t .
// TODO: M a k e s u r e t h i s a l l f i t s i f d y n a m i c f o n t s i z e s a r e m a x e d o u t .
let buttonHeight : CGFloat = 48
let font = UIFont . ows_dynamicTypeBodyClamped . ows_mediumWeight ( )
// B u t t o n h e i g h t s h o u l d b e 4 8 p t i f t h e f o n t i s 1 7 p t .
let buttonHeight = font . pointSize * 48 / 17
let button = OWSFlatButton . button ( title : title ,
let button = OWSFlatButton . button ( title : title ,
font : OWSFlatButton . fontForHeight ( buttonHeight ) ,
font : font,
titleColor : . white ,
titleColor : . white ,
backgroundColor : . ows_materialBlue ,
backgroundColor : . ows_materialBlue ,
target : self ,
target : self ,
@ -64,9 +66,11 @@ public class OnboardingBaseViewController: OWSViewController {
func linkButton ( title : String , selector : Selector ) -> OWSFlatButton {
func linkButton ( title : String , selector : Selector ) -> OWSFlatButton {
// TODO: M a k e s u r e t h i s a l l f i t s i f d y n a m i c f o n t s i z e s a r e m a x e d o u t .
// TODO: M a k e s u r e t h i s a l l f i t s i f d y n a m i c f o n t s i z e s a r e m a x e d o u t .
let buttonHeight : CGFloat = 48
let font = UIFont . ows_dynamicTypeBodyClamped . ows_mediumWeight ( )
// B u t t o n h e i g h t s h o u l d b e 4 8 p t i f t h e f o n t i s 1 7 p t .
let buttonHeight = font . pointSize * 48 / 17
let button = OWSFlatButton . button ( title : title ,
let button = OWSFlatButton . button ( title : title ,
font : OWSFlatButton . fontForHeight ( buttonHeight ) ,
font : font,
titleColor : . ows_materialBlue ,
titleColor : . ows_materialBlue ,
backgroundColor : . white ,
backgroundColor : . white ,
target : self ,
target : self ,