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
Related Q & A:
- Is it correct to extend a bean class and write a class which holds logic to populate the bean we extend?Best solution by stackoverflow.com
- How to use an object created in Main class with another created in another class?Best solution by stackoverflow.com
- What is difference between instance class and static class in c#?Best solution by stackoverflow.com
- Is it better to get a higher grade in a easier class or a mediocre/low grade in a hard class?Best solution by greatcollegeadvice.com
- Which is better, A in an easy class or B/C in a hard class?Best solution by monkeysee.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.