iOS 9: Unwanted margin in UINavigationBar landscape -
there customized navigation bar , worked until ios 9. strange margin appears in landscape mode.
standard code used create layout.
- (uibarbuttonitem*)leftmenubutton { uibutton *menubtn = [uibutton buttonwithtype:uibuttontypecustom]; [menubtn setimage:[uiimage imagenamed:@"menu_button.png"] forstate:uicontrolstatenormal]; uiview *backarea = [[uiview alloc] initwithframe:cgrectmake(0, 0, menubtn.frame.size.width, menubtn.frame.size.height)]; [backarea addsubview:menubtn]; //layer border enabled issue visualization backarea.layer.bordercolor = [uicolor redcolor].cgcolor; backarea.layer.borderwidth = 1; menubtn.layer.bordercolor = [uicolor greencolor].cgcolor; menubtn.layer.borderwidth = 2; uibarbuttonitem *backitem = [[uibarbuttonitem alloc] initwithcustomview:backarea]; return backitem; }
i've stumbled upon too. navigation bars in ios 9 have misaligned content when device in landscape mode. looks bar content positioned fits compact metrics though bar still uses default metrics (when used outside of uinavigationcontroller example). looks bars somehow coupled screen orientation. mess.
edit: opened radar #23027275.

Comments
Post a Comment