开发者

Tab Bar controller is not accessible

开发者 https://www.devze.com 2023-03-08 10:53 出处:网络
I have created a tab based application for iphone. when the 1st tab presses a first view will present. this view contains a button, on pressing it another view loads.

I have created a tab based application for iphone. when the 1st tab presses a first view will present. this view contains a button, on pressing it another view loads.

Code is:

-(IBAction)buttonPressed: (id) sender
{
    Cities *cv=[[Cities alloc] initWithNibName:@"Cities" bundle:nil];
    cv.modalTransitionStyle=UIModalTransitionStyleCoverVertical;
    [self presentModalViewController:cv animated:YES];  
    [cv release];
}

Now problem is that this view is loading in whole screen so that I am not able to access tab bar. I have set the frame for this view and the view is loading in this frame, -(void)viewWillAppear:(BOOL)animated { self.view.frame = CGRectMake(0, 0, self.view.frame.size.width, 400); } but in remaining part wh开发者_如何学Cite screen is appearing means tab bar is not accessible.

I want that whatever will be load at any time tab bar should be always accessible.

Please help me out.


Add

cv.modalPresentationStyle = UIModalPresentationCurrentContext;


Have you tried using UINavigationController inside your tabbar to dig inside your UIViewControllers??

for Ref : Adding NavigationController to Tabbar

do you really need a viewController Class for what you are trying to display??

if der's no core functionality being used, i think it will be much easier with UIView.

Happy Coding :)

0

精彩评论

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