overboming
overboming

Reputation: 1542

How to detect whether personal wifi hotspot or recording is undergoing on iOS?

Since the red/blue glowing banner will block quite a lot of the interface. http://d.pr/SfgW

Upvotes: 4

Views: 2411

Answers (3)

Vikash Rajput
Vikash Rajput

Reputation: 455

you can get text message if any device is connect to hotspot.

UIApplication *app = [UIApplication sharedApplication];
UILabel *subviews12 = [[app valueForKey:@"statusBar"] valueForKey:@"doubleHeightLabel"];

Upvotes: 2

Gh Florin
Gh Florin

Reputation: 61

The statusbar height is 40 even when you have an active call by pressing the home button durring a phone call, therefore you can not determine whether or not the personal hotspot is on.

Upvotes: 4

Guillaume Boudreau
Guillaume Boudreau

Reputation: 2887

This gives you the height of the status bar:

CGFloat statusBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.height;

With Personal Hotspot enabled, it returns 40, and returns 20 otherwise.

Upvotes: 12

Related Questions