ios - SWRealViewController over UINavigationBar subview hides UINavigationItems -


when layer swrevealviewcontroller on normal uiviewcontroller's view, achieve sliding left menu effect, works intended.

however, when view controller embeded on uinavigationcontroller, overlays navigation bar , hides image , left , right barbuttonitems.

i'd appreciate finding workaround.

this how i'm adding buttons:

uibarbuttonitem *revealbuttonitem = [[uibarbuttonitem alloc] initwithimage: [uiimage imagenamed:@"icon-back"]                                                                       style:uibarbuttonitemstyleplain                                                                     target:self.revealviewcontroller action:@selector(revealtoggle:)]; uibarbuttonitem *saveexitbuttonitem = [[uibarbuttonitem alloc] initwithimage:[uiimage imagenamed:@"out"]                                                                      style:uibarbuttonitemstyleplain                                                                     target:self action:@selector(saveexit)];  self.navigationcontroller.navigationitem.leftbarbuttonitem = revealbuttonitem; self.navigationcontroller.navigationitem.rightbarbuttonitem = saveexitbuttonitem; 

added repository show point i'm using component https://github.com/john-lluch/swrevealviewcontroller:

https://github.com/aresdev/revealtest.git 

main.storyboard working, change in project settings main interface nonworking.storyboard see error.

i've found solution, navigation item have add buttom items revealviewcontroller navigation item.

uibarbuttonitem *revealbuttonitem = [[uibarbuttonitem alloc] initwithimage: [uiimage imagenamed:@"icon-back"]                                                                   style:uibarbuttonitemstyleplain                                                                 target:self.revealviewcontroller action:@selector(revealtoggle:)];  uibarbuttonitem *saveexitbuttonitem = [[uibarbuttonitem alloc] initwithimage:[uiimage imagenamed:@"out"]                                                                  style:uibarbuttonitemstyleplain                                                                 target:self action:@selector(saveexit)];  self.revealviewcontroller.navigationitem.leftbarbuttonitem = revealbuttonitem; self.revealviewcontroller.navigationitem.rightbarbuttonitem = saveexitbuttonitem; 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -