Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added property for set status bar style. #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ExampleApp/KGAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
2 changes: 2 additions & 0 deletions ExampleApp/KGModalExample-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
</dict>
</plist>
4 changes: 4 additions & 0 deletions KGModal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions KGModal.m
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ - (void)viewDidLoad{
self.styleView = styleView;
}

- (UIStatusBarStyle)preferredStatusBarStyle {
return [[KGModal sharedInstance] statusBarStyle];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
return [[KGModal sharedInstance] shouldRotate];
}
Expand Down