I have an NSLayoutConstraint *heightConstraint for my extension keyboard. It changes according to portrait and landscape mode.
- If I write it in viewWillAppear function; it works when keyboard first executed but it doesn't work for portrait->landscape or landscape->portrait situations.
- If I write it in viewWillLayoutSubviews; it doesn't work when keyboard first executed but it works properly when statusbarchanged.
- If I write it in both two functions it doesn't work.
- If I write it in updateViewConstraints function then call it in other two functions it doesn't work also.
Please help I'm trying to find a solution for hours
Solved by using -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation function instead of willLayoutSubvieww