There is a task - in the loop we create the n-th number of the View .

  • add them as addSubview to self.view
  • save pointer to each View into array

The question is actually what - how to hittest through the hittest method hittest all the hittest this array and return the one on which the touch?

As far as we managed to figure out, the hittest method hittest through all the subview main subview and does not see the subview from the array.

  • show the code, how very strange it all sounds. - Max Mikheyenko
  • add view in loop? - Describe the problem, perhaps you did not approach the solution correctly. - Alexey Alybin
  • Friends, thank you, the issue is resolved. Understood - everything turned out to be easier - hittest returns the top element of exactly UIView. I added a UIImageView and went through them - MxTM

0