简体   繁体   中英

HIViewSetZOrder equivalent in cocoa

What is the equivalent of carbon function HIViewSetZOrder in cocoa ?

Thanks.

You should rely only on view hierarchy (parents,childs) to layer your views. Overlapping views are a bad idea.

There is a - (void)addSubview:(NSView *)aView positioned:(NSWindowOrderingMode)place relativeTo:(NSView *)otherView method but in order to layer your views you'll have to remove/add them again.

Alternatives are to use NSWindow or Core Animation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM