File tree 3 files changed +24
-5
lines changed
CYLTabBarController.xcodeproj
project.xcworkspace/xcuserdata/chenyilong.xcuserdatad
xcuserdata/chenyilong.xcuserdatad/xcdebugger
3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 20
20
ignoreCount = " 0"
21
21
continueAfterRunningActions = " No"
22
22
filePath = " Example/CYLTabBarControllerConfig.m"
23
- timestampString = " 482294547.088128 "
23
+ timestampString = " 482295802.220628 "
24
24
startingColumnNumber = " 9223372036854775807"
25
25
endingColumnNumber = " 9223372036854775807"
26
- startingLineNumber = " 214 "
27
- endingLineNumber = " 214 "
26
+ startingLineNumber = " 218 "
27
+ endingLineNumber = " 218 "
28
28
landmarkName = " -dealloc"
29
29
landmarkType = " 5" >
30
30
</BreakpointContent >
45
45
landmarkType = " 5" >
46
46
</BreakpointContent >
47
47
</BreakpointProxy >
48
+ <BreakpointProxy
49
+ BreakpointExtensionID = " Xcode.Breakpoint.FileBreakpoint" >
50
+ <BreakpointContent
51
+ shouldBeEnabled = " Yes"
52
+ ignoreCount = " 0"
53
+ continueAfterRunningActions = " No"
54
+ filePath = " Example/CYLTabBarControllerConfig.m"
55
+ timestampString = " 482295636.508473"
56
+ startingColumnNumber = " 9223372036854775807"
57
+ endingColumnNumber = " 9223372036854775807"
58
+ startingLineNumber = " 179"
59
+ endingLineNumber = " 179"
60
+ landmarkName = " -customizeTabBarSelectionIndicatorImage"
61
+ landmarkType = " 5" >
62
+ </BreakpointContent >
63
+ </BreakpointProxy >
48
64
</Breakpoints >
49
65
</Bucket >
Original file line number Diff line number Diff line change @@ -174,10 +174,13 @@ - (void)updateTabBarCustomizationWhenTabBarItemWidthDidUpdate {
174
174
175
175
- (void )customizeTabBarSelectionIndicatorImage {
176
176
// Get Default TabBar Height
177
- UITabBarController *tabBarController = [[UITabBarController alloc ] init ];
177
+ UITabBarController *tabBarController;
178
+ tabBarController = [self cyl_tabBarController ] ?: [[UITabBarController alloc ] init ];
178
179
CGFloat tabBarHeight = tabBarController.tabBar .frame .size .height ;
179
180
CGSize selectionIndicatorImageSize = CGSizeMake (CYLTabBarItemWidth, tabBarHeight);
180
- [[self cyl_tabBarController ].tabBar setSelectionIndicatorImage: [[self class ]
181
+ // Get initialized tabbar if exists.
182
+ UITabBar *tabBar = [self cyl_tabBarController ].tabBar ?: [UITabBar appearance ];
183
+ [tabBar setSelectionIndicatorImage: [[self class ]
181
184
imageFromColor: [UIColor yellowColor ]
182
185
forSize: selectionIndicatorImageSize
183
186
withCornerRadius: 0 ]];
You can’t perform that action at this time.
0 commit comments