Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 512 Vote(s) - 3.68 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot hide status bar in iOS7

#11
Many of the answers on this thread work, but it's my understanding if you're trying to do anything dynamic you'll eventually need to call:

[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
Reply

#12
I had to do both changes below to hide the status bar:

Add this code to the view controller where you want to hide the status bar:

- (BOOL)prefersStatusBarHidden
{
return YES;
}

Add this to your .plist file (go to 'info' in your application settings)

View controller-based status bar appearance --- NO

Then you can call this line to hide the status bar:

[[UIApplication sharedApplication] setStatusBarHidden:YES];
Reply

#13
Just add these 2 lines in info.plist file. It will make the fix for iOS7 and older version both.

- Status bar is initially hidden = YES
- View controller-based status bar appearance = NO

Navigate to the project and select Targets -> General and see the "Status Bar style ...Hide during application launch" check box will be checked. This will work.
Reply

#14
Try this simple method:

- (void)viewWillAppear:(BOOL)animated
{
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
}

- (void)viewWillDisappear:(BOOL)animated
{
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
}
Reply

#15
Steps For Hide the status bar in iOS 7:

1.Go to your application info.plist file.

2.And Set, View controller-based status bar appearance : Boolean NO

Hope i solved the status bar issue.....
Reply

#16
There are so many combinations suggested for this issue, but the problem is that iOS 6 and 7 use different methods to hide the status bar. I have never been successful setting the plist settings to enable the iOS6-style behaviour on iOS 7, but if you are building your app to support iOS 6+, you need to use 3 methods at once to ensure a particular view controller hides the status bar:

// for ios 7
- (BOOL)prefersStatusBarHidden{
return YES;
}

// for ios 6
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
// explicitly set the bar to show or it will remain hidden for other view controllers
[[UIApplication sharedApplication] setStatusBarHidden:NO];
}

This should work regardless of your plist settings.
Reply

#17
in your apps plist file add a row call it "View controller-based status bar appearance" and set it to NO

Note that this simply does not work, if you are using UIImagePickerController in the app.

from [

[To see links please register here]

, mgiroux's solution

![An example adding View Base Controller to your Info settings in Xcode][1]

[1]:
Reply

#18
For iOS 7 in a single view use in viewWillappear method:

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];

For display the status bar use:

[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
Reply

#19
To hide status bar in iOS7 you need 2 lines of code

1. inapplication:`(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions` write

[application setStatusBarHidden:YES];

2. in info.plist add this

View-Controller Based Status Bar Appearance = NO
Reply

#20
You can check this [code](

[To see links please register here]

), pod [UIViewController+ODStatusBar][1]


[1]:

[To see links please register here]




Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through