3dtouch

```

//3Dtouch返回按的力量

if([touchrespondsToSelector:@selector(force)]) {

NSLog(@"force:%f", touch.force);

}

-(NSArray> *)previewActionItems

{

UIPreviewAction* action1 = [UIPreviewActionactionWithTitle:@"大"style:1handler:^(UIPreviewAction*_Nonnullaction,UIViewController*_NonnullpreviewViewController) {

PViewController*aaaa = [[PViewControlleralloc]init];

[[selftopViewController]presentViewController:aaaaanimated:YEScompletion:nil];

}];

NSArray* actions =@[action1];

return actions;

}

```

你可能感兴趣的:(3dtouch)