Search code examples
objective-ciosuinavigationcontrolleruibutton

Adding button which should be visible in all view controllers


How can I make a button or any view which should be visible in all the view controllers and its action can be called from all the view controllers? Popping and pushing of viewcontrollers should take place behind that button. I don't have any code but I have a reference app, Moise Bently, in this app it has a button on top right corner.


Solution

  • Try adding _yourView/button to your window... you can do this in didFinishLaunchingWithOptions also you can do [self.window bringSubviewToFront:_yourView] when required.. if you add some other view over it.