iPad 图形的两个方向
我即将开始开发 iPad 应用程序,需要支持纵向和横向方向。处理图形部分的最佳方法是什么?因为我需要单独的纵向和横向图像。
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 for portrait and landscape orientations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,让我们忽略你的含糊不清,从各个方面解决这个问题。
如果。
答:我需要应用程序启动图像支持横向和纵向:
单击 Xcode 中的 Xcode 项目名称,然后选择目标并在第一个选项卡中向下滚动,直到看到启动图像部分。只需右键单击或拖动任何适合 iPad 768x1024(或 1024x768)分辨率的材料即可,否则您会看到一个烦人的黄色小警告符号。
B. 我需要我的应用程序在轮到时具有不同的图像(界面生成器)
只需选择有问题的项目(通常是视图)并转到指标(在右侧窗格中的箭头查看选项卡下)并设置单独的图片横向和纵向。
C. 我需要我的应用程序像苹果计算器应用程序(Sans Interface Builder)一样进行更改
D. 我希望我的应用程序只支持所有方向:
1. 转到同一目标,并在“支持的方向”位下,确保所有方向都突出显示。
或者
2. 放入
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
返回YES;
}
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)
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;
}