Disabling the Personal hotspot notification
12,783
I found rather late that the Personal Hotspot doesn't just add 20points to the status bar, it messes up views that rely on drop points in an animator with gravity. I added code that checks the status bar height before laying out the views. If it's not 20, then it's probably the hotspot, so I just hide the status bar. Not an ideal solution, but works so far.
- (BOOL)prefersStatusBarHidden {
if ([UIApplication sharedApplication].statusBarFrame.size.height == 20) {
NSLog(@"Status bar is 20 so returning NO for hidden");
return NO;
}
NSLog(@"Status bar is not 20 so returning YES for hidden");
return YES;
}
Author by
KP26
Updated on June 04, 2022Comments
-
KP26 almost 2 years
Enabling personal hot spot pushing down the view and related subviews pushing down. How to disable the personal hotspot notification programmatically? (how can i restrict iPhone status bar to original size even when HOT SPOT is on?)
-
Hello World almost 10 yearsThe question says how to disable it programmatically
-
benc over 6 years(I think that is what Sachidanandam meant, because there is no way for an end-user to disable the status bar display).