Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aranince

macrumors 65816
Original poster
Apr 18, 2007
1,104
0
California
I have two .xib files. I got it to transition from the first nib to the second just fine, however on the second nib, the view isn't aligned properly. I have no idea why it is doing this. Any ideas?

Here is where I show the view
Code:
- (void)showTextView {
	TextViewController *aTextViewController = [[TextViewController alloc] initWithNibName:@"TextView" bundle: nil];
	[self setTextViewController:aTextViewController];
	[aTextViewController release];
	
	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationDuration:1.0];
	[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:window cache:NO];
	[viewController.view removeFromSuperview];
	[self.window addSubview:[textViewController view]];
	[UIView commitAnimations];
	
}
 

Attachments

  • Screen shot 2009-09-14 at 11.42.56 PM.png
    Screen shot 2009-09-14 at 11.42.56 PM.png
    148.8 KB · Views: 96
Something like that may help :

Code:
CGRect frame = [[UIScreen mainScreen] applicationFrame]; 
[MyControllerView SetFrame:frame];

This will stick the view to the iPhone screen bounds.
Of course, you could also define another frame using the CGRect struct if you don't want the view to fill the whole screen


PS : since my Mac is out of order, I can't test, so there may be mistakes. But the general idea should be ok.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.