Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iOS 13 UITableViewAlertForLayoutOutsideViewHierarchy warning #2076

Merged
merged 1 commit into from Dec 28, 2019
Merged

Fix iOS 13 UITableViewAlertForLayoutOutsideViewHierarchy warning #2076

merged 1 commit into from Dec 28, 2019

Conversation

ronzohan
Copy link

Fixes UITableViewAlertForLayoutOutsideViewHierarchy warning on iOS 13 by checking if layoutIfNeeded() needs to be called by performing a check if the object is currently attached to a window.

@ronzohan
Copy link
Author

@marinh
Copy link

marinh commented Oct 31, 2019

Any idea when this will be merged and released?

@SlashDevSlashGnoll
Copy link
Contributor

@freak4pc Asked for Bumps on PRs that we find useful, so bumping here. Some of us really do like to keep our console logs clean of warnings so when problems really do occur we can notice them. I'd love to see this fix put in. Bug fixes are the best!

@freak4pc
Copy link
Member

This seems like a good fix. @ronzohan mind rebasing on top of develop and adding a CHANGELOG entry?

@freak4pc freak4pc added this to the RxSwift 6.0.0-beta.1 milestone Dec 21, 2019
Copy link
Member

@freak4pc freak4pc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased and added a CHANGELOG entry for you. Thanks for your first contribution!

@freak4pc freak4pc merged commit 5dfe035 into ReactiveX:develop Dec 28, 2019
@ronzohan ronzohan deleted the ios13-layout-outside-view-heirarchy-warning-fix branch January 6, 2020 05:46
@svenmuennich
Copy link

Is there a reason why this change neither made it to master nor was part of any releases (5.1.0, 5.1.1) tagged since merging it?

@freak4pc
Copy link
Member

Probably accidental, we need to cherry-pick it into develop.

@freak4pc
Copy link
Member

I've cherry-picked this and it will be out on the next release, whichever that would be :)

@svenmuennich
Copy link

I've cherry-picked this and it will be out on the next release, whichever that would be :)

Great! Thank you 😃

@ameue
Copy link

ameue commented Jun 15, 2020

I've cherry-picked this and it will be out on the next release, whichever that would be :)

I tried to use this method to test it with Xcode 11.5, iOS 13.5 Simulator. If you bind to viewDidLoad, you will still get the same warning when loading the page for the first time,

@freak4pc
Copy link
Member

@ameue I just tried it on a branch and I'm not getting the warning as you do. (I linked my app to the develop branch of this repo).

image

Do you have a repro?

@ameue
Copy link

ameue commented Jun 16, 2020

@ameue I just tried it on a branch and I'm not getting the warning as you do. (I linked my app to the develop branch of this repo).

image

Do you have a repro?

I try again, it works.

@MatrixSenpai
Copy link

MatrixSenpai commented Aug 12, 2020

Just wanted to update, I'm performing the following steps and still seeing the error from RxSwiftCommunity/RxDataSources#331

Using:

  • CocoaPods
  • branch develop

Steps:

  • Pushing to a new view controller using RxFlow
  • Creating a view controller using a combination of Reusable via ViewController.instantiate() and Storyboard
  • Calling bind(to: ) in viewDidLoad()

I'm still seeing the Warning only once: UITableView was told to layout its visible cells... error

See this repo for a sample

@MatrixSenpai
Copy link

Just wanted to comment to make sure there's still attention brought to this issue. I'm still seeing it as of Swift 5.3 and RxSwift 5.0.1

Please reopen the related issue #2093 since this is still an issue.

This can cause serious issues with layout, especially when not using storyboards

@ronzohan
Copy link
Author

ronzohan commented Oct 9, 2020

Hi @MatrixSenpai , I believe this fix is not merged on RxSwift 5.0.1 but onto the next release version which would be on 6.0.0. You can try to use the 6.0.0 release candidate 6.0.0-rc.1 branch or the develop branch which contains the fix

As @freak4pc said,

I've cherry-picked this and it will be out on the next release, whichever that would be :)

@MatrixSenpai
Copy link

Will check out, ty for update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants