Lefora Free Forum
login join
Loading
848 views

NSObject and NSView

Page 1
1–2
rookie - member
1 posts

I have a subclass of NSObject and a subclass of NSView. I have a button in the NSObject subclass and I want to make the drawing from the NSView subclass redraw(with setNeedsDisplay:YES) when you push the button, but I don't know how.

P.S ["name_of_the_custom_view" setNeedsDisplay:YES] works if I do it from the NSView subclass but not from the other one

rookie - member
2 posts

Its the problem with connections then. Have a outlet of view in controller and connect it in the interface builder.

and then call setNeedsDisplay in your action method in controller

Page 1
1–2

Locked Topic


You must be a member to post in this forum

Join Now!