-
Notifications
You must be signed in to change notification settings - Fork 374
Fix UITextField with cornerRadius #83
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
Conversation
This is not a complete fix and has to be reevaluated since adding two UITextField with cornerRadius within the same scope now produces a bug where the first one is always introspected. We might wanna print a debug message to lead the package user in the right direction when someone does this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this tbh. Introducing possibly wrong behavior and notifying the user via a debug message doesn't seem like a good way to go about this.
This now uses the UIKit frames to find the right view to introspect. |
This should not have been committed in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, just a few things I don't like here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's wait for CI and then 🚀
This PR fixes #6. It adds the
findAncestorOrAncestorChild
function onUIView
, which is used by the newTargetViewSelector.siblingContainingOrAncestorOrAncestorChild
function to retrieve not only sibling containing or ancestors, but also children of ancestors.The
testTextField
Test is also updated to reflect this change and test whether threeUITextField
next to each other are differentiated correctly, with two of them showcasing the strange behavior that appears when.cornerRadius()
is added after the introspection.