Swift Tutorial - Custom UIButton Class (Reusable)

preview_player
Показать описание
In today's beginner Swift tutorial I'll be explaining how to create a custom UIButton subclass so we can clean up those view controllers and make the custom UIButton reusable. I show you how to use this both programmatically and via Interface Builder (storyboard). This tutorial is in Swift 4.2 and Xcode 10.

Source Code:

If you like my teaching style, I've released my first iOS dev course which is all about the take-home project job interview for iOS developers.

My Book: How I Became an iOS Developer:

Check out my podcast, iOS Dev Discussions:

Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):

Ray Wenderlich Books:

Ray Wenderlich Videos:

Paul Hudson's Hacking With Swift:

Learn Advanced Swift Here:

Links to my Developer & YouTube Setup

Personal Links:

Twitter:

Instagram:
@seanallen_dev

Website:
Рекомендации по теме
Комментарии
Автор

Love the way you teach more advanced topics so that even a very junior dev can understand and keep up. As always, Thank you sir.

mikealgarvin
Автор

I like your coding presentation style. Its very neat and elegant by aligned, spaced, point-to-point, etc... will keep clear in understanding the story without any comment on the screen. Thanks for the coding discipline tips along with tech tips.

ucmasshankar
Автор

I...was...just...searching for this. From your last 3-5 videos I wanted to create a custom Button and Label for myself and now I know the UIButton part. at least. Also option drag to select multiple lines was new to me too Thanks🙏🏻

egesucu
Автор

This tutorial is really useful to understand more about classes and buttons. Thanks for the clear explanations!

ekawong
Автор

Great video! Nice to see the two methods side by side. Thanks!

gakkieNL
Автор

Love the bite size tutorials you’re throwing out.

Also just to add. You can place @IBDesignable into this custom class and you just need to override drawrect() which I believe you already did and you will see the changes in your story board once your button has been changed to the custom class in the inspector.

Keep up the good work Sean!

ajp
Автор

Thank you Sean. You really help me to get a grip on the iOs development with your lesson.

MrYozzik
Автор

As always, thanks for the tutorial, can't wait to get the point where I can implement design elements into my project!

staceymoore
Автор

Just want to point out how nice and clean your code is especially in Swift. Well aligned and indentation lol.

gibbsesouffrant
Автор

@Sean Allen Hey, just wanted to say you're an amazing teacher. 
Your code layout is tidy and love your presentation.
The way you explain things are easy to follow and logical.
Thank you for creating these videos for us

fadiham
Автор

I was just searching for this last night!

gorblesgames
Автор

12:38 No need to create IBOutlet for the button. Just sender.shake() will do the job. Great tutorial.

pankajverma
Автор

Hey Sean, I really enjoy your tutorials, they're incredibly useful! I was wondering if you could make a dedicated video for ViewControllers (eg: Table, Page, Split etc)? Just a basic overview about ViewControllers like how they work, and when are they suggested to use.

zheldor
Автор

Super like! I’m all about custom objects!!!

RyuuzakiJulio
Автор

Thanks @Sean Allen you're the best :)

thiagobutignonclaramunt
Автор

Awesome tutorial!
Great programming tool.
Time saver!

infinite
Автор

Great tutorial(s) ! A big help for beginners like me : a big THANKS !!!

charlyjapan
Автор

super tutorial. if i could like it once more I would.

keremyokuva
Автор

Hey Sean! Thanks for the great tutorial. Could you please do a tutorial on advanced refactoring in the future? Thank you!

Theasstasticvillain
Автор

When would you use an class as opposed to an extension? Thanks keep up the good work, you’ve been delivering nice tutorials very rapidly

arjunbemarkar