UICollectionView 未在 iOS 10 中显示图像
UICollectionView not showing images in iOS 10
我的 UICollectionView
在所有版本 除了 在 iOS 10 中工作正常。我正在使用 UIImageView
来显示图像。
我在应用程序的 ContentFolder
中保存了图像。
我正在使用 NSData *imageData = [NSData dataWithContentsOfFile:filename];
获取图像数据并使用 UIImage *image = [UIImage imageWithData:imageData];
创建我想要显示的图像。
有人知道问题出在哪里吗?
将集合视图的 isPrefetchingEnabled
属性 设置为 false(在 iOS 10 中默认为 true)。
clipsToBounds 和 cornerRadius 可能会产生影响。这解决了我的问题。
我的 UICollectionView
在所有版本 除了 在 iOS 10 中工作正常。我正在使用 UIImageView
来显示图像。
我在应用程序的 ContentFolder
中保存了图像。
我正在使用 NSData *imageData = [NSData dataWithContentsOfFile:filename];
获取图像数据并使用 UIImage *image = [UIImage imageWithData:imageData];
创建我想要显示的图像。
有人知道问题出在哪里吗?
将集合视图的 isPrefetchingEnabled
属性 设置为 false(在 iOS 10 中默认为 true)。
clipsToBounds 和 cornerRadius 可能会产生影响。这解决了我的问题。