Rajni Johar Raswant
Rajni Johar Raswant

Reputation: 245

Tab Bar not hiding using UIViewController

I am adding a UIViewController as PresentViewController using Tab Bar, then the view looks like: enter image description here

After selecting any option, I need to hide the Tab Bar, but my screen looks like:enter image description here

Kindly suggest me the solution for it. I am adding a view controller:

self.presentViewController(responseSelector, animated: true, completion: nil)

Upvotes: 4

Views: 714

Answers (2)

Rajni Johar Raswant
Rajni Johar Raswant

Reputation: 245

I got solution for it.

let responseSelector =
 ResponseSelectorViewController(responseId:currentResponse.title,
 delegate:self)
         responseSelector.modalPresentationStyle = .OverCurrentContext
         self.presentViewController(responseSelector, animated: true, completion: nil)

I have change 1 line of code in this.

 responseSelector.modalPresentationStyle = .OverFullScreen

Upvotes: 3

DeeNove750
DeeNove750

Reputation: 63

I have used the line below in the ViewWillAppear() function:

self.tabBarController!.tabBar.isHidden = true

And it works great.

Upvotes: 1

Related Questions