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.
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 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
I'm wondering whether there's a better way of implementing a "context menu" in my app. This is a screenshot of how it currently looks like and as you can see, almost the entire screen is already filled up with entries:
This is actually a UIAlertView with multiple "other" buttons.
I wondered if it's possible to create sort of a grid layout within the alert view and add three buttons per row which show icons only, instead of labels (in order to save some space). I'd like to make it similar to this (photoshopped) layout:
I read that it's possible to create a popup with custom stuff in it by using a UIView but perhaps you guys know an easier trick of accomplishing the same thing with an UIAlertView.
Is this even possible with an alert view?
it's impossible to create an UIAlertView like this.. Create a new UIView and add it to your viewController with [self.view addSubview:..]
You should use UIActionSheet instead of UIAlertView in this case. Or you can use modalViewController something like this: http://timneill.net/2010/09/modal-view-controller-example-part-1/
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