0

override init() {}在循环运行的方法上遇到问题。直到它与exc_bad_access.

override init() {
    super.init()
    self.container = UIView()
    self.container.clipsToBounds = false

    println("self.container: \(self.container)")
    self.addSubview(self.container)

    self.contentCenter = CGPointZero
    self.contentScale = 1
    refreshContentTransform()

    self.panRecognizer = UIPanGestureRecognizer(target: self, action: Selector("handlePan:"))
    self.panRecognizer.maximumNumberOfTouches = 1
    self.panRecognizer.minimumNumberOfTouches = 1
    self.addGestureRecognizer(self.panRecognizer)

    self.pinchRecognizer = UIPinchGestureRecognizer(target: self, action: Selector("handlePinch:"))
    self.addGestureRecognizer(self.pinchRecognizer)
}

什么可能是触发器?

在调用此类 init 之前。var item = MyVar() 我有一个通过断点跟踪来初始化该类的变量。它永远不会退出那个初始化并且以某种方式继续循环。:/我希望有人能给我一些建议。谢谢。

4

0 回答 0