We have all seen those big view controllers and especially viewDidLoad functions with a whole bunch of set up code in them. Well, there is a very simple idea you can use to clean at least some of it up and make things more readable in the process.
On properties, we can use didSet as a place to put our setup code in. In this video, I'll refactor a few simple set up lines of code back up into the IBOutlets and away from the view controller load function.
#swift #appdevelopment #xcode
Смотрите видео Using didSet on Swift properties to clean up viewDidLoad онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Peter Witham 12 Сентябрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 86 раз и оно понравилось 4 людям.