I added a view to the top of my collection view, now when I dismiss the view remains for a split second. Does anyone have any idea to what might cause this?
let newView = UIView() newView.backgroundColor = UIColor.redColor()
newView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(newView)
let pinTop = NSLayoutConstraint(item: newView, attribute: .Top, relatedBy: .Equal, toItem:
self.topLayoutGuide, attribute: .Bottom, multiplier: 1.0, constant: 0)
let heightConstraint = newView.heightAnchor.constraintEqualToAnchor(nil, constant: 50)
let widthConstraint = NSLayoutConstraint(item: newView, attribute: .Width, relatedBy: .Equal, toItem: view, attribute: .Width, multiplier: 1.0, constant: 0)
self.topContentAdditionalInset = 50
NSLayoutConstraint.activateConstraints([pinTop, heightConstraint, widthConstraint])