Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

ios UIButton change image

var bRec:Bool = true

@IBOutlet weak var btnRec: UIButton!
@IBAction func btnRec(_ sender: Any) {
    bRec = !bRec
    if bRec {
        btnRec.setImage(UIImage(named: "MicOn.png"), for: .normal)
    } else {
        btnRec.setImage(UIImage(named: "MicOff.png"), for: .normal)
    }
}
Comment

PREVIOUS NEXT
Code Example
Swift :: Nested if...else Statement 
Swift :: swift set keyboard next functionality 
Swift :: swift array index of where 
Swift :: Swift Bitwise AND Operator 
Swift :: swift extension Array of element 
Swift :: debounce in swift 
Swift :: how to add corner in swiftui 
Swift :: parse int in swift 
Swift :: adding label to navigation bar 
Swift :: convert uiimage to data swift 
Swift :: value to value in sum 
Swift :: swift wait until condition is true 
Swift :: swift array in chunks 
Swift :: swift how to wait in a loop 
Swift :: swiftui divider remove padding 
Swift :: editbutton swiftui color text 
Swift :: swift check if array has duplicates 
Swift :: Swift Optional Binding (if-let 
Swift :: 95 dollars in rupees 
Swift :: Swift Nested Tuple 
Swift :: string swift 
Swift :: add placeholder to code snippets xcode 
Swift :: library not found for -lalan-sdk-react-native 
Swift :: remove child from scene swift 
Swift :: microsoft flight simulator uses which language 
Ruby :: ruby uuid 
Ruby :: dotenv-rails comments 
Ruby :: ruby get file folder 
Ruby :: max keys from hash ruby 
Ruby :: rails form fields 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =