【发布时间】:2012-06-22 18:13:44
【问题描述】:
我有以下问题:
在我的应用程序中,有两种方法可以导航到其他屏幕:通过按钮或标签栏。
所有屏幕都有调用其他屏幕的标签栏,但主屏幕是有按钮但没有标签栏的屏幕。
当我开始开发我的应用程序时,我选择标签栏应用程序模板,如果我通过按标签调用屏幕,它工作正常。当我使用主屏幕时,问题就开始了:
- 我需要在这个特定屏幕中“隐藏”标签栏。
- 在主屏幕中,如果我通过按钮调用新屏幕,则标签栏会在新屏幕中消失(有意义,因为屏幕是通过按钮而不是标签栏调用的)。
为了解决这个问题,我认为也许我可以创建一个自定义标签栏(我还不知道如何)并像 UIControl 一样在我的屏幕上调用它,所以如果我需要更改标签栏可以在调用该控件的所有屏幕上进行修改。
你有什么推荐的?创建自定义标签栏并像 UIControl 一样使用它是个好主意吗?如果是,我该如何创建一个?
我用这个来调用窗口
RecurringGiftListViewController *listViewController = [[RecurringGiftListViewController alloc] initWithNibName:@"RecurringGiftListViewController" bundle:nil];
listViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:listViewController animated:YES];
[listViewController release];
【问题讨论】:
-
你能把你用来推送视图的位代码放上去吗?
-
@Ahmed 当然,我用,我用这个来调用windows RecurringGiftListViewController *listViewController = [[RecurringGiftListViewController alloc] initWithNibName:@"RecurringGiftListViewController" bundle:nil]; listViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [自我presentModalViewController:listViewController动画:YES]; [listViewController 发布];
标签: ios xcode ios4 uitabbar uitabbaritem