When using a custom modal transition with an extended status bar, the presented view controller's frame is not adjusted back to its original position

Originator:jpmfagundes
Number:rdar://29840481 Date Originated:02-Jan-2017 01:09 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:10.2
Classification: Reproducible:Always
 
Summary:
A view controller is presented modally using a custom transition.
If the status bar is in extended mode (i.e. in-call status bar), the view controller is adjusted accordingly, moving down, even if the extended status bar is triggered after the view controller is presented.

When the status bar returns to its regular height, the presented view controller is not adjusted back to its original position, leaving a 20pt gap, showing the view controller at the back.

Steps to Reproduce:
1. Run the attached sample project
2. Click the "Open Modal" button
3. Trigger the extended status bar:
- If on an iPhone, click the "Call" button and cancel the call
- If on the simulator, press Command + Y
4. On the iPhone, after cancelling the call, you should immediately see the 20pt gap at the top of the screen. If on the simulator, press Command + Y again to return the status bar to its regular state and notice the view controller is not adjusted back.

Expected Results:
The presented view controller should be adjusted back to its original position.

Actual Results:
The presented view controllers is not adjusted back to its original position.

Version:
iOS 10.2 (14C92)

Notes:
If the view controller also wasn't adjusted when the extended status bar is triggered, I'd just assume that when using custom transitions we didn't get that functionality for free, but since it does I think it should be consistent.

Configuration:
Tested on an iPhone 7 Plus, iPhone 7 Plus simulator and iPhone 6s simulator on iOS 9.3.
It's interesting to notice that on 9.3, after the status bar is returned to its regular state, some constraints break:

Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x7ff052734520 V:|-(20)-[UIInputSetContainerView:0x7ff0527322c0]   (Names: '|':UITextEffectsWindow:0x7ff05253e190 )>",
    "<NSLayoutConstraint:0x7ff0527347c0 UIInputSetContainerView:0x7ff0527322c0.bottom == UITextEffectsWindow:0x7ff05253e190.bottom>",
    "<NSLayoutConstraint:0x7ff052443890 'UIInputWindowController-height' UIInputSetContainerView:0x7ff0527322c0.height == UITextEffectsWindow:0x7ff05253e190.height>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7ff0527347c0 UIInputSetContainerView:0x7ff0527322c0.bottom == UITextEffectsWindow:0x7ff05253e190.bottom>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2017-01-02 12:58:21.077 lksaddfashjk[67082:61424898] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x7ff052734520 V:|-(20)-[UIInputSetContainerView:0x7ff0527322c0]   (Names: '|':UITextEffectsWindow:0x7ff05253e190 )>",
    "<NSLayoutConstraint:0x7ff052405e40 'UIInputWindowController-top' V:|-(0)-[UIInputSetContainerView:0x7ff0527322c0]   (Names: '|':UITextEffectsWindow:0x7ff05253e190 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7ff052734520 V:|-(20)-[UIInputSetContainerView:0x7ff0527322c0]   (Names: '|':UITextEffectsWindow:0x7ff05253e190 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!