Reputation: 26
I’m try? iphone app. There is one ViewController which contains three same UIViews. UIViews are inherit from the one custom uiview class which i made in xib file and connect to ViewController. View contains a switch. How ViewController should recognize which views switch tapped user?
Upvotes: 1
Views: 132
Reputation: 13283
Welcome to Stackoverflow. Let's answer the key question in your post:
How can the ViewController recognize which views switch tapped user?
There are multiple ways for you or your controller know what view is what, which view did this or that, etc...
self.myView1.tag = 1
.From there you'll be able to make your all similar views distinguishable.
Upvotes: 1