I'm working with Apple's PhotoScroller sample code app.
In Apple's original code, a couple images are loaded into the scrollview from the application bundle via a plist (also in the bundle) that contains the image names.
I've modified the code to use ARC and allow new images to be added via UIImagePickerController. And instead of the images and plist being loaded from the app's bundle, they are loaded from the app's "Documents" folder.
Everything is working fine, except when I add a new image, the app must be restarted before it updates the scrollview allowing you to see the added image.
I'm guessing there's a method somewhere that I can call that will update the scrollview's data, but I've poured over Apple's code and haven't been able to find it. Does anyone know which method it is that needs to be called, or if a new one needs to be written, how I would go about doing that?
I've attached my modified version of the PhotoScroller app.
In Apple's original code, a couple images are loaded into the scrollview from the application bundle via a plist (also in the bundle) that contains the image names.
I've modified the code to use ARC and allow new images to be added via UIImagePickerController. And instead of the images and plist being loaded from the app's bundle, they are loaded from the app's "Documents" folder.
Everything is working fine, except when I add a new image, the app must be restarted before it updates the scrollview allowing you to see the added image.
I'm guessing there's a method somewhere that I can call that will update the scrollview's data, but I've poured over Apple's code and haven't been able to find it. Does anyone know which method it is that needs to be called, or if a new one needs to be written, how I would go about doing that?
I've attached my modified version of the PhotoScroller app.
Attachments
Last edited: