狠狠撸
Submit Search
Enhancements with 3D Touch
?
0 likes
?
3,529 views
Satoshi Ohki
Follow
既存アプリに3D Touchを導入した場合のTips
Read less
Read more
1 of 22
Download now
Download to read offline
More Related Content
Enhancements with 3D Touch
4.
? ? ? ? ?
7.
? ホームスクリーンから、ユーザー が頻繁することを素早く行うこ とが可能 ? 最後に閲覧したデータに、一回 でアクセスするような機能を提 供することが可能
8.
?
9.
? ?
11.
? 画面遷移せずとも、コンテンツ をプレビューすることが可能 ? 一回一回画面遷移して戻るを繰 り返さなくても、内容を覗ける ので内容を素早く確認可能
12.
? ? ?
14.
if ([self.traitCollection respondsToSelector:@selector(forceTouchCapability)] && self.traitCollection.forceTouchCapability
==UIForceTouchCapabilityAvailable) { self.previewingContext = [self registerForPreviewingWithDelegate:self sourceView:self.collectionView]; }
16.
- (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; // [...] }
17.
? ?
19.
- (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; } }
21.
? ? ? ?
Download