I am having a weird auto layout with xib file/class issue. I have created a custom notification view (UIView subclass) in Swift that uses a xib file.
- When the device is in portrait orientation on load, the notification is fine.
- When I rotate to landscape, again the notification is fine (however, the button interactions somehow become disabled/non-respondent)
- When I rotate back to portrait orientation, the xib view (i.e. "self") expands to a random height (notice the "yellow" background, that is set by: self.backgroundColor = UIColor.yellowColor()
Nothing in my code is setting the frame or constraints after the initial adding to the view controller. I have adjust every auto layout constraint in the xib file I could think of, and continue to have this problem.
Here are some screenshots: