开发者

iPad both orientations for graphics

I am about to start developing an iPad app, and need to support both portrait and landscape orientations. What's the best way to approach the graphical part? As I need separate images开发者_JAVA百科 for portrait and landscape orientations.


Ok, let's ignore your vagueness and tackle this from all sides.

If. A: I need the app launch image to support both landscape and portrait:

Click on the Xcode project name in Xcode, then select the target and scroll down in the first tab until you see the launch images section. Simply right-click or drag in any material that fits the iPad's 768x1024 (or 1024x768) resolution just right or you'll get an annoying little yellow warning symbol.

B. I need my app to have a different image when it's turn (Interface Builder)

Simply select the item in question (usually a view) and go to the metrics (under that arrow looking tab in the right pane) and set individual pictures for the landscape and portrait orientations.

C. I need my app to change like the apple calculator app (Sans Interface Builder)

-(void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

D. I want my app to just support all orientations: 1. Go to that same target and under the "supported orientations" bit, make sure all of the orientations are highlighted. OR 2. Put in a

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {  return YES; }

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜