2011-09-01 117 views
0

我们怎样才能创建一个新的CustomizeViewControllerUIViewControllerUITableViewController,并etc ...如何创建自定义视图控制器?

如果有这个想法的一些人,请与我们分享。

+0

UITableViewController是UIViewController的一个子类。你可以创建一个UIViewController的新子类? –

+0

如何创建基于UIViewController的基本自定义UITableViewController:http://stackoverflow.com/questions/7158367/is-an-uitableview-resizable-can-i-assign-a-different-frame/7158521#7158521 – Jano

回答

0

我们怎样才能创建一个新的CustomizeViewController喜欢的UIViewController

UIViewController *CustomizeViewController = [[UIViewController alloc] init]; 
CustomizeViewController.view = whateverViewYouHave; 
2

不能从头开始创建一个视图控制器。如果你想创建自己的视图控制器,你要继承的UIViewController一样,

@interface CustomizedViewController : UIViewController 

后来,如果你想创建的子CustomizedViewController,简单地扩展它,

@interface FurtherCustomizedViewController : CustomizeViewController 
相关问题