Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Coeur
Copy link
Collaborator

@Coeur Coeur commented Jun 17, 2018

  • windows are always sorted by windowLevel (it's in the doc)
  • originalSubviews is private, so the object type is always UIView: no need to guard
  • typo

self.bringWindowToTop()
for subview in self.originalSubviews.allObjects {
guard let subview = subview as? UIView else { continue }
for subview in self.originalSubviews.allObjects as! [UIView] {
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think it is good to use force casting. I'd like to avoid it when possible.

Copy link
Collaborator Author

@Coeur Coeur Jun 18, 2018

Choose a reason for hiding this comment

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

But it makes sense here: it's a private variable, so we're 100% controlling its type.
It's the same dangerousness as calling myPrivateArray[2] when you already know that the count is 3 or higher.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Anyway, I've re-introduced the guard and removed a call to bringWindowToTop.

@Coeur
Copy link
Collaborator Author

Coeur commented Jul 23, 2018

@devxoul Hi, I'd like to include this improvement from your repository instead of my fork. Could we talk about it and see which parts are good and which parts need improvement? Thank you.

@devxoul devxoul merged commit b66840b into devxoul:ios-11-above-keyboard Mar 29, 2019
@devxoul
Copy link
Owner

devxoul commented Mar 29, 2019

@Coeur, I was at the army training center at that time due to my military service 😂 This improvement will be included today's release. Thanks for your great work!

@Coeur Coeur deleted the ios-11-above-keyboard branch March 29, 2019 09:33
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.

2 participants