Skip to content

Commit

Permalink
fix get window method
Browse files Browse the repository at this point in the history
  • Loading branch information
leelaxs committed Nov 27, 2024
1 parent 57947b5 commit 3def127
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CYLTabBarController/CYLTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -746,9 +746,11 @@ - (void)cyl_setTabBarController:(CYLTabBarController *)tabBarController {
}


static inline UIWindow *getMainWindow(){
static inline UIWindow *getMainWindow(void){
UIWindow *window = nil;
window = UIApplication.sharedApplication.delegate.window;
if ([UIApplication.sharedApplication.delegate respondsToSelector:@selector(setWindow:)]) {
window = UIApplication.sharedApplication.delegate.window;
}
if (!window) {
if (@available(iOS 13.0, *))
{
Expand Down

0 comments on commit 3def127

Please sign in to comment.