How to call delegate methods from other class in Swift?

IPhone Dev: Instance Variables and Class methods?

  • Hi everyone, I'm trying to access a instance variable that I created through a class method but This doesn't seem to work. In my .h I have something like this @property (nonatomic) BOOL mybool; +(void)myClassMethod; in my .m I have something like this: + (void)myClassMethod { mybool = YES; } Is there a way to create "class variables" that can be accessed through these methods? Or is there a simple way to get access to my instance variables? Also how can I call instance methods from my class methods, or does it only work on way?

  • Answer:

    There is no simple way to do so for the variables... Sorry about that... Good luck!

Dan at Yahoo! Answers Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.