开发者

Navigation Controller button right

I would like to put a button "Sign out" in the left of the navigation bar in all my views, which would allow the user to sign out whatever he is (I have many 开发者_开发知识库screens and I would like to put the i button in the right of the navigation bar which allows the user to sign out whatever he is).

Can I do this with one method (signOut...) or should I put a method signOut in each view?


You could put a signOut button on the navigation controller's navigation bar in the class in which you set up the navigation controller. Your signOut method could be placed there as well.


I Suggest you Build a User Management Class that holds all user interactions and information and have a Method let's say Signout, When the Application Start up create this object and keep passing it to to the Controllers, like a session Object.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜