2014年,苹果又出了两种尺寸,这里标注下,以后再有新尺寸,再继续更新。

AppIcon

https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1

Table 39-1Size (in pixels) of custom icons and images

Asset

iPhone 6 Plus (@3x)

iPhone 6 and iPhone 5 (@2x)

iPhone 4s (@2x)

iPad and iPad mini (@2x)

iPad 2 and iPad mini (@1x)

App icon (required for all apps)

180 x 180

120 x 120

120 x 120

152 x 152

76 x 76

App icon for the App Store (required for all apps)

1024 x 1024

1024 x 1024

1024 x 1024

1024 x 1024

1024 x 1024

Launch file or image (required for all apps)

Use a launch file (seeLaunch Images)

For iPhone 6, use a launch file (see Launch Images)

For iPhone 5, 640 x 1136

640 x 960

1536 x 2048 (portrait)

2048 x 1536 (landscape)

768 x 1024 (portrait)

1024 x 768 (landscape)

Spotlight search results icon (recommended)

120 x 120

80 x 80

80 x 80

80 x 80

40 x 40

Settings icon (recommended)

87 x 87

58 x 58

58 x 58

58 x 58

29 x 29

Toolbar and navigation bar icon (optional)

About 66 x 66

About 44 x 44

About 44 x 44

About 44 x 44

About 22 x 22

Tab bar icon (optional)

About 75 x 75 (maximum: 144 x 96)

About 50 x 50 (maximum: 96 x 64)

About 50 x 50 (maximum: 96 x 64)

About 50 x 50 (maximum: 96 x 64)

About 25 x 25 (maximum: 48 x 32)

Default Newsstand cover icon for the App Store (required for Newsstand apps)

At least 1024 pixels on the longest edge

At least 1024 pixels on the longest edge

At least 1024 pixels on the longest edge

At least 1024 pixels on the longest edge

At least 512 pixels on the longest edge

Web clip icon (recommended for web apps and websites)

180 x 180

120 x 120

120 x 120

152 x 152

76 x 76

iphone6/6+ 更新:

Icon-Small@3x.png     87*87

Icon-40@3x.png           120*120

Icon-60@3x.png           180*180

Icon.png                        57*57

Icon@2x.png                114*114

Icon-Small.png                29*29

Icon-Small@2x.png            58*58

Icon-Small-50.png            50*50

Icon-Small-50@2x.png        100*100

Icon-72.png                    72*72

Icon-72@2x.png                144*144

Icon-40.png                    40*40

Icon-40@2x.png                80*80

Icon-60.png                    60*60

Icon-60@2x.png                120*120

Icon-76.png                    76*76

Icon-76@2x.png                152*152

LaunchImage

https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LaunchImages.html#//apple_ref/doc/uid/TP40006556-CH22-SW1

For iPhone 6

750 x 1334 (@2x) for portrait

1334 x 750 (@2x) for landscape

For iPhone 6 Plus:

1242 x 2208 (@3x) for portrait

2208 x 1242 (@3x) for landscape

---------------------------------------------------------------------

4.0 inch screen:

Default-568h@2x.png (old 640x1136 ~ for iPhone 5)

4.0 inch screen:

LaunchImage-700-568h@2x.png (new 640x1136 ~ for iPhone 5)

4.7 inch screen:

LaunchImage-800-667h@2x.png (750x1334 ~ for iPhone 6)

5.5 inch screen:

LaunchImage-800-Portrait-736h@3x.png (1242x2208 ~ for iPhone 6 Plus Portrait)

5.5 inch screen:

LaunchImage-800-Landscape-736h@3x.png (2208x1242 ~ for iPhone 6 Plus Landscape)

Retina iPad:

Default-Portrait@2x~ipad.png (1536x2048 ~ for Retina  iPad Portrait)

Retina iPad:

Default-Landscape@2x~ipad.png (2048x1536 ~ for Retina  iPad Landscape)

iPad Mini/iPad:

Default-Portrait~ipad.png (768x1024 ~ for  iPad Portrait)

iPad Mini/iPad:

Default-Landscape~ipad.png (1024x768 ~ for  iPad Landscape)

适配iphone6/6+启动界面

如果旧的工程直接跑到这两个模拟器中时,默认是"兼容模式",即系统会简单的把内容等比例放大,显示效果有些模糊但尚可接受。此时App内部获取到的设备分辨率和iPhone5是一样的:320*568 point。

启用高分辨率模式有2个方法:

1.添加大屏的LaunchImage:

在Images.xcassets里,删除旧的LaunchImage组,然后新建LaunchImage组,添加对应高分辨率的图片。(参考:http://matthewpalmer.net/blog/2014/09/10/iphone-6-plus-launch-image-adaptive-mode/)

2.添加Launch Screen File

Launch Screen是Xcode6和iOS8新加的功能,它用一个xib文件来作为启动画面。App在旧版iOS(低于ios8)启动时,该属性会被自动忽略,不会造成异常。

首先,点击New File ->iOS User Interface ->Launch Screen,然后在工程设置项里启用它:

LaunchFile


 不过这个xib不能关联任何的代码(不能自定义View的Class,不能IBOutlet,不能加Object),可以理解成这个xib就是一张截图,这个方案的好处在于可以使用到Size Classes来针对不同屏幕布局这个xib。

上面两处设置,只要启用任意一个即可让App进入高分辨率模式;但如果两处都没有设置,则App会回退到兼容模式。

两处都设定的话在ios8会走Launch Screen File,在低于ios8 走LaunchImage

PS:iPhone4、iPhone5、iPhone6这几个设备的ppi都是相同的,默认图片优先是@2x。iPhone6 Plus的像素密度更高,默认图片优先是@3x。 另外,iPhone6 Plus有一点和其他设备不同:在App内部获得的屏幕分辨率是1242*2208,但设备实际分辨率是1920*1080,这时系统会把整体的显示内容做一个缩放,downscale到1/1.15。

 UIPageControl的autoresizingMask

在设置UIPageControl实例的宽度时,显示的好像总是设置的四倍左右,但是把其他组建(UILable等)设置在同一父容器中显示的是正常的。头文件看到UIPageControl的autoresizingMask默认值是UIViewAutoresizingNone,但是感觉没起作用,于是这是下

Java代码  
  1. _mainPageControl.autoresizingMask = UIViewAutoresizingNone;

UIPageControl显示正确了。(apple的bug?)

UIActivityViewController crashing on iPads by sdk8

其老早在 https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIActivityViewController_Class/ 中就说了:On iPad, you must present the view controller in a popover. On iPhone and iPod touch, you must present it modally

在sdk8之前你ipad还是用了presentViewController,那在dismissViewControllerAnimated的时候屏幕会旋转下,可能你还能接受,但是在sdk8便会直接crash,报错:

Java代码  
  1. 2014-10-15 14:03:25.927 BT2014[5133:488272] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<_UIAlertControllerActionSheetRegularPresentationController: 0x145578890>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.'
  2. *** First throw call stack:
  3. (0x187d9e084 0x1986900e4 0x18cc56bf0 0x18c81e3f8 0x18c81cf30 0x18c5a2efc 0x18c5149c0 0x187d56388 0x187d53314 0x187d536f4 0x187c81664 0x190d7f5a4 0x18c5864f8 0x1000c574c 0x198cfea08)
  4. libc++abi.dylib: terminating with uncaught exception of type NSException

所以用sdk8编译时ipad用pop,并且用新类:UIPopoverPresentationController

UIActivityViewController

Java代码  
  1. Accessing the Completion Handler
  2. completionHandler
  3. (iOS 8.0)
  4. The completion handler to execute after the activity view controller is dismissed.
  5. Declaration
  6. OBJECTIVE-C
  7. @property(nonatomic, copy) UIActivityViewControllerCompletionHandler completionHandler
  8. Discussion
  9. When the user-selected service finishes operating on the data, or when the user dismisses the view controller, the view controller executes this completion handler to let your app know the final result of the operation.
  10. Import Statement
  11. Availability
  12. Available in iOS 6.0 and later.
  13. Deprecated in iOS 8.0.

"LaunchServices: invalidationHandler called" with UIActivityViewController iOS8

In iOS8 when I present or dismiss a UIActivityViewController, my app logs: "LaunchServices: invalidationHandler called"。

参考:https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPopoverPresentationController_class/index.html

https://devforums.apple.com/message/1049415#1049415

http://stackoverflow.com/questions/25192313/sharing-via-uiactivityviewcontroller-to-twitter-facebook-etc-causing-crash

可能是苹果的issue

ios sdk8/ios8 remoteNotification

//

在苹果UIApplication文件中说明:

@interface UIApplication (UIRemoteNotifications)

.

.

.

- (void)registerForRemoteNotificationTypes:(UIRemoteNotificationType)types NS_DEPRECATED_IOS(3_0, 8_0, "Please use registerForRemoteNotifications and registerUserNotificationSettings: instead");

// Returns the enabled types, also taking into account any systemwide settings; doesn't relate to connectivity.

- (UIRemoteNotificationType)enabledRemoteNotificationTypes NS_DEPRECATED_IOS(3_0, 8_0, "Please use -[UIApplication isRegisteredForRemoteNotifications], or -[UIApplication currentUserNotificationSettings] to retrieve user-enabled remote notification and user notification settings");

@end

//

所以在ios8中应该用的新的注册通知的代码:

C代码  
  1. // IOS8 新的注册api
  2. if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
  3. {
  4. [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings
  5. settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge)
  6. categories:nil]];
  7. [[UIApplication sharedApplication] registerForRemoteNotifications];
  8. }
  9. else
  10. {
  11. //原来注册通知的代码
  12. [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
  13. (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
  14. }

原本在IOS7当中 判断push是否打开的方法是:

Java代码  
  1. UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
  2. return (types & UIRemoteNotificationTypeAlert);

如果将这段代码使用在 IOS8当中,虽然不会出现crash的现象,但永远返回空。 在IOS8中,我们使用如下的新代码来取代以上的代码:

Java代码  
  1. +(BOOL)enabledRemoteNotification{
  2. UIRemoteNotificationType types;
  3. if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
  4. {
  5. types = [[UIApplication sharedApplication] currentUserNotificationSettings].types;
  6. }
  7. else
  8. {
  9. types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
  10. }
  11. return (types & UIRemoteNotificationTypeAlert);
  12. }

ios 8 - buttons in horizontal scroll view intercepting pan event - scroll does not work

含有uibutton的ScrollView在iOS8中无法滚动的解决办法:

Java代码  
  1. theScrollView.panGestureRecognizer.delaysTouchesBegan = theScrollView.delaysContentTouches

转载:http://justsee.iteye.com/blog/2123545

iOS 启动画面设置相关推荐

  1. VC四种程序启动画面的制作方法

    使用启动画面一是可以减少等待程序加载过程中的枯燥感(尤其是一些大型程序):二是可以用来显示软件名称和版权等提示信息.怎样使用VC++制作应用程序的启动画面呢?本文提供四种方法,前三种适用于基于文档的应 ...

  2. 进阶~Qt程序启动画面

    今天又把教程视频看了一遍,这次学的是程序启动画面设置方法,以下是源码: #include"mainwindow.h" #include #include"QPixmap& ...

  3. 进阶~Qt程序启动画面_vortex_新浪博客

    今天又把教程视频看了一遍,这次学的是程序启动画面设置方法,以下是源码: #include"mainwindow.h" #include #include"QPixmap& ...

  4. Unity功能记录(十四) ------ 启动画面

    今天换启动画面时美术给了好多图,但是很神奇要不是拉伸要不就是有边框,比如以下: 整了好久,都不知道为什么,透明图更离谱,还拉伸了,查看官方文档才发现要怎么修改 Unity Splash Screen设 ...

  5. Android 12 新APP启动画面(SplashScreen API)简介源码分析

    以往的启动画面 默认情况下刚启动APP时会显示一会白色背景 如果把这个启动背景设置为null,则一闪而过的白色会变成黑色 如果把启动Activity设置为背景透明[< item name=&qu ...

  6. ios添加 启动画面_iOS 两种设置启动图方式的 bug 汇总

    楼主最近几天一直在纠结这个,忙到最后发现是 Apple 的锅,臣妾真搞不定呀 1.单独使用 LaunchImage 来设置启动图时: ①iOS9 系统的手机,在 APP 从后台通过 openURL 拉 ...

  7. 在ios桌面添加web站点图标及增加启动画面

    虽然没有能力开发Native App,但还是可以利用iOS中Safari浏览器的特性小小的折腾一下,做一个伪Web App满足下小小的虚荣心的. 既然是在iOS中的Safari折腾的,那么代码中利用到 ...

  8. iphone 应用程序图标、启动画面、itune图标等设置

    转自:http://blog.csdn.net/bl1988530/article/details/6698120 先说说应用程序图标,一般有下面几种: Icon.png(57x57) - Homes ...

  9. iOS App的图标,启动画面及其它

    注意: 最新的图标尺寸和文件名规格以Apple的文档为准:Technical Q&A QA1686: App Icons on iPad and iPhone .其中要注意,iTunesArt ...

最新文章

  1. 11月15日BCH协议升级提案又双叒啜来了,请查收!
  2. 设置tomcat 编译文件位置【转】
  3. ZOJ-1101-Gamblers
  4. matlab中的scramble函数,matlab 中 hold on 和hold off的使用
  5. file_get_contents请求失败处理_SpringCloud Gateway网关处理请求过程中遇到400Bad Request问题解决方案...
  6. iPhone 13供需接近平衡,iPhone 13 Pro交付时间较长
  7. RobotFramework安装扩展库包autoitlibrary(四)
  8. Java基础(二):基本数据类型和变量类型
  9. [RL] 使用 dockerfile 构建 atari 环境
  10. C++两种单例(饿汉式,懒汉式)
  11. 计算机模块的概念,用户定义类模块概念-计算机二级-Access
  12. 一个计算机高手的成长zz
  13. [揭秘]如何通过“人工智能”对直播的内容风险防控
  14. 海量存储之十九--一致性和高可用专题
  15. Confluence 6 恢复一个空间
  16. 干货3分钟搞懂私募投以及技术面试
  17. 互联网产品经理的职责
  18. 奥西450的服务器系统,奥西TDS450驱动
  19. 主干(trunk)、分支(branch )、标记(tag) 用法示例 + 图解
  20. dva的用法_dva基本用法

热门文章

  1. python编码格式 兼容中文_python中文编码(汉字乱码问题解决方案)
  2. Auto.js脚本开发入门
  3. 论文投稿指南——中国(中文EI)期刊推荐(第4期)
  4. (适配方案总结)客户薅公司两台ipad,我还要给做适配?
  5. matlab分频.m,分频器m是什么意思 音响分频器m. TW那个代表高音那个代表是低音?...
  6. 利用PL/SQL查询:员工工资的等级
  7. 恢复云数据库MySQL的备份文件到自建数据库总结
  8. 七:对微服务配置中心的理解
  9. linux实训心得体会范文
  10. Linux 服务器部署 vue(SPA) 与 nuxt(SSR)项目