diff --git a/ExampleApp/KGAppDelegate.m b/ExampleApp/KGAppDelegate.m index ed96142..676fea3 100644 --- a/ExampleApp/KGAppDelegate.m +++ b/ExampleApp/KGAppDelegate.m @@ -29,6 +29,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [self.window.rootViewController.view addSubview:showButton]; [KGModal sharedInstance].closeButtonType = KGModalCloseButtonTypeRight; + [KGModal sharedInstance].statusBarStyle = UIStatusBarStyleLightContent; [self.window makeKeyAndVisible]; diff --git a/ExampleApp/KGModalExample-Info.plist b/ExampleApp/KGModalExample-Info.plist index d48ba91..8a1b045 100644 --- a/ExampleApp/KGModalExample-Info.plist +++ b/ExampleApp/KGModalExample-Info.plist @@ -41,5 +41,7 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIViewControllerBasedStatusBarAppearance + diff --git a/KGModal.h b/KGModal.h index 10ce934..1a841fa 100644 --- a/KGModal.h +++ b/KGModal.h @@ -50,6 +50,10 @@ typedef NS_ENUM(NSUInteger, KGModalCloseButtonType){ // Defaults to YES, only applies to iOS5 @property (nonatomic) BOOL shouldRotate; +// Determines style if status bar appearance based on view controller +// Defaults to UIStatusBarStyleDefault +@property (nonatomic) UIStatusBarStyle statusBarStyle; + // The shared instance of the modal + (instancetype)sharedInstance; diff --git a/KGModal.m b/KGModal.m index 1ac5a57..8498194 100644 --- a/KGModal.m +++ b/KGModal.m @@ -268,6 +268,10 @@ - (void)viewDidLoad{ self.styleView = styleView; } +- (UIStatusBarStyle)preferredStatusBarStyle { + return [[KGModal sharedInstance] statusBarStyle]; +} + - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return [[KGModal sharedInstance] shouldRotate]; }