Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

swift uibutton programmatically set ontap function

myButton.addTarget(self, action: #selector(myButtonTapped), for: .touchUpInside)
@objc func myButtonTapped() {
    print("My button was tapped!")
}
Comment

PREVIOUS NEXT
Code Example
Swift :: limit log file size swift 
Swift :: swiftui pintch to zoom 
Swift :: swiftui button transparent background 
Swift :: firestore subcollection swift 
Swift :: swift javascript injection 
Swift :: Return different data types swift 
Swift :: swiftui vstack alignment 
Swift :: Decimal to Double conversion in Swift 
Swift :: how to get current shown collectionview cell index in swift 
Swift :: swiftui steppers 
Swift :: power number in swift13 
Swift :: random number swift 
Swift :: swiftui scrollview 
Swift :: string.format swift 
Swift :: swift find difference between two arrays 
Swift :: Delete Realm database swift 
Swift :: uitextview placeholder uikit ios 
Swift :: transform string to url swift 
Swift :: swift pretty print json 
Swift :: swift constructor 
Swift :: initialize array with zero in swift 
Swift :: swift extension Array with type 
Swift :: swiftui hidden 
Swift :: struct vs class in swift 
Swift :: Swift Create String Instance 
Swift :: set color of indicator line in collectionview swift 
Swift :: To get IPAddress for wifi , wired, and cellular 
Swift :: Button on right side/view of UITextField 
Swift :: Swift Operator Associativity 
Swift :: Swift guard with multiple conditions 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =