Ограничение жеста панорамирования заданной рамкой

Производительность itemgetter немного лучше:

>>> f1 = lambda: sorted(w, key=lambda x: x[1])
>>> f2 = lambda: sorted(w, key=itemgetter(1))
>>> timeit(f1)
21.33667682500527
>>> timeit(f2)
16.99106214600033
0
задан Derek Saunders 6 March 2019 в 15:05
поделиться

1 ответ

Вам может понадобиться добавить метку в imageView здесь.

  override func viewDidAppear(_ animated: Bool) {
    // imageHolder is UIImageView.

    imageHolder.clipsToBounds = true
    imageHolder.backgroundColor = UIColor.black

    //the label is called labelView here

      imageHolder.addSubview(self.labelView)
      imageHolder.isUserInteractionEnabled = true
     self.labelView.isUserInteractionEnabled = true


}

enter image description here

0
ответ дан E.Coms 6 March 2019 в 15:05
поделиться
Другие вопросы по тегам:

Похожие вопросы: