0
votes

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 white 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.

2
when you use presentModalTransmisionViewController that is the way it's shown a new view that does not show the tabBar(if it does not have one). if this new view has a button in the tab bar you could just call that that method .Radu

2 Answers

0
votes

Add

cv.modalPresentationStyle = UIModalPresentationCurrentContext;
0
votes

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 :)