I have 2 xib’s.
I want 2 different UIButtons to point to the same IBOutlet object. how can I managee that?
also I have this problem with UIImageView and UILabel.
thanks
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.
If you are saying you have two xib files, each xib has a button, where each of those buttons you want to connect to one IBOutlet – that’s very easy, as long as you only load one nib at a time.
In each nib, set up the file’s owner as the class that will be loading the nib. Now you can drag a connection from the button or label to that IBOutlet.
At runtime, you can choose which nib to load.
If you need to have both nibs loaded at the same time, then you have to have different names for the outlets or else one nib will “win” and the outlet will get just one of the two buttons.