When i turn on Personnel Hotspot on under My iPhone settings the UI of My iPhone App gets displaced 20 pixels below.How can i deal with this problem.
Is there a way i can detect whether Hotspot is turned on or off.?
Thanks vikas
When i turn on Personnel Hotspot on under My iPhone settings the UI of My iPhone App gets displaced 20 pixels below.How can i deal with this problem.
Is there a way i can detect whether Hotspot is turned on or off.?
Thanks vikas
You can get several sizes using the following selectors, whenever the hotspot or other notification appears the statusBarFrame will become 40px high.
CGRect rect;
rect = [[UIScreen mainScreen] bounds]; // Get screen dimensions
NSLog(@"Bounds: %1.0f, %1.0f, %1.0f, %1.0f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
rect = [[UIScreen mainScreen] applicationFrame]; // Get application frame dimensions (basically screen - status bar)
NSLog(@"App Frame: %1.0f, %1.0f, %1.0f, %1.0f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
rect = [[UIApplication sharedApplication] statusBarFrame]; // Get status bar frame dimensions
NSLog(@"Statusbar frame: %1.0f, %1.0f, %1.0f, %1.0f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
You have a number of options to deal with this: