在Interface Builder中继承xib文件 [英] inherit xib-file in Interface Builder
问题描述
我有一个用IB制成的ViewController.xib
,它有一个UITableView
.
我想建立另一个XIB文件例如SearchViewController.xib
,从ViewController.xib
继承.新的SearchViewController.xib应该继承UITableView
,并且还应该具有UISearchBar
和UIButton
.
I have a ViewController.xib
made in IB, that has a UITableView
.
I want to build another xib-file e.g. SearchViewController.xib
, thas inherit from ViewController.xib
. The new SearchViewController.xib should inherit the UITableView
and additionally it should have a UISearchBar
and a UIButton
.
是否可以使用Interface Builder创建这种情况?
It's possible to make this scenario with the Interface Builder?
推荐答案
不,NIB文件之间没有继承的概念.您唯一的选择是复制原始文件并在副本中进行必要的更改.
No, there is no concept of inheritance among NIB files. Your only option is to duplicate the original file and make the necessary changes in the copy.
这篇关于在Interface Builder中继承xib文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!