I am trying to detect a hidden and showing iPhone UIStatusBar, but failed. Could some solution help me like KVO or something else?
You can observe the statusBarHidden property for a generic instance of UIApplication .
statusBarHidden
UIApplication
A simple example:
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { // Do something here... } - (void)viewDidLoad { [super viewDidLoad]; [[UIApplication sharedApplication] addObserver:self forKeyPath:@"statusBarHidden" options:NSKeyValueObservingOptionNew context:NULL]; [[UIApplication sharedApplication] setStatusBarHidden:YES]; // Will notify the observer about the change }
The UIApplication class has the statusBarHidden property ... this status bar is hidden or not ... if it returns YES, the status bar is hidden ... try this.
Source: https://habr.com/ru/post/1439066/More articles:incorrect string replacement - stringProblem with Simple Timer / Timertask for Android - androidIs the range appropriate for regex loops? - c ++How to speed up the removal of ListView items ListViews? - performancehttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1439065/android-button-has-to-click-twice-to-work&usg=ALkJrhjLQSAm6DVWxjZzxM2FljmRHHMV8wWhy is my unpacking printing wrong values? - perlPass the value from the CCK node reference field to the view during content creation - drupal-7Read only SQLite DB in the resource folder for the new version of the application - androidWhy doesn't my package () pack my data? - perlHow to prevent race condition in online hotel booking - phpAll Articles