I'm having a trouble with override init() {}
method which is running in loop. Until it crash with 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)
}
what could be the trigger?
Before this class init was called. I have a var of that class initialize via var item = MyVar()
tracking with break point. it never goes out of that init and somehow continues to loop. :/
I hope someone could give me some advice. thanks.