iOS 7.1 removeFromSuperview crash

后端 未结 9 975
孤街浪徒
孤街浪徒 2021-02-05 13:40

My app didn\'t have any crash until iOS 7.1 came out. Now on any removeFromSuperview method, crash. For example: I got view controllers, and when I

9条回答
  •  时光说笑
    2021-02-05 14:12

    Try checking if the view is != nil first before removeFromSuperview example:
    @IBOutlet weak var btnSNSApple: UIView! if self.btnSNSApple != nil { self.btnSNSApple.removeFromSuperview() }

提交回复
热议问题