【发布时间】:2011-02-24 07:15:37
【问题描述】:
我制作了一个自定义工具栏并添加了一个 UITabBarItem。现在我想在该按钮单击时加载一个 xib。我该怎么做?
【问题讨论】:
标签: iphone
我制作了一个自定义工具栏并添加了一个 UITabBarItem。现在我想在该按钮单击时加载一个 xib。我该怎么做?
【问题讨论】:
标签: iphone
对该 UITabBarItem 进行操作...并在此操作中提供您要加载的 xib 的名称..
-(IBAction)ButtonAction{
//eg:- is shown below
FreeSetsViewController *viewController =[[FreeSetsViewController alloc] initWithNibName:@"FreeSetsViewController" bundle:nil];
[self.navigationController pushViewController: viewController animated: YES];
[viewController release];
//you will get the required XIB
}
如果您仍然无法获得它,请从已经询问过的 How to load a Xib. 以及 Sam Dufel 分享给您的链接中寻求帮助
祝你好运!
【讨论】: