может ли UITapGestureRecognizer
отрабатывать во время линейной анимации или при
анимации масштабирования...ежели может, то как запустить = ?
self.start = UIImageView(frame:CGRect(x: centerX + 0.0, y: centerY - 180.0, width: 2, height: 2))//=2
self.start.image = UIImage(named: bu[Int(arc4random_uniform(UInt32(bu.count)))])
self.view.addSubview(self.start)
UIView.animate(withDuration: 2.0, delay: 1.0, options: [ ], animations: {
self.start.frame = CGRect(x: centerX - 200.0, y: centerY - 400.0, width: 240, height: 240) },
completion:nil)
UIView.animate(withDuration: 2.0, delay: 3.0, options: [ ], animations: {
self.start.alpha = 0.1
self.start.frame = CGRect(x: centerX - 200.0, y: centerY - 400.0, width: 240, height: 240) },completion:
{animationFinished in self.start.removeFromSuperview() })
let tap = start
let doubleTapGestureRecognizer: UITapGestureRecognizer! = UITapGestureRecognizer(target: self, action: #selector(ViewController.doubleTapped(_:)))
doubleTapGestureRecognizer.delegate = self
doubleTapGestureRecognizer.numberOfTapsRequired = 2
tap!.addGestureRecognizer(doubleTapGestureRecognizer)
doubleTapGestureRecognizer.isEnabled = true
doubleTapGestureRecognizer.cancelsTouchesInView = true//false =???
self.view!.addSubview(tap!)
tap.isUserInteractionEnabled = true