I know that "required init?(coder aDecoder: NSCoder)" is used when deserializing my object(which is created on storyboard), but is it correct to initialize IBOutlets in it? If not, where should do IBOutlets initialization?
No. IBOutlets are declared Optional so they already have a value, nil, and do not need to be initialized in your initializer. The outlets will be hooked up later in the nib-loading process, automatically.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more