关闭

iOS 新特性分列式 之 iOS 9.1 - 主要内容:苹果笔 API 引入

2048人阅读 评论(0) 收藏 举报
分类:

iOS 新特性分列式 之 iOS 9.1 - 主要内容:苹果笔 API 引入

太阳火神的美丽人生 (http://blog.csdn.net/opengl_es)

本文遵循“署名-非商业用途-保持一致”创作公用协议

转载请保留此句:太阳火神的美丽人生 -  本博客专注于 敏捷开发及移动和物联设备研究:iOS、Android、Html5、Arduino、pcDuino否则,出自本博客的文章拒绝转载或再转载,谢谢合作。



=======================================

iOS 9.1


    Live Photos

    Support for Apple Pencil

=======================================


This article summarizes the key developer-related features introduced in iOS 9.1, which runs on currently
shipping iOS devices. The article also lists the documents that describe new features in more detail.
For late-breaking news and information about known issues, see iOS 9.1 Release Notes . For the complete list
of new APIs added in iOS 9.1, see iOS 9.1 API Diffs . For more information on new devices, see iOS Device
Compatibility Reference .



Live Photos


Live Photos is a feature of iOS 9 that allows users to capture and relive their favorite moments with richer
context than traditional photos. When the user presses the shutter button, the Camera app captures much
more content along with the regular photo, including audio and additional frames before and after the photo.
When browsing through these photos, users can interact with them and play back all the captured content,
making the photos come to life.
iOS 9.1 introduces APIs that allow apps to incorporate playback of Live Photos, as well as export the data for
sharing. The Photos framework includes support to fetch a PHLivePhoto object from the PHImageManager
object, which is used to represent all the data that comprises a Live Photo. You can use a PHLivePhotoView
object (defined in the PhotosUI framework) to display the contents of a Live Photo. The PHLivePhotoView
view takes care of displaying the image, handling all user interaction, and applying the visual treatments to
play back the content.
You can also use PHAssetResource to access the data of a PHLivePhoto object for sharing purposes. You
can request a PHLivePhoto object for an asset in the user’s photo library by using PHImageManager or
UIImagePickerController. If you have a sharing extension, you can also get PHLivePhoto objects by
using NSItemProvider. On the receiving side of a share, you can recreate a PHLivePhoto object from the
set of files originally exported by the sender.
The data of a Live Photo is exported as a set of files in a PHAssetResource object. The set of files must be
preserved as a unit when you upload them to a server. When you rebuild a PHLivePhoto with these files on
the receiver side, the files are validated; loading fails if the files don’t come from the same asset.
To learn how to give users a great experience with Live Photos in your app, see Live Photos.



Support for Apple Pencil


iOS 9.1 引入了一些 API 用于帮你联合预判苹果笔在支持的设备上产生的触摸手势。特别是,UITouch 类包含的:

iOS 9.1 introduces APIs that help you use coalesced and predictive touches that can be produced by Apple
Pencil on supported devices. Specifically, the UITouch class includes:


preciseLocationInView: 和 precisePreviousLocationInView: 方法给出精确的触摸位置(当可用时)
   The preciseLocationInView: and precisePreviousLocationInView: methods, which give you
the precise location for a touch (when available)

altitudeAngle 属性 和  azimuthAngleInView: 以及 azimuthUnitVectorInView: 方法帮你确定笔尖的高度和方位角
   The altitudeAngle property and the azimuthAngleInView: and azimuthUnitVectorInView:
methods, which help you determine the altitude and azimuth of the stylus

● The estimatedProperties and estimatedPropertiesExpectingUpdates properties, which help
you prepare to update touches that are estimated

● The UITouchTypeStylus constant that’s used to represent a touch received from a stylus.


For an example of some ways to take advantage of these APIs in your app, see the sample project TouchCanvas:
Using UITouch efficiently and effectively . To learn how to add 3D Touch segues to your views, see Adding 3D
Touch Segues.




补充:

由官网截图可以看得出,笔头好像是可短距伸缩的,不知道传说中的压感级别是不是指这个,还是最新的触摸屏就已经支持压感力度级别分级识别了。

后续考证再补充。





3
0
查看评论
发表评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场

iOS 新特性分列式 之 iOS 9.1 - 主要内容:苹果笔 API 引入

转载请保留此句:太阳火神的美丽人生 - 本博客专注于 敏捷开发及移动和物联设备研究:iOS、Android、Html5、Arduino、pcDuino,否则,出自本博客的文章拒绝转载或再转载,谢谢合...
  • qq_29284809
  • qq_29284809
  • 2015-11-19 08:43
  • 409

iOS应用新特性界面

// // XTXGuideViewController.m // 新特性界面 // // Copyright © 2016年 LongChuang. All rights reserved. ...
  • sinat_20559947
  • sinat_20559947
  • 2016-08-09 01:10
  • 932

iOS程序更新后新特性介绍界面的实现

今天一起更新了好多软件,突然注意到每个软件更新版本之后都会先出现一个新版本功能引导提示界面,然后在跳转到正常的实现界面,那么如何做才能实现上述功能呢。 思路比较简单,最重要的一点就是如何判断用户是否第...
  • xgcyangguang
  • xgcyangguang
  • 2016-05-03 11:05
  • 1363

iOS 10 新特性

1.语音识别       苹果官方在文档中新增了API   Speech,那么在以前我们处理语音识别非常的繁琐甚至很多时候可能需要借助于第三方框架处理,那么苹果推出了这个后,我们以后处理起来就非...
  • u012938194
  • u012938194
  • 2016-07-11 22:12
  • 12778

iOS新特性之转场动画

UIViewControllerAnimatedTransitioning 这个类可以实现自定义控制器转场dong
  • xiaowenwen1010
  • xiaowenwen1010
  • 2014-07-08 13:50
  • 399

苹果原生地图API封装

// // HYBLocationManager.h // MMLocationManager // // Created by sixiaobo on 14-7-17. // Copyrig...
  • woaifen3344
  • woaifen3344
  • 2014-08-05 11:10
  • 3783

[iOS 10] 新的通知推送 API

iOS 10 最重要的变化可能就是通知 API 的重构了。本文用一个简单闹钟的例子介绍了 User Notification 的 API 变化和新功能。 《iOS 10 day by day...
  • chelongfei
  • chelongfei
  • 2016-09-26 09:48
  • 658

ios开发之iOS 11 SDK 的新特性

开发者所需要知道的 iOS 11 SDK 新特性 年纪大了过了能熬夜看 WWDC 的时代了,但是还是在小小宝的哭闹和妈妈大人换尿布的催促中起了个大早。于是算趁着“热乎”把 WWDC 2017 的...
  • ziyuzhiye
  • ziyuzhiye
  • 2017-06-07 14:47
  • 1985

IOS之新特性轮播

// //  LYFeatureLoopVC.m //  Fastapp // //  Created by wofu on 2017/11/9. //  Copyrig...
  • u011146511
  • u011146511
  • 2017-12-24 16:52
  • 31

献给初学iOS的小盆友们——微博app项目开发之五新特性界面

上几节课我们完成了更改系统tabBar 到完全自定义tabBar的转变,也完美的解决了导航条的功能和内容。本节课程,将会讲解新特性界面的搭建。顾名思义,新特性界面就是在用户第一次下载使用或者更新程序后...
  • sinat_23659935
  • sinat_23659935
  • 2016-01-21 22:53
  • 763
    个人资料
    • 访问:1332634次
    • 积分:17649
    • 等级:
    • 排名:第632名
    • 原创:338篇
    • 转载:285篇
    • 译文:131篇
    • 评论:136条
    金刚经
    博客专栏