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

[TIMOB-17404] iOS: Fixes Error when focusing TextField in HeaderView of empty TableView #6535

Merged
merged 1 commit into from
Jan 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions iphone/Classes/TiUITableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -2539,18 +2539,14 @@ - (CGFloat)tableView:(UITableView *)ourTableView heightForFooterInSection:(NSInt

-(void)keyboardDidShowAtHeight:(CGFloat)keyboardTop
{
NSInteger lastSectionIndex = [(TiUITableViewProxy *)[self proxy] sectionCount]-1;
ENSURE_CONSISTENCY(lastSectionIndex>=0);
CGRect minimumContentRect = [tableview rectForSection:lastSectionIndex];
CGRect minimumContentRect = [tableview bounds];
InsetScrollViewForKeyboard(tableview,keyboardTop,minimumContentRect.size.height + minimumContentRect.origin.y);
}

-(void)scrollToShowView:(TiUIView *)firstResponderView withKeyboardHeight:(CGFloat)keyboardTop
{
if ([tableview isScrollEnabled]) {
NSInteger lastSectionIndex = [(TiUITableViewProxy *)[self proxy] sectionCount]-1;
ENSURE_CONSISTENCY(lastSectionIndex>=0);
CGRect minimumContentRect = [tableview rectForSection:lastSectionIndex];
CGRect minimumContentRect = [tableview bounds];

CGRect responderRect = [self convertRect:[firstResponderView bounds] fromView:firstResponderView];
CGPoint offsetPoint = [tableview contentOffset];
Expand Down