objective c - Calling a method in other class on same View Controller -
I'm actually messing around here I have read some tutorials and examples but I do not understand how to do it is.
I have a visual controller with a gameplay class. I am doing a phantom kit class on the same visual controller. Now I want to call a method from the game class, a method from the gameplay class, to the view controller. Dismisses. But I know I can not do it with making new examples of 1. I've already made and loaded a method from class1 want CL.
Any help?
I have imported the GamePlay.h file in the Phantom Kit category and now I'm calling a method:
- (zero) endoff game {gameplay * GP = [[Gameplay Alok] init]; [GP &]; } In the gameplay class, I have an end to the law which rejects this controller
- (zero) end {[self-shot visual viewer: Yes complete: zero]; } But this will not work because I am not calling the method method already created, but I am making a new example of the gameplay class.
"post-text" itemprop = "text">
Your question is a bit ... unclear but, I think that what you ask is found. In short, "How do I get my gameplay object in the second category?" There are some ways to do this, classes based on exact relationships between the two. I am not personally familiar with the Spritekit (yet), but you can add only one asset to your second category:
// MyOtherClass.h #import "GamePlay.h" @ Interface MyOtherClass: NSObject @propertyGameplay * GamePlay; @end //MyOtherClass.m - (Zero) EndoffGame {{self.gamePlay End]; } // where you are building MyOtherClass MyOtherClass / myOtherClass = ... myOtherClass.gamePlay = self; // or whatever
Comments
Post a Comment