For example, if you have more than one object, which trigger the same action method, how can you identify the actual source of the event? Tag is a good solution. As shown in my previouse exercise "Change UIView.backgroundColor using UIColor".
UISlider *sliderRed = (UISlider *)[self.view viewWithTag:10];
UISlider *sliderGreen = (UISlider *)[self.view viewWithTag:11];
UISlider *sliderBlue = (UISlider *)[self.view viewWithTag:12];
Assign Tag using Interface Builder
In Interface Builder with the UIView object select, there is a Tag property in the Inspector pane, as shown in the figure. You can enter the value you want. And also you can check this Tag value in your code to identify the object.
