Post

Replies

Boosts

Views

Activity

Reply to My App has wrong behavior when I used UICollectionView API - scrollToItemAtIndexPath.( ios15 beta4)
NSInteger row = indexPath.item + 1;   if (row > 0 && row < [self.dataSource collectionView:self numberOfItemsInSection:indexPath.section]) {         [UIView animateWithDuration:.3 animations:^{               [self scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:row inSection:indexPath.section] atScrollPosition:UICollectionViewScrollPositionNone animated:NO];               }];   }
Sep ’21
Reply to app crashed when creating album
__block PHObjectPlaceholder *placeholder = nil; [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ PHAssetCollectionChangeRequest *request = [PHAssetCollectionChangeRequest creationRequestForAssetCollectionWithTitle:title]; placeholder = request.placeholderForCreatedAssetCollection; } completionHandler:^(BOOL success, NSError *error) { if (resultBlock) { PhotoAlbum *resultAlbum = nil; if (placeholder) { PHFetchResult<PHAssetCollection *> *collectionResult = [PHAssetCollection fetchAssetCollectionsWithLocalIdentifiers:@[ placeholder.localIdentifier ] options:nil]; if (collectionResult.count) { resultAlbum = [[PhotoAlbum alloc] initWithPHAssetCollection:[collectionResult firstObject] options:[self assetFilterFetchOptions:self.fetchOption]]; } else { success = NO; error = [NSError errorWithDomain:kDomain code:AlbumNoFound userInfo:@{@"error" : [NSString stringWithFormat:@"没有找到标题为%@的相册", title]}]; } } dispatch_async(dispatch_get_main_queue(), ^{ resultBlock(success, error, resultAlbum); }); } }]; crash in this: PHFetchResult<PHAssetCollection *> *collectionResult = [PHAssetCollection fetchAssetCollectionsWithLocalIdentifiers:@[ placeholder.localIdentifier ] options:nil];
Apr ’24