User1234
User1234

Reputation: 2412

How to get current NSView in Cocoa?

I'm changing my content View from applicaiton

[window setContentView:otherView];
[window setContentView:otherView2]; //etc

What I need, to be able to get always my current Content View, how I can do that?Something like this [window myCurrentContentView]; or window.view , I couldn't find it. Thanks.

Upvotes: 0

Views: 1545

Answers (1)

Amy Worrall
Amy Worrall

Reputation: 16337

[window contentView];

should do the trick.

NSWindow documentation.

Upvotes: 1

Related Questions