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

how to insert data php javascript mysql with multiple array session 2 -

c++ - How to test/verify that zero-initialization takes place -

node.js - Webpack/TypeScript Raising Errors When node_modules is Excluded -