particular subview always on top

Discussion in 'iOS Programming' started by chhoda, Dec 4, 2008.

  1. chhoda macrumors 6502

    Oct 25, 2008
    I have a view and want a particular subview always on top. After adding this subview i am adding and removing a lot of subviews while running my application. So basically I want this subview always on top. will i have to do [myview bringSubviewToFront:mySubview] every time i add a subview ?

    is there any function like alwaysontop ?

  2. jnic macrumors 6502a

    Oct 24, 2008
    Except in certain special cases, they'll be layered in the order in which you add them. You might find sendSubviewToBack more useful in some instances, but basically, yes, you'll have to set the layering yourself if it isn't correct by default.

Share This Page