Showing posts with label uibutton. Show all posts
Showing posts with label uibutton. Show all posts

Wednesday, May 23, 2012

is it possible to update UIButton title/text programmatically?


I have a UIButton , that when pressed, brings up a new view where the user can change some settings. When the view is dismissed, I'd like to update the title/text of the UIButton to reflect the new state. I'm calling:

Friday, May 18, 2012

UIButton: how to center an image and a text using imageEdgeInsets and titleEdgeInsets?


If I put only an image in a button and set the imageEdgeInsets more close to the top, the image stays centered and all works as expected:

Tuesday, April 3, 2012

Is it even possible to change a UIButtons background color?


This one has me stumped.



Is it possible at all to change the background color of a UIButton in Cocoa for iPhone. I've tried setting the background color but it only changes the corners. setBackgroundColor: seems to be the only method available for such things.

Sunday, March 11, 2012

UIButton of type UIButtonTypeCustom will not display Title (iPhone)


I must have overlooked something completely obvious?? but my button displays its image and size correctly, but I simply can't get the Title to show up.

Thursday, March 8, 2012

Setting an image for a UIButton in code


How do you set the image for a UIButton in code?

Minimum sensible button size on iPhone


I'm designing an iPhone app that features a rather large set of onscreen rounded rect buttons. Given finger-based touchscreen UI, what do you think would be the smallest sensible button size? I need to fit as many of them as I can in the viewport without compromising the usability too much. Maybe there's an Apple-recommended minimum size? Right now it's 33x33, and it looked OK on a simulator, but I was playing with the app on a real phone last night, and it was awkward - the buttons felt too small.