I have created an application using the new Twitter framework in iOS 5, however I am struggling to add a feature to allow my users to add a photograph from the camera roll / take with camera.
Can anyone point me in the right direction? Obviously I know I can use;
[tweetSheet addImage:[UIImage imageNamed:@"myImage.png"]];
to add an image, but that is direct from the bundle as opposed to bringing up the devices camera roll. I have tried messing around with UIImagePickerController but I cant get it functioning so not sure if I am barking up the wrong tree or if there is a set method in the Twitter framework for this?
Thanks
You can access the camera roll with the
UIImagePickerControllerwhich is the stock iOS object for this.Then when you implement the delegate method
As the url is an asset URL rather than an absolute path.
You can use the info in this answer display image from URL retrieved from ALAsset in iPhone to access the hires image.