开发者

Opening Another Xib form an Xib

Not a Noob as yesterday, but sti开发者_如何学Goll green. I have been playing around with the code that Elisabeth Robson has put together HERE. I have a UITabbarcontoller and a IUNavigationController they seem to work fine. I have a UITableviewController to which I loads my NSMutable array. The user clicks a cell and didSelectRowAtIndexPath xib is loaded onto the stack. I put a 'Learn More' button on the current xib(BookDetailView). I've tried a few approaches to load a newer xib when the 'Learn More' button is pressed but have failed.

Ive Tried IBAction and Pushing the Newer xib to the top. Do I need to create another view controller?

Thanks for looking.


I suggest linking your UIButton to an IBAction

-(IBAction) learnMoreClicked;

You will need a ViewController for your "learn more" view and in the IBAction method, you load it as follow:

[[LearMoreViewController alloc] initWithNibName:@"LearMoreView" bundle:nil];

Then you can either push it on your navigation stack or as a modal view.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜