0

This question is a follow up to: Can't link connector from IBOutlet to View Controller

I would now like to link another object of UIImageView called image, defined in class B to the same UIImageView on the ViewController. I wasn't able to do this using the same method. I imagine this is because, the UIImageView on the ViewController is now of custom class B, and the object image is an instance of UIImageView. I tried to cheat xcode by changing back the custom class of the UIImageView to UIImageView; doing that not only gave me an exception but I also couldn't see the object 'image' in the black box anymore. Any suggestions?

Community
  • 1
  • 1
  • 1
    You should either make this a stand-alone question or add it to the linked question and delete this question. – zaph Apr 02 '15 at 18:46
  • Yeah this question should be able to stand on its own. Linking back to the original question is fine, but the title of the question should be specific to this question, not the original one. – Brian Sachetta Apr 03 '15 at 02:18
  • With that said, I'm not 100% sure I know what you're asking. Are you trying to add a subview to your B class? – Brian Sachetta Apr 03 '15 at 02:19
  • No, I'm not trying to add a subview. I have a UIImageView on a ViewController, to which I had previously connected an IBOutlet declared in AviewController, which was an instance of class B. To do this, I had changed the custom class of the UIImageView to class B. (Since the IBOutlet concerned was an instance of class B) Now, I have an IBOutlet declared in class B (in the h file), which is an instance of UIImageView. How do I connect this to the UIImageView? – Aniket Deshpande Apr 03 '15 at 02:56

0 Answers0