That did not work. Could it be because the tap gets intercepted by some of the gesture recognizers. I have 3 in local scope inside the class but not inside a function.
Code Block let postsTap = UITapGestureRecognizer(target: self, action: #selector(homeVC.postsTap)) |
postsTap.numberOfTapsRequired = 1 |
header.posts.isUserInteractionEnabled = true |
header.posts.addGestureRecognizer(postsTap) |
|
let followersTap = UITapGestureRecognizer(target: self, action: #selector(homeVC.followersTap)) |
followersTap.numberOfTapsRequired = 1 |
header.followers.isUserInteractionEnabled = true |
header.followers.addGestureRecognizer(followersTap) |
|
|
let followingsTap = UITapGestureRecognizer(target: self, action: #selector(homeVC.followingsTap)) |
followingsTap.numberOfTapsRequired = 1 |
header.followings.isUserInteractionEnabled = true |
header.followings.addGestureRecognizer(followingsTap) |
|
return header |