I want to get back a button, I’ve already assign the tag to there, how can I do so?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the
viewWithTagmethod. e.g. if your button is in your controller’s view and your button’s tag is 100 the following line will return the button:EDIT:
Get view with particular tag in Swift –
If you want to make sure you have the specific type of view, say a UIButton, you should check the type: