开发者

iPhone, how can I add a first view, show once, to a mainWindow but not have a tab bar button?

I need to have a view which shows first before other view开发者_开发问答s but doesn't have a tab bar button.

Is there a way to do this ?

EDIT: I don't want to show it modally as i want to use to standard function which show other views and having to cater for different ways of showing the view would be messy.


You could add your tabBarController in your window only once you need it and then remove your view from it's superview do discard it and free memory.

Something like:

- (void)applicationDidFinishLaunching:(UIApplication *)application {    
    [window addSubview:viewController.view];
    [window makeKeyAndVisible];
}

- (void)showTabBarController {
    [window addSubview:tabBarController.view];
    [viewController.view removeFromSuperView];
    self.viewController = nil;
}


So you want the tab bar to be visible, yet none of its items should be active and the visible view is not a part of the tab bar hierarchy? I don't think this is possible...

And even if you make things look like the described scenario, I have some doubts whether apple will approve an app circumventing standard functionality like this.


You mean UITabBarController? Try use View Based Application or Navigation Based Application when creating the project in XCode

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜