• 



•
•
• ホームスクリーンから、ユーザー
が頻繁することを素早く行うこ
とが可能

• 最後に閲覧したデータに、一回
でアクセスするような機能を提
供することが可能
•
•
•
• 画面遷移せずとも、コンテンツ
をプレビューすることが可能

• 一回一回画面遷移して戻るを繰
り返さなくても、内容を覗ける
ので内容を素早く確認可能
•
•
•
if ([self.traitCollection
respondsToSelector:@selector(forceTouchCapability)] &&
self.traitCollection.forceTouchCapability ==UIForceTouchCapabilityAvailable)
{
self.previewingContext =
[self registerForPreviewingWithDelegate:self sourceView:self.collectionView];
}
- (UIViewController *)previewingContext:(id<UIViewControllerPreviewing>)previewingContext
viewControllerForLocation:(CGPoint)location {
UICollectionView *collectionView = self.collectionView;
NSIndexPath *indexPath = [collectionView indexPathForItemAtPoint:location];
if (!indexPath) {
return nil;
}
if (![self collectionView:collectionView shouldSelectItemAtIndexPath:indexPath]) {
return nil;
}
UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath];
previewingContext.sourceRect = cell.frame;
// [...]
}
•
•
- (UIViewController *)previewingContext:(id<UIViewControllerPreviewing>)previewingContext
viewControllerForLocation:(CGPoint)location {
// [...]
UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath];
previewingContext.sourceRect = cell.frame;
[cell resetAllGestures]; // <-
// [...]
}
// [...]
- (void)resetAllGestures {
NSMutableArray *gestures =
[NSMutableArray arrayWithArray:self.tileItemView.gestureRecognizers];
[gestures addObjectsFromArray:self.listItemView.gestureRecognizers];
for (UIGestureRecognizer *recognizer in gestures) {
recognizer.enabled = NO;
recognizer.enabled = YES;
}
}
•
•
•
•
Enhancements with 3D Touch

Enhancements with 3D Touch