Hey i was searching for a solution for my problem and i nearly have it just one tiny bit...
I have a NSView subclass (AppView) and a NSObject subclass (AppController) In AppView i declare a boolean with the @property than i use @synthesize and than in AppController i want to access it: i found this:
(in the implementation)
AppView *obj;
obj.booleanDraw = YES;
but i have to set obj = something ... but i have no idea what. since i just want to change the boolean from the view on a button click an开发者_开发技巧d the button action is defined in the AppController thanks for any help^^
Typically:
AppView *obj = [[AppView alloc] init];
But, possibly not in your case - I'd probably need to see more of your implementation to really give you a correct answer.
Mr-sk is right. But if this is the sort of problem you're having, I'd suggest checking this out: http://cocoadevcentral.com/d/learn_objectivec/. That's what got me started, and I think you'd feel really good if you read it too.
精彩评论