Top "Uibutton" questions

UIButton is a subclass of UIView for displaying buttons in iOS.

Create a button programmatically and set a background image

When I try creating a button and setting a background image in Swift: let button = UIButton.buttonWithType(UIButtonType.System) as …

ios swift uibutton
Is it 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 …

objective-c iphone cocoa-touch uibutton
iOS: UIButton resize according to text length

In interface builder, holding Command + = will resize a button to fit its text. I was wondering if this was possible …

ios uibutton
UIButton Image + Text IOS

I need a UIButton with image & text. Image should be in the top & text comes under the image …

ios iphone ipad uibutton
How to set the title text color of UIButton?

I tried changing the colors of the text for a button, but it's still staying white. isbeauty = UIButton() isbeauty.setTitle("…

ios swift uibutton
Attach parameter to button.addTarget action in Swift

I am trying to pass an extra parameter to the buttonClicked action, but cannot work out what the syntax should …

swift button uibutton
Detecting which UIButton was pressed in a UITableView

I have a UITableView with 5 UITableViewCells. Each cell contains a UIButton which is set up as follows: - (UITableViewCell *)tableView:(…

ios iphone uitableview uibutton
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 …

ios objective-c uibutton
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 …

ios iphone uibutton uicontrolstate
How to make UIButton's text alignment center? Using IB

I can't set the title of UIButton using IB as center. My title is multi line.It is giving like …

ios objective-c uibutton interface-builder