I'm relatively new to Cocoa programming, but I've managed to figure a fair amount out. One thing I haven't been able to figure out yet is how to have an element that is visible over all views. Like a volume control that is always visible just above the tab bar at the bottom of the screen.
H开发者_运维问答ow should I go about doing that?
If you just need to bring a view to the front, you can use bringSubviewToFront:
, like so:
[self.view bringSubviewToFront:yourSubview];
If you need to position subviews so that they overlap in a certain way, you'll want to make use of CALayer. Just be aware that overlapping UIControl elements goes against Apple's Human Interface guidelines.
精彩评论