最近添加原生擴展功能,如圖:
而在當前Xcode8.2.1中,擴展的NSlog無法顯示在Xcode中,最後從Stackoverflow得知,可以打開Mac的console.app查看在手機上的打印。
console.app
另:
- (void)didSelectPost { }
中必須以[self.extensionContext completeRequestReturningItems:@[] completionHandler:nil];結束。
[self.extensionContext completeRequestReturningItems:@[] completionHandler:nil];
-(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtInde