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

Popular posts from this blog

multithreading - Exception in Application constructor -

React Native allow user to reorder elements in a scrollview list -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -