Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide the Viewcontroller at runtime?

How do I hide the UIViewController at runtime?

like image 798
Rahul Rana Avatar asked Jun 12 '26 14:06

Rahul Rana


2 Answers

what do you really mean?

UIViewController itself is not "visible"... but it is its view (a normal UIView), so just change it's view hidden propery to YES:

yourUIViewController.view.hidden = YES;
like image 168
meronix Avatar answered Jun 15 '26 02:06

meronix


If u want to hide the viewcontroller's view try

viewController.view.hidden = YES;
like image 31
visakh7 Avatar answered Jun 15 '26 04:06

visakh7



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!