标签:
altitudeAngle
当笔平行于平面时,该值为0
当笔垂直于平面时,该值为Pi / 2
estimatedProperties
当前触摸对象估计的触摸特性
返回值是UITouchPropertyies
updatedProperties
当前触摸对象已经更新的触摸特性
返回值是UITouchPropertyies
estimationUpdateIndex
当每个触摸对象的触摸特性发生变化时,该值将会单独增加
返回值是NSNumber
- PreciseLocationInView:
- PrecisePreviousLocationInView:
- azimuthAngleInview:
沿着x轴正向的方位角
当与x轴正向方向相同时,该值为0
当view参数为nil时,默认为keyWindow
- azimuthUnitVectorInView:
当前触摸对象的方向上的单位向量
当view参数为nil时,默认为keyWindow
UIForceTouchCapabilityUnknown
UIForceTouchCapabilityUnavailable
UIForceTouchCapabilityAvailable
UITouchTypeDirect
UITouchTypeIndirect
UITouchTypeStylus
UITouchPropertyForce
//获取第0个shortcutItem
id oldItem = [existingShortcutItems objectAtIndex: 0];
//将旧的shortcutItem改变为可修改类型shortcutItem
id mutableItem = [oldItem mutableCopy];
//修改shortcutItem的显示标题
[mutableItem setLocalizedTitle: @“Click Lewis”];
//获取当前应用程序对象
UIApplication *app = [UIApplication sharedApplication];
//获取一个应用程序对象的shortcutItem列表
id existingShortcutItems = [app shortcutItems];
//根据旧的shortcutItems生成可变shortcutItems数组
id updatedShortcutItems = [existingShortcutItems mutableCopy];
//修改可变shortcutItems数组中对应index下的元素为新的shortcutItem
[updatedShortcutItems replaceObjectAtIndex: 0 withObject: mutableItem];
//修改应用程序对象的shortcutItems为新的数组
[app setShortcutItems: updatedShortcutItems];
初始化函数
- initWithType:localizedTitle:localizedSubtitle:icon:userInfo:
- initWithType:localizedTitle:
属性
localizedTitle:NSString
- localizedSubtitle:NSString
- type:NSString
- icon:UIApplicationShortcutIcon
- userInfo:NSDictionary
初始化函数
+ iconWithType:
+ iconWithTemplateImageName:
+ iconWithContact:
@interface RootVC<UIViewControllerPreviewingDelegate>
{}
@end
@implementation RootVC
- (UIViewController *)previewingContext:(id<UIViewControllerPreviewing>)context viewControllerForLocation:(CGPoint) point
{
UIViewController *childVC = [[UIViewController alloc] init];
childVC.preferredContentSize = CGSizeMake(0.0f,300f);
CGRect rect = CGRectMake(10, point.y - 10, self.view.frame.size.width - 20,20);
context.sourceRect = rect;
return childVC;
}
- (void)previewContext:(id<UIViewControllerPreviewing>)context commitViewController:(UIViewController*)vc
{
[self showViewController:vc sender:self];
}
@end
[self registerForPreviewingWithDelegate:self sourceView:self.view];
iOS9 3DTouch、ShortcutItem、Peek And Pop技术一览
标签:
原文地址:http://www.cnblogs.com/LiLihongqiang/p/5597468.html