문제

I compiled and ran the MyImagePicker project from the WWDC 2010 sample code on my iPhone 3Gs with iOS 4.2.1, but it just gives me a blank table. Shouldn't it be populating with data from my photo roll?

Interestingly, I also get a blank table in the UIImagePickerController Clone from iCodeBlog.

Both of these projects apparently use the AssetsLibrary framework -- what am I missing here?

도움이 되었습니까?

해결책

I shouldn't have assumed that the picker would automatically select from the saved photos album.

Change the following line in RootViewController.m from:

NSUInteger groupTypes = ALAssetsGroupAlbum | ALAssetsGroupEvent | ALAssetsGroupFaces;

to:

NSUInteger groupTypes = ALAssetsGroupSavedPhotos;

to just get saved photos... It turns out that this isn't any better for my purposes than the stock UIImagePickerController, but it was a learning experience.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top