iPhone中多个View Controller中的常见XIB [英] Common XIB in multiple View Controller in iPhone

查看:79
本文介绍了iPhone中多个View Controller中的常见XIB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有多个视图控制器的iPhone应用程序,在所有视图中控制器的标题很常见。
我不想使用相同的方法并在所有控制器中创建公共视图。
所以我的问题是如何在所有控制器中使用这个通用视图。

I have an iPhone Application with multiple view controllers , in all view controller's header is common. I dont want to use the same method and create common view in all controllers. So My questions is how do i use this common view in all controllers.

推荐答案

使用initWithNibNamed:name of您的xib当您分配新的视图控制器时。这很简单。

Use initWithNibNamed:"name of your xib" when you alloc your new view controller. It's simple.

这篇关于iPhone中多个View Controller中的常见XIB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆