UIActivityViewController. How to customize it? - ios

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. :)

Related

How to create a group in the UIAlertController

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

Create actionsheet similar to Contacts app

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

Is there a way to get a reference of a UIActivity item view inside a UIActivityViewController?

Let say I've a UIActivityViewController that I created with some UIActivity objects (e.g. a Share with Facebook activity).
When I present it, it'll show a component (don't know if a UIView or something else) for each UIActivity. What I want to accomplish is to put a tooltip on top of it.
Is there a way to get a reference to that "view" or component or to simply fetch the exact position on the screen (runtime)?

iOS: Popping up custom UIView

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.

AlertView with Checkbox Control in iOS

I want to display an alert view dialog in ios with usual title, message and two buttons + additionally I need a check box with message like "Always show this". In apple HIG document, they stated better to use an action sheet or view controller instead of displaying more controls in an alertview. Any alternative options are there?
Thanks in advance
You can create Custom View in which you can you all the required control and if you want to show the you can also use nice animation to show them and also you can set some good graphics as well. So the best way is to create CustomView.
All the best !!!

Resources