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
[TIMOB-25358]:iOS Problem with Searchbar, SDK 6.2.0 and later #9495
Conversation
iphone/Classes/TiUITableView.m
Outdated
while (tempView != viewController.view) { | ||
leftMargin += tempView.frame.origin.x; | ||
topMargin += tempView.frame.origin.y; | ||
tempView = tempView.superview; |
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.
If the padding is 100px, you are re-assigning a UIView instance a hundred times. We cannot use a while-loop for 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.
The while loop will run as many times as many superview are there till its window containing controller's view are found. So it will not run 100 times for a padding of 100px. Rather it will run for as many super views make it 100px. resultViewController is presented on window holding controller, so we have to calculate this padding.
@@ -2154,10 +2154,17 @@ - (void)presentSearchController:(UISearchController *)controller | |||
[viewController presentViewController:controller | |||
animated:NO | |||
completion:^{ | |||
CGPoint convertedOrigin = [self.superview convertPoint:self.frame.origin toView:viewController.view]; |
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.
Nice, so the proposal worked?
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.
Yes :)
# Conflicts: # iphone/Classes/TiUIListView.m # iphone/Classes/TiUITableView.m
Tests:
Generated by 🚫 dangerJS |
https://jira.appcelerator.org/browse/TIMOB-25358