[ios]swift imageView tag UITapGestureRecognizer 설정방법
imageView에 tag 세팅하고..
UITapGestureRecognizer 에 등록 할 시??
#selector(clickTest(_:)
@objc func clickTest(_ sender: UITapGestureRecognizer)
{
if let imageView = sender.view as? UIImageView
{
print("sender -> \(imageView.tag)")
}
}
'ios,swift' 카테고리의 다른 글
[ios] example site (0) | 2020.01.30 |
---|---|
[ios] swift textfield 직접 입력하기 (0) | 2020.01.30 |
[ios] uiview child view hide 방법 (0) | 2020.01.30 |
[ios] swift scrollview scroll가능하게 (0) | 2020.01.30 |
[ios] swift percent 보여주는 방법 (0) | 2020.01.30 |