I have the line of code below… How would I modify it to insert the subview in the superview’s view named ‘foo’?
[[self superview] addSubview:copy3];
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.
There are more than 1 ways of doing this –
1.have an
IBOutletreference in your code. This is created from xcode Interface builder. Once you have this then it fairly straight forward –2.
tagthe view that you are interested in. Again tagging a view can be done from xcode Interface builder or from code. After that –3.Finally you can iterate through all the views in your superview & see which one is of type
Foo–hope these methods help you…