I have a UIButton and a UIView that animates, sliding down when the UIButton is pressed. The problem is that the UIView obscures the UIButton. I’d like the UIButton to always remain on top.
I tried this in the viewDidLoad:
[self.view bringSubviewToFront:categoryBtn];
doesn’t work though.
thanks for any help
After Add any
UIViewor any other view on your this mainview , after that just add your this line for brings as a supeview for buttonFor Example on button action event you add any view then use code like bellow..