In one of my application, i want to create actionsheet similar to default contacts app. I am little bit confused about how to create this screen, is it default actionsheet provided by iOS or is it any custom screen. If it is default actionsheet, then how to implement multiline action as it is in following screen
I think this is a system action sheet with private api.
According to Apple official document for UIAlertController
The UIAlertController class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.
Because custom system action sheet is illegal so I'm pretty sure that you can't archive something like this by using system action sheet
You can create it yourself by an UIViewController with UIStackView or UITableView.
If you want some libraries, take a look at action sheet on Cocoa
Related
I have implemented an UIAlertController (currently using the XLActionController) with the look and feel as the builtin menu from the iOS Contacts app (see pictures below).
I want to add a submenu which "folds out" just like in the Contacts app (see picture 2)
The builtin Contacts app (see pictures) has a menu which contains a "group" which opens (animates) when clicked - revealing the siblings as showin in the second picture. When the header is clicked it closes (animates) and returns like shows in the first picture. (The below can be achieved installing a supported app like Skype for Business)
Is this possible to build using either the default UIAlertController or eg XLActionController
This answer does not solve your problem but it may help you find a solution.
You need to build a custom view controller transitions and presentations. Your viewController must be a subclass of UIPresentationController. Have a look at this tutorial.
UIPresentationController Tutorial
You can use also a simple UIView which contains a UITableView that you animate upwards/downwards. Have a look at this tutorial
How to Create a Slide-In Menu
In many apple watch apps during Apple's "Spring Forward" when the apps pushed to another interface controller, they looked like this:
Then the interface controller would load
I am perfectly aware that this screen appears when the app starts up, but I want to show the stock loading screen after I push an interface controller
**I do not want to use image sequencing to achieve this
Also apple has sample code you can download called "Lister" that shows the loading symbol after every interface controller push, without image sequencing
How can you achieve this??
TL;DR
Either use the system behavior in the "Hides When Loading" checkbox under the Attributes of the Interface Controller and let the system manage it like in the example code or...
Create your own interface controller that will have to use a image sequence.
Longer Explanation
Your confusing what's actually possible. The stock loading screen isn't something that you can actually call nor manipulate. It's the default loading animation for a controller that hasn't finished awakeWithContext:. That's why you see it in the example code.
You can actually control it in the storyboard. Select or deselect the "Hides When Loading" checkbox under the Interface Controller section of the Attributes of the Interface Controller.
However, if you want control over when/where, you will have to create your own and yes that does mean you have to use an image sequence. There really isn't another way to do that animation currently without an image sequence.
I'm writing an iPad app that houses some notes and I need to be able to add a note to the existing collection. I'd like to spawn a window to enter a new note. I'd like it to be something like UIAlertView (which doesn't allow any subclassing), something that pops up, allows entry and then can be dismissed. Is there an existing way to do that?
Add a UITextView to a UIPopoverController.
Read this question for a UIPopoverController example: Code to open a UIPopoverController
Check out the documentation for more information about UIPopoverController.
I would like to create a UIActivityViewController in my iPad application but I can't find anything on Google because it's a new view implemented only in iOS 6.
UIActivityView is a view that appears when a user tap, for example, the Share button inside Photos App.
A set of activities is presented by an activity view controller (Send via email, Share on facebook, print ecc...).
Each activity is represented by an icon and a title that appears below the icon.
Now I would like to custom the items inside the view but I can't find how to do it?
Any ideas?
There's no need to subclass UIActivityViewController. Instead, create your own UIActivity subclasses, and then instantiate UIActivityViewController with an array of your activities using:
- (id)initWithActivityItems:(NSArray *)activityItems applicationActivities:(NSArray *)applicationActivities;
REActivityViewController is probably what you are looking for. It also allows customizations more than UIActivityViewController. Try it. :)
In iOS, a popup is shown from time to time that asks the user to join a Wi-Fi network.
I want to implement a similar popup with custom contents
Title
TableView with a varying amount of entries (if too many, with scrollbar)
Cancel button
Popup over an existing view (the popup is smaller than the view)
How can such an effect be achieved? I guess that UIAlertView may be a good starting point. However, UIAlertView does not support subclassing
The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.
Not with the system UIAlertView. You have to code your own, or use an open source component.
This could be a starting point/example: BlockAlertsAnd-ActionSheets
Check this out, it is exactly the thing you need: github example project