iOS8新特性

1.应用扩展(Extension)

使APP之间数据交互成为可能,无需离开当前应用。基于安全和性能的考虑,每一个扩展运行在一个单独的进程中,它拥有自己的bundle,bundle后缀名为appex,扩展bundle必须包含在一个普通应用的bundle的内部。

iOS8系统支持6个扩展的系统区域,分别是Today、Share、Action、Photo Editing、Storage Provider、Custom keyboard.支持扩展的系统区域也被称为扩展点。

Finder 扩展点只支持OS X,Today、Share、Action。


Today:widget

Share:可以自定义分享选项

Action:扩展性最强

Photo Editing:直接使用第三方美图程序。

Storage Provider:扩展检索存储文件

Custom Keyboard:自定义输入法


info.plist文件中包含了扩展的配置信息,其中最重要的键是NSExtension


****注意64-bit架构:

一个应用程序扩展在Architectures设置中必须要包含arm64的架构。


可以在Xcode的“Standard architectures”设置选项中选择arm64架构。



2.App开发时统一


3.iCloud相关

CloudKit/CloudKit.h

FMDB是数据库框架。可在数据平台上处理数据。

存储源的可变性


4.Handoff及其他iOS与Mac的协作开发

HomeKit:智能家居

HealthKit:健康


5.游戏方面

SceneKit:游戏方面

Metal渲染开发。


6.其他重要改动

弹窗需要用户许可

CoreLocation/CLLocation.h

Photos.framework:监听其他应用对照片的改动。

iOS8之后适配的机型要更多了。出了个sizeclass的类。

iOS8的UIAlert和actionsheet整合成了UIAlertController.

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//    UIAlertView;
//    UIActionSheet;
//    UIAlertController *ac = [[UIAlertController alloc] init];
//    ac.title = @"titlename";
//    ac.message = @"message";
    
    UIAlertController *ac = [UIAlertController alertControllerWithTitle:@"title1" message:@"title2" preferredStyle:UIAlertControllerStyleActionSheet];//alert style
    
    UIAlertAction *action = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
        NSLog(@"cancel");
    }];
    UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"Default" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
        NSLog(@"Default");
    }];
    UIAlertAction *action2 = [UIAlertAction actionWithTitle:@"Destructive" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
        NSLog(@"Destructive");
    }];
    
    [ac addAction:action];
    [ac addAction:action1];
    [ac addAction:action2];
    
    //显示方法遵循控制器的显示方法
    [self presentViewController:ac animated:YES completion:nil];
}


UIViewController新增一个扩展上下文的extensionContext属性是来处理containing app与拓展之间的通信,上下文类型是:NSExtensionContext






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值