iphone - How to hide navigational bars according to cursor positions to use full screen? -


i trying hide navigational bars according cursor positions.so, can use full screen of iphone. donno how start it.

similar (less confusing :) ) question: show/hide uitoolbar, "match finger movement", precisely in example ios7 safari

use below code if want hide , unhide navigation bar on double tap on part of view

in .h file:

iboutlet uinavigationcontroller *navigationcontroller; 

connect iboutlet in xib.

in .m file:

  -(void)viewdidload {    [super viewdidload];    [navigationcontroller setnavigationbarhidden:yes];     }  -(void)touchesbegan:(nsset *)touches withevent:(uievent *)event{ uitouch *touch = [touches anyobject];    if (touch.tapcount == 2) {         [navigationcontroller setnavigationbarhidden:no];        [nstimer scheduledtimerwithtimeinterval:(1.0) target:self   selector:@selector(hidebar) userinfo:nil repeats:no];         }    }  -(void)hidebar{  [navigationcontroller setnavigationbarhidden:yes];    } 

do modifications per requirement.

happy coding!


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -