iPhone - UIImagePickerController - How to allow user to pick the source? - iphone

I'm writing an application that uses UIImagePickerController. I'd like to give users choice of source of pictures, either take a new photo or choose from existing ones. I'd like to create exactly the same selection interface as is in twitterfon or in safari when you hold tap on the link. It looks like some standard SDK thing but I have completely no clue where to find some sample code. I've googled for hours and I have nothing.
I would really appreciate any tips.
Thank you

What you're looking for is the UIActionSheet. The documentation has everything you need to set one up and how to respond to which button is pressed.
You'll also want to use the constants defined for the UIImagePickerController sources, namely
UIImagePickerControllerSourceTypeCamera
UIImagePickerControllerSourceTypePhotoLibrary

That would be an UIActionSheet. Make sure to point its delegate property to your implementation of the UIActionSheetDelegate protocol to catch clicks on the buttons you define.

Related

Use default UIImagePickerController to take multiple photos without preview before dismissing - Swift

Been searching already, and there might be duplicates, but I don't have a clean solution for a newbie.
I want to use the default UIImagePickerController to take multiple photos only without showing the previews or dismissing the controller until I've taken a certain number of photos. Basically "clicking" away until you've taken, say, six photos. Then the Controller is dismissed.
Is there a way to do that without a custom class?
It is not possible using the default UIImagePickerController . You need to use a third party library to make this work.
Check This Links this may be helpful to you
How to select Multiple images from UIImagePickerController
How to pick multiple images from UIImagePickerController in ios

Recreating the iTunes (iOS app) tableViewCell which previews songs

I'm creating an app which would provide the user with a list of audio files and let them sample a small piece of audio when they select the song (just like the iTunes iOS app).
I love the way the iTunes iOS App has implemented it (image attached); wherein I can click on a cell and the album cover flips over to show a progress indicator and a stop button. I can select a cell and the sample starts to play, and the moment I stop it, the progress indicator flips back over to show the album/song art.
I'd like to create something like that for my app. Any suggestions on how I can go ahead with it.
Thanks a ton in advance! :D
EDIT: Based on Till's suggestion, I'm adding this edit. What I wish to get by asking this question is suggestions for the best approach to make the flip animation, showing a custom view in a UITableViewCell image space, possible. Currently, I'm not worried about playing the audio or displaying the progress of the playback. I simply need suggestions on the best approach to perform the flip animation and substitute the image with a custom UIView. :) Thanks again! :D
You will need to create it. I suggest making it as a custom tablecell. If you polish it well enought, you can put it on CodeCanyon and make it worth your while.
Also, I can recommend looking at the works on http://cocoacontrols.com/ - It might not have exactly this one, but it has many interesting controls and inspirations.
This is exactly what u looking for:
https://github.com/marshluca/AudioPlayer
You can also refer to some Sources :
https://github.com/lipka/LLACircularProgressView

How can I use a UIPickerView in my settings.bundle like how the 'nike+ ipod' app does it?

I can't see how this is possible from the documentation but here nike is doing it in their app so there must be a way.
It's impossible unfortunately. Apple developed it for Nike, so they used tricks of their own to do it. It might actually be possible, but it's certainly undocumented if possible. Impossible for an App Store app. Let us know if you figure out a way to do it even if it's undocumented.
If you use the library InAppSettingsKit, you can have a setting that uses a custom subview (a custom UIViewController) to display the choice to the user. So all you have to do is to create a custom view controller that looks just the one in your picture (it's basically just a UITableView and a UIPickerView).
In the example app that comes along with InAppSettingsKit, there is an example on how to use a custom subview.

IPhone SDK - How do I implement an Apple like rating UIAlertView?

Does anyone have an Idea how to implement an UIAlertView for rating purpose like Apple show when you are removing an app from the iPhone?
You can choose how many stars to rate the app or don't rate it at all.
I already have a view that shows the stars according to the user touches but don't know how to connect it to the UIAlertView...
Thanks!
A good tutorial how to do this:
http://iphonedevelopment.blogspot.com/2010/05/custom-alert-views.html
I like the TSAlertView. It's a complete replacement of UIAlertView based on UIView. So you don't use any private APIs.
I used it in multiple projects and I really like it. Take a look at it. With that one it should be easy to add your "starview" to the AlertView becuase you have methods to add a contentView.

Taking images from camera without user interaction?

I am creating an app in which, as soon as the UIImagePickerController loads (i.e. the camera view), it should start taking pictures without any click and store images in an array. How can I do this without clicking on the "shoot" button?
In reference library, UIImagePickerController contains an instance method, -takePicture. Can somebody tell me if this function will do the trick, if I call it through timer?
Thanks in advance.
-takePicture should do the trick in deed. You have to provider a custom UI for the camera controls, because otherwise (for me) it doesn't work. Check out the developer documentation in Xcode and search for takePicture. The method description has everything you need.