UIBarbutton 在整个应用程序中始终保留在导航栏上
我正在尝试创建一个应用程序,其中我始终需要应用程序右上角的导航栏按钮。单击后将出现秒表。可以有这样的按钮吗?我的意思是无需在每个视图控制器中重复或重写代码?
I am trying to create an app in which, I need navigation bar button on the right corner of app all the time. On clicking on which a stopwatch will appear. Is it possible to have such button? I mean without repeating or rewriting the code in an every single viewcontroller ?
是的,这是可能的。但是你必须在全局方法中编写代码,并且需要在每个视图控制器中调用该方法。
Ya, Its Possible. But you have to write the code in Global Method and you need to call the method in each view controller.