1

How to show Bottom PopUp when TabBar index 2 is clicked and hide when "close" button inside PopUp is clicked and also when popup shows tab bar will be hidden.Could someone help me i am new to iOS development.Thanks in advance.

enter image description here

1 Answers1

4

You have to design a UIView on HomeTabBarViewController Like this

For Example:-

enter image description here

And drag and drop IBOutlet for that UIView

@IBOutlet weak var demoView: UIView!

And set isHidden property as false in viewDidLoad Method

override func viewDidLoad() {
    super.viewDidLoad()
    demoView.isHidden = false
}

Now on cross button set isHidden property as true

@IBAction func crossBtnPrsd(_ sender: Any) {
    demoView.isHidden = true
}

enter image description here

tabassum
  • 1,100
  • 6
  • 17
  • i have to show that pop up when index of third tab bar is clicked and close when click on close button of that view – ashwani5389 Sep 28 '18 at 06:38
  • you have to design UIView On transactionViewController – tabassum Sep 28 '18 at 06:40
  • means i have a tab bar controller and also a ViewController for each index but third index i have no viewcontroller i want to show pop up and suppose if index 0 ViewController is opened and suddendly i clicked on 3rd index then pop will show and in background index 0 ViewController will also shown – ashwani5389 Sep 28 '18 at 06:40
  • you have 3 viewController right news ,home and Popular in storyboard ?so u have to add UIView on third tabbarviewcontoller – tabassum Sep 28 '18 at 06:41
  • pls read my above comment i have 5 viewcontrollers embedded in tab bar controller – ashwani5389 Sep 28 '18 at 06:43
  • but you have to add view controller for 3 index also because you have to design UIview for popup – tabassum Sep 28 '18 at 06:46
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/180917/discussion-between-ashwani5389-and-tabassum). – ashwani5389 Sep 28 '18 at 06:47