Hope it’s not against rules to post more than 1 question per page.
-
I have value1, which changes based on value2 changing. And because of that, every time i change value2, i go [self changeValue1] and then that runs some code which looks at value2 and changes value1. Is there a more automated way of doing this, where i can have the app be notified when value2 changes and calls such a method?
-
I have methods (such as the one above) that i don’t want to be accessed from outside that class. How do i make a method private?
ad 1. Look for Key Value Observing in the documents.
ad 2. Define the methods in a private category. This doesn’t mean other classes can’t call the method anymore, but at least you’ll be warned about it by the compiler.
In your MySubclass.m: