OS X version of bringSubviewToFront:?

前端 未结 6 619
我在风中等你
我在风中等你 2021-02-08 19:07

I need to replicate the function of bringSubviewToFront: on the iPhone, but I am programming on the Mac. How can this be done?

6条回答
  •  闹比i
    闹比i (楼主)
    2021-02-08 19:33

    also be sure to enable the layer for quartz rendering:

    ...
    NSImageView *anImage = [[NSImageView alloc] initWithFrame:NSRectMake(0,0,512,512)];
    [anImageView setWantsLayer:YES];
    ...
    

    otherwise, your layer cannot be rendered correctly.

提交回复
热议问题