I have a UIView that I call “second” inside another UIView called “one”.
At “second” I assign a class (class “Home.h” ) in the Inspector identity (Custom class).
The class work fine on “second” view and I have not problem.
My dubt now is how to access at element of Home by external class. If inside Home I set some variables (with properthy and synthesyze) I can’t control them from another class because it say me that class Home it’s not allocated…how can I solve this situation?
thanks
I am also pretty new to Objective-C and Xcode, but I believe all you have to do is import the header file of the “Home” class (Home.h) to the external class that you want to use it in. In this external class you would have to instantiate an object of the home class. Something that may look like this:
This declares memory for the an object of the “Home” class to be used within the ExternalClass.m… You would then have to assign the homeObject instance variable the class ‘aloc’ method for the Home class like this: