DEV Community

Discussion on: UIButtons in Swift

Collapse
 
lukeswitz profile image
Luke Switzer

Very general; Programmatic creation/events would prove a helpful addition for those who were taught without IB or use specific event listeners.

This is the link you want, stackoverflow not so much:
developer.apple.com/documentation/...

Collapse
 
neeraj15022001 profile image
Neeraj Gupta

Sure, will look into this

Collapse
 
lukeswitz profile image
Luke Switzer

Thanks! I realize that came off as snarky, but I only meant Stackoverflow often hosts outdated, deprecated or insecure code. I love the place & contribute often, but it does damage to novice devs on a path of true learning.

Apple docs are the most up to date info you’ll find while coding in Swift/Objective-C albeit lacking somewhat in teachable examples. Learning to code it out really teaches the power of UIKit by doing: maybe the best thing I did in 20 years was stop looking at examples and start looking at best practices.

Thanks for the post; an excellent intro to how simple it is to get started with native iOS dev.

Thread Thread
 
neeraj15022001 profile image
Neeraj Gupta

Thanks for the advice and appreciation. Gave me motivation to write more.

Collapse
 
neeraj15022001 profile image
Neeraj Gupta

Actually i quite didn't get these events i do read documtation but can you elaborate how we can combine events and buttons