In my app i want to show a dropdown table, after clicking the text field. But it is not working good.

```
tableViewOne.snp.updateConstraints { (make) in

                let superViewOriginY: CGFloat = (textField.superview?.frame.origin.y)!
                let textFieldMaxY: CGFloat = textField.frame.maxY
                let navigationHeight: CGFloat = self.navigationController!.navigationBar.frame.size.height
                let textFieldHeight = textField.frame.height
                let tableViewOneTopPsition = superViewOriginY + textFieldMaxY + navigationHeight + textFieldHeight

                make.top.equalTo(tableViewOneTopPsition)
                make.left.equalTo(15)
                make.right.equalTo(-15)
                make.height.equalTo(0)
            }
            self.view.layoutIfNeeded()
            UIView .animate(withDuration: 0.4, animations: {
                self.tableViewOne.snp.updateConstraints({ (make) -> Void in
                    make.height.equalTo(170)
                })
                self.view.layoutIfNeeded()
            }, completion: nil)

```

By writting this code, it works for iphone 11 Max simulator. But for iphone 8 plus simulator there is some gap between the textfield and the table view.` In this following images there are textfields inside the stackview.

<https://i.stack.imgur.com/JDUkw.jpg>

<https://i.stack.imgur.com/GkQXd.png>

```
   First one image is the iphone 11max pro image 
   and the second one is the iphone 8 plus image

```

if i will write

```
 make.top.equalTo(textFieldMaxY)

```

```
the i will be 

```

<https://i.stack.imgur.com/fmNNe.jpg>

Please help me to overcome the issue.