PDA

View Full Version : Using bringSubviewToFront in Ipad scrollview




ashwinr87
Apr 15, 2011, 01:49 PM
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 (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?



jnoxx
Apr 18, 2011, 03:51 AM
UIView *testie;
[self.view bringSubviewToFront:testie];
is my wildest guess lol.

ashwinr87
Apr 18, 2011, 09:10 AM
I figured it out...
I had to do [self.view.superview bringSubviewToFront:]

UIView *testie;
[self.view bringSubviewToFront:testie];
is my wildest guess lol.