سؤال

I'm working on a web browser app, and simply enough, I use arrows as the interface for home, back, forward, etc.

What I need is instructions on how to program landscape view in so that the buttons will be where I want them in landscape view, the same arrangement I use in portrait view.

Thanks

هل كانت مفيدة؟

المحلول

Just use the autoresizingmasks to allow the views to move on rotation.

AutoResizingMasks

Apple's View Programming Guide for iOS has all the details complete with illustrations and examples.

You'll also need to enable autorotation by adding this to the UIViewControllers:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
 return YES;
} 
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top