Displaying 2 columns in UIActionSheet - ios

Is something like this possible? How?
Image made with some simple Photoshop.

It is not possible with the default UIActionSheet, However you can try custom control like
TweetBot like UIAlertView and UIActionSheet replacement for iOS

Create your own view controller with the desired view layout and animate the view when presenting. It's much easier than risking changing the default UIActionSheet look and feel.

Related

iOS tooltip image

I need to implement tooltip in my iOS App. I would like to use CMPopTipView but with plazn text I would like to have some image also and detect click on this tooltip and perform some action after that. Is this is not possible with CMPopTipView is there any way to do that?
If you write app for iPad you can use UIPopoverController with custom background class via property popoverBackgroundClass to make it looks like tooltip, and also any view as content for popover.
UIPopoverController Class Reference

Implementing a "context menu" with a grid of buttons

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/

Suppress darkening of main view when UIActionSheet displays

I have a UIActionSheet and when it displays it darkens the main view behind it, I am under the impression this is default behavior for an action sheet. My question is, how do I override this behavior to leave the main screen the same tint as it normally is? I'm assuming I do something like:
mainView.alpha = 1f;
Or something...I can't remember if alpha needs to be maxed or 0 to leave a screen with the same coloration/transparency. Anyways, if that is correct where should it happen? My action sheet is being called in place of a keyboard for a UITextField.
Thanks in advance.
You can't change this behavior. UIActionSheet is actually presenting a whole new view overtop of your view. It's this additional view that adds the tint. There is no API to change this.
Your best solution is to implement your own custom equivalent to UIActionSheet so it does exactly what you want.

Objective-C / iOS: PopOver

I´m using the UIPopOver in iOS, but mine looks like this:
but I want to make it look like this:
Please note that I DON´T want to use any 3rd-party-libary.
Maik
You can use UIPopoverBackgroundView to modify the design of your popover view.

Replacing container view of UIActionSheet with my custom view

I am developing an iPhone application in which I want to customize the action sheet with my own background image for action sheet and buttons.
I can write my own view which behaves like UIActionSheet. But, UIActionSheet by itself has some standard behavior like blocking orientation events. We might not be aware of such things. So, for safety purpose, it is better to have UIActionSheet itself; by replacing all its views with my custom view.
For this I have done the following things:
1. Create UIActionSheet. Call showOnView: on that action sheet.
2. Set the delegate as myController
3. In the delegate method willPresentActionSheet: remove all the subviews and add my custom view as action-sheet's sub-view
The problem is that I cannot get the animation affect of Action Sheet with my custom view, Because,UIActionSheet is animated before calling willPresentActionSheet (in showInView). If I override showInView and add my own animation I might miss the behavior like:
1. Blocking orientation events
2. Some of the views (the argument of showInView:) might no support orientation. I should be able to apply same orientation to my action-sheet in showInView.
Could someone help me out in achieving customization?
Thanks and Regards, Deepa

Resources