iphone - proximityMonitoringEnabled for modally presented view controller -
in uiviewcontroller i'm using code snippet works absolutely fine:
- (void)viewwillappear:(bool)animated { [super viewwillappear:animated]; [uidevice currentdevice].proximitymonitoringenabled = yes; } then i'm detecting interface rotation changes present uiviewcontroller modally via performing segue:
- (void)willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration { if (tointerfaceorientation == uiinterfaceorientationlandscapeleft || tointerfaceorientation == uiinterfaceorientationlandscaperight) { [self performseguewithidentifier:@"showanotherview" sender:nil]; } } in modally presented view controller i'm doing same, enable proximity monitoring in viewwillappear:
unfortunately doesn't work: display doesn't turn off when i'm covering proximity sensor of iphone 5.
what doing wrong?
Comments
Post a Comment