Fix #1952: Use SafeArea Autolayout Constraints when FormViewController Is Presented Modally#2148
Open
philipbel wants to merge 1 commit intoxmartlabs:masterfrom
Open
Fix #1952: Use SafeArea Autolayout Constraints when FormViewController Is Presented Modally#2148philipbel wants to merge 1 commit intoxmartlabs:masterfrom
philipbel wants to merge 1 commit intoxmartlabs:masterfrom
Conversation
Source/Core/Core.swift
Outdated
| // Need to set the background color as otherwise black shows underneath the translucent navigation bar. | ||
| view.backgroundColor = .systemBackground | ||
| tableView.translatesAutoresizingMaskIntoConstraints = false | ||
| NSLayoutConstraint.activate([ |
Member
There was a problem hiding this comment.
Hi, thanks for contributing. First comment is that a FormViewController can be created from a Storyboard where a UITableView is added with constraints (which might be equal to these but might as well not). The case where no Storyboard is used and the view controller is instantiated from code is handled in the if tableView == nil { above. As I understand, this issue only happens in that case, so any fix/workaround we apply should only apply to that case.
Author
There was a problem hiding this comment.
Thanks for the comment, Mathias.
I have updated the PR. Moved the constraints to a new function and I believe I am handling the Storyboard/non-Storyboard case now.
Is this more in-line with what you have in mind?
…Controller Is Presented Modally
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UITableView.scrollRectToVisible(, animated:)andUITableView.scrollToRow()don't work properly inkeyboardWillShow()due to, what seems to be, a bug in iOS when autoresizing mask is used for aUIViewControllerthat is presented modally as.formSheet/.pageSheetwithin aUINavigationController.Tests are passing. My own iOS app is working fine with this fix. Comments/input is welcome.