Using bringSubviewToFront in Ipad scrollview

Discussion in 'iOS Programming' started by ashwinr87, Apr 15, 2011.

  1. macrumors member

    Joined:
    Mar 9, 2011
    #1
    In my Ipad app, I have a split view in which the detail view is a scroll view... I have 3 subviews to the scrollview which are tableviews... How do I use
    Code:
    (void)bringSubviewToFront:(UIView *)view
    to bring one of the subviews of the scrollview to the front when an action is performed? (since Views are "stacked" in the order they're added with the last one on top). Should I write the code in the subview or in the detailViewController and how do I call it?
     
  2. jnoxx, Apr 18, 2011
    Last edited by a moderator: Apr 18, 2011

    macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Code:
    UIView *testie;
        [self.view bringSubviewToFront:testie];
    
    is my wildest guess lol.
     
  3. thread starter macrumors member

    Joined:
    Mar 9, 2011
    #3
    I figured it out...
    I had to do
    Code:
    [self.view.superview bringSubviewToFront:]
     

Share This Page