Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kexu

macrumors newbie
Original poster
Oct 14, 2011
7
0
I want to make a custom button (a button other than UIButton). For example, in games, their menus are generally composed of unique buttons that are not the white-with-a-blue-outline style of UIButton.

How can I make these? Are they images or something?

I want them to trigger methods that create new views.
 

jnoxx

macrumors 65816
Dec 29, 2010
1,343
0
Aartselaar // Antwerp // Belgium
... if u take a standard UIButton, set his style to Custom, it has no borderline, and is clear, then you can assign images. So don't really need to make your own buttons.. Have you checked any iOS development tutorials?
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
Buttons can have a title or an image. They can also have a background image and a background color. So you can have text over the background image. These properties can be set for different states of the buttons so they change when the user taps the button.
 

kexu

macrumors newbie
Original poster
Oct 14, 2011
7
0
Oh ok so I can actually edit the UIButton's properties properties to look like an image? Thanks...the book I'm reading hasn't covered that.
 

firewood

macrumors G3
Jul 29, 2003
8,108
1,345
Silicon Valley
The most custom way is to just draw whatever you want in the larger view, and then check the XY location of any touch event in the view for hits in your custom location rects. Handle, animate, and/or redraw as desired.
 

kexu

macrumors newbie
Original poster
Oct 14, 2011
7
0
iOS Programming: The Big Nerd Ranch Guide: 2nd Edition.

They might cover it, but if they do I haven't reached it yet. I skimmed through and it doesn't appear to.

Sorry...I sort of just started with programming and it's getting really confusing.
 

firewood

macrumors G3
Jul 29, 2003
8,108
1,345
Silicon Valley
Oh ok so I can actually edit the UIButton's properties properties to look like an image? Thanks...the book I'm reading hasn't covered that.

The "book" you want to read is Apple's Cocoa Touch reference documentation for any class you might want to customize or use.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.