View gets pushed up when Personal Hotspot is ON (IOS App - Objective C) -


i have problem have no idea on how solve it, i'm developing ios app using objective-c , whenever personal hotspot turned on view gets pushed under (so lose 20px of navigationbar), tried found solution online found none, can please give me advice on how possibly solve this?

edit: problem should library i'm using slide menu: https://github.com/aryaxt/ios-slide-menu root view controller has class slidenavigationcontroller, i've tried remove , view doesn't pushed before.. has had similar issue?

this because slide menu set self.view.frame.origin.y 0 when it's activated.

to solve this, need manually adjust offset according height of status bar.

there 2 places can find rect.origin.y = 0 in slidenavigationcontroller.m, 1 in movehorizontallytolocation (it's handling 'pushing' animation) , other in initialrectformenu (the initialization method frame). need change 0 correct offset 2 lines.

the implementation of calculating offset can found here.

- (float)offsetfromtop {     uiview *view = self.view;     cgrect statusbarframe = [[uiapplication sharedapplication] statusbarframe];     cgrect statusbarwindowrect = [view.window convertrect:statusbarframe fromwindow:nil];     cgrect statusbarviewrect = [view convertrect:statusbarwindowrect fromview:nil];     float fullheight = statusbarviewrect.size.height;     float offset = fullheight;     if (![uiapplication sharedapplication].statusbarhidden) {         offset -= status_bar_height;     }     return offset; } 

then replace 2 line rect.origin.y = [self offsetfromtop];


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -