Programmatically:
let image = UIImage(named: "image")
btn.setImage(btnImage , forState: .normal)
Storyboard:
Select your image > Attributes inspector > Image
More Related Contents:
- Reset Score Button iOS
- Issue while adding action to UIButton in Swift 3.0
- How to create a button programmatically?
- detecting uibutton pressed in tableview: Swift Best Practices
- Adding a closure as target to a UIButton
- How can you rotate text for UIButton and UILabel in Swift?
- Round Top Corners of a UIButton in Swift
- Make a UIButton programmatically in Swift
- Passing Image to another View Controller (Swift)
- How to detect one button in tableview cell
- How to change the tint color of the clear button on a UITextField
- Swift – UIButton with two lines of text
- How do I set UIButton background color forState: UIControlState.Highlighted in Swift
- Changing text of UIButton programmatically swift
- How to change UIButton image in Swift
- Change button background color using swift language
- UITableViewCell Buttons with action
- Make custom button on Tab Bar rounded
- How could I select music files in iOS app [closed]
- How can I convert string date to NSDate?
- How can I use UserDefaults in Swift?
- How to change the background color of a UIButton while it’s highlighted?
- Swift native functions to have numbers as hex strings
- Xcode Canvas for SwiftUI previews does not show up
- Swift – Integer conversion to Hours/Minutes/Seconds
- Button in UITableViewCell not responding under ios 7
- iOS11 photo library access is possible even if settings are set to “never”
- Xcode 8.1 Push Notifications in swift 2.3 with firebase integration not getting?
- How to filter Firebase data in Swift?
- Duplicate Symbol Error in NSManagedObject Subclass