开发者

iPhone : How to display a common button on my all view?

I want to put button which should be displayed on my all view.

The way we are implementing Tab Bar. I want to implement buttons.

Where should I put开发者_如何学Go that button ? And where should I give its functionality ?


Create your button on main window (i.e. UIWindow) and keep front always after when you loading view.


How many views are we talking about?

If we're just talking about a few views, it probably makes sense to just include similar-looking buttons on each view. If we're talking about many views, then you'll probably want to look at other options.

One solution would be to create a subclass of UIViewController that sets up the button and contains the button's action. The controllers for each view would then be subclasses of that class, so that each inherits the button and action.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜