How to show a popup(see image) in iOS - ios

Just starting out with iOS developing in Swift so I'm not certain how to call this thing.
What I'm trying to accomplish is a choice like the image below.
What is it called and where do I start?

UIActionSheet is what you are searching for.
Be careful because it's deprecated since iOS 8 but the reference links to the replacement as well.
in iOS 8 and later, instead use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet.

Related

What type of UI component is this?

I see this type of action sheet on iOS devices using the Google Drive application.
I want to know if it is already supported on iOS SDK or if it is a custom UI?
If it is already a standard component, what's name of it?
It was called UIActionSheet before iOS8 and after you can find this UI component under the UIAlerController. You can use this component to make some UI like this but development target should be more that iOS8.
You can check here for documentation.
I'm not aware of any custom components, but it looks to me like a standard UIAlertController with a ActionSheet style. As the alert controller extends UIViewController, you may add subviews to it.
The screenshots indicate that they added a UITableView as a subview to the alert controller:
Ok, got it. It's only for iOS 8 and later. It's named UIDocumentPickerExtensionViewController.

iOS UIPickerView - Appearance

Is there any way to get the picker view in Xcode 6 to appear as it was in Xcode 4?
(source: timroadley.com)
(source: developpez.com)
Thank you.
As mentioned, the newer versions of iOS spot the plain-white picker view with just a focus window. To improve the aesthetics, to a look somewhat similar to the earlier versions, simply add a suitable background image to the control.

UIActionSheet on iOS8

I have an app that connects to Chromecast - I referenced from the Chromecast Sample Code which uses UIActionSheet to display the list of Chromecast devices I can connect to.
This was working well for my app which has been running with BaseSDK=iOS6.1. Recently I tried to upgrade to BaseSDK=iOS8.1 and the UIActionSheet doesn't show anymore.
I understand that it has been deprecated in iOS8, but does that mean it wont work anymore? I thought deprecated methods typically take some time to "phase out".
So my main questions are:-
Can I still use only UIActionSheet? Is it just a matter of view hierarchies being changed which is why my ActionSheet is not showing anymore?
If the answer to question 1 is NO, what can I do to allow compatibility with both iOS7 and iOS8.
With iOS8.1 sdk UIActionSheet is deprecated, you should do runtime check to see if it is available and act accordingly using correct class:
if objc_getClass("UIAlertController") != nil {
// UIAlertController is available use it with style UIAlertControllerStyleActionSheet
} else {
// no UIAlertController use regular old action sheet
}
For iOS8 and you above, you will have to migrate to the UIAlertController for both the action sheet and alert pop up.
In all honesty, I find the new API easier to work with. There is a little more here (in Swift, but not any harder in Objective C).

Is there an iOS equivalent of NSRunAlertPanel?

I am trying to, when a button is pressed, a small menu comes up, like NSRunAlertPanel in Cocoa. It is like in iOS, when you press reset, it gives you options to continue, or go back. Image:
How do I do this?
As noted above, the answer to this is UIActionSheet in iOS < 8 and UIAlertController for iOS >= 8. Easier to grab a library that's abstracted that away for you; these look good.
Objective-C: MSAlertController for iOS
Swift: SimpleAlert for iOS

iOS dialog message box like drop down list

Hi, I'm using objective-c sorry for image language i want to learn dialog box name. I researched but i could not found "Şifreni mi Unuttun ?" "Yardım Merkezi" "iptal" how can i display this box.
That's a UIAlertController with a preferredStyle property of UIAlertControllerStyleActionSheet.
There's a great tutorial for how to use UIAlertController in iOS 8 here: http://nshipster.com/uialertcontroller/.
That is a UIActionSheet. Or in iOS 8 use a UIAlertController (it is better).

Resources