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

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

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