File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Sources/NativeUIKit/Controllers/Complex/Profile Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22
33 s . name = 'NativeUIKit'
4- s . version = '1.2.8 '
4+ s . version = '1.2.9 '
55 s . summary = 'Mimicrated views and controls to native Apple appearance.'
66 s . homepage = 'https://github.com/ivanvorobei/NativeUIKit'
77 s . source = { :git => 'https://github.com/ivanvorobei/NativeUIKit.git' , :tag => s . version }
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ open class NativeProfileHeaderView: SPView {
5959 // $0.titleLabel?.adjustsFontSizeToFitWidth = true
6060 // $0.titleLabel?.minimumScaleFactor = 0.5
6161 $0. titleImageInset = 2
62+ $0. titleLabel? . textAlignment = . center
6263 }
6364
6465 // MARK: - Private
@@ -117,15 +118,20 @@ open class NativeProfileHeaderView: SPView {
117118 avatarView. setXCenter ( )
118119 avatarView. frame. origin. y = layoutMargins. top
119120
120- nameLabel. layoutDynamicHeight ( width: layoutWidth)
121+ let textWidth : CGFloat = layoutWidth * 0.8
122+
123+ nameLabel. layoutDynamicHeight ( width: textWidth)
121124 nameLabel. setXCenter ( )
122125 nameLabel. frame. origin. y = avatarView. frame. maxY + NativeLayout. Spaces. default_half
123126
124- namePlaceholderLabel. layoutDynamicHeight ( width: layoutWidth )
127+ namePlaceholderLabel. layoutDynamicHeight ( width: textWidth )
125128 namePlaceholderLabel. setXCenter ( )
126129 namePlaceholderLabel. frame. origin. y = nameLabel. frame. origin. y
127130
128131 emailButton. sizeToFit ( )
132+ if emailButton. frame. width > textWidth {
133+ emailButton. frame. setWidth ( textWidth)
134+ }
129135 emailButton. setXCenter ( )
130136 emailButton. frame. origin. y = usingNameLabel. frame. maxY
131137 }
You can’t perform that action at this time.
0 commit comments