IBOutlet is nil inside custom UIView (Using STORYBOARD)

前端 未结 7 1571
忘掉有多难
忘掉有多难 2020-12-25 13:22

I have a custom UIView class. Inside it I have declared an IBOutlet property for UIImageView.

#import 

        
7条回答
  •  情歌与酒
    2020-12-25 13:47

    Override awakeFromNib in your view - this is the first lifecycle method to be called after the IBOutlets have been assigned and is the right place for your code.

提交回复
热议问题