tags:

views:

444

answers:

3

I've been looking through the iPhone's UI catalog and cant seem to find what I'm looking for.

Essentially I want a customizable version of the 'in call' menu as found on the iPhone so I can use my own icons and call my own functions.

Example of 'in call' menu: http://cache.gizmodo.com/assets/resources/2007/08/call-vodafone.jpg

UIAlertView is the nearest thing I have found to it but it is still a way off from what I want. A friend said that someone had coded an open source version but he couldn't recall where it was. I've looked but can't find it.

Any ideas?

+2  A: 

You won't find a way to do this using the standard SDK-provided controls.

Instead, you'll need to create your own custom view and display that when you need it.

August
+1  A: 

There are no in-built components for this. UIAlertView should just have text and buttons as per the HIG document.

You will have to create your own view and add controls to it. The HeadsUpUI example in the SDK shows how to show a custom menu-like view as an overlay.

Hope that helps.

lostInTransit
A: 

If you break it down this problem isn't so bad.

Create a new subclass of UIViewController to control the big pad of buttons in your example, say ButtonPadViewController.

Then create another new UIViewController sublass which will handle a single button, say ButtonViewController. Each ButtonViewController will have a UIImageView. You can have this view load the image for the button. Since each view is a separate button, you can also easily detect any Touches on this view. You could say that if you get a touchesEnded call that the user has tapped this particular button.

Back to your ButtonPadViewController now, you can create six instances of ButtonViewController and add their views as subviews to view managed by ButtonPadView.

For the finishing touches, your ButtonPadViewController's view needs to be partly transparent and have rounded corners. The Buttons themselves only need to draw the button text and icon.

Paul Robinson