This may be a simple question, but I took one of my apps from a visual based application in a window based application. Gaya. In the original app, I had a view controller and a map. I had a class that parsed some data and it was sent to the view controller. I used the following code from class to send data to classbase, which adds an annotation.
Animation Probable App Delayed * App Delegate = (Annotation Problems App Delayed *) [[UIPACC Share Epicelling]]]; [AppDelegate.viewController Load Annotation]; I can not assign view controller because it will create a new instance of the view controller. When creating a class, I have to pass the context of the View Controller. I
Now when the map view is nested inside the UITBB Controller, then I am not sure how I reference the class from Classbie Passing along the nearest map. Do I need to add a new representative method or start the protocol? I hope this is enough information to tell me that I can make someone else clear.
Thank you in advance!
I understood it from myself [[UIApplication sharedApplication] delegate] to call me Your window-based application was coded to add everything.
-
I declared an IBOuttlet for my class "
-
-
-
-
P>
IBOutlet MyClass * myClass;
-
Make my IBOutlet a property
@property (nonatomic, retain) IBOutlet MyClass * myClass;
-
Synchronize the property (be sure to release it too)
Synchronize @ myClass;
-
Connect the iBootlet to the View Controller in the Interface Builder in my app on which a Navigation inside the Tab Bar Controller and Tab Bar Controller Gation was the controller, I had to make sure that IBotlet went to the visual controller which was nested with navigation controllers.
-
Finally, my other classes referred to myClass To do this, I have called the UIApplication shared application with the following code:
MyAppDelegate * appDelegate = (MyAppDelegate *) [[UIApplication shared epicling]]]; [AppDelegate.myClass methodBeingCalled]; < / Li>
I hope that if you come into the same problem then Ddgar will!
Comments
Post a Comment