This repository was archived by the owner on Jun 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 2
2
Pod ::Spec . new do |s |
3
3
4
4
s . name = "AMXFontAutoScale"
5
- s . version = "1.0.1 "
5
+ s . version = "1.0.2 "
6
6
s . summary = "Scale the font for UILabel and UITextView proportionally across all the screen sizes."
7
7
8
8
s . description = <<-DESC
Original file line number Diff line number Diff line change @@ -80,11 +80,11 @@ - (BOOL)wasInstanceAutoScaleSet
80
80
81
81
+ (void )load
82
82
{
83
- [self amx_swizzleInstanceSelector: @selector (willMoveToSuperview : )
84
- withSelector: @selector (swizzle_willMoveToSuperview : )];
83
+ [self amx_swizzleInstanceSelector: @selector (willMoveToWindow : )
84
+ withSelector: @selector (swizzle_willMoveToWindow : )];
85
85
}
86
86
87
- - (void )swizzle_willMoveToSuperview : (UIView *)newSuperview
87
+ - (void )swizzle_willMoveToWindow : (UIWindow *)newWindow
88
88
{
89
89
AMXScreenSize referenceScreenSize = AMXScreenSizeCurrent;
90
90
if (self.amx_autoScaleEndabled ) {
@@ -97,7 +97,7 @@ - (void)swizzle_willMoveToSuperview:(UIView *)newSuperview
97
97
self.font = [self .font amx_scaleForReferenceScreenSize: referenceScreenSize];
98
98
}
99
99
100
- [self swizzle_willMoveToSuperview: newSuperview ];
100
+ [self swizzle_willMoveToWindow: newWindow ];
101
101
}
102
102
103
103
@end
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ class MainViewController: UIViewController {
12
12
13
13
@IBOutlet var helloLabels : [ UILabel ] !
14
14
@IBOutlet var sizeLabels : [ UILabel ] !
15
-
16
- override func viewDidLoad ( ) {
17
- super. viewDidLoad ( )
15
+
16
+ override func viewDidAppear ( _ animated : Bool ) {
17
+ super. viewDidAppear ( animated )
18
18
19
19
if helloLabels. count == sizeLabels. count {
20
20
for (index, helloLabel) in helloLabels. enumerated ( ) {
You can’t perform that action at this time.
0 commit comments