I have a mainViewController and inside its nib file I added an info button, in which action is to flip between two subviews, subview A and subview B.
From mainViewController, under viewDidLoad, I'm inserting subview A. Here I notice that the info button is in front of the subview A, which is fine.
The problem comes that when pressing any buttons that are located within subview A's nib file, in which they add new subviews, the info button remains on front.
So, how can I add these later subviews on front of all parent view stacks, so the info button does not appear? or how can I hide the info button?
You can put subview infront of everything else by calling
[view bringSubviewToFront:subview];
You can hide the button (or any other UI element) by calling it's setHidden function like so:
[button setHidden:YES];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With