Skip to content

Commit

Permalink
feat(ios): expose keyboardDismissMode to Ti.UI.TableView as well (#13860
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hansemannn authored Jul 9, 2023
1 parent 6195261 commit 4202779
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apidoc/Titanium/UI/TableView.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,14 @@ properties:
platforms: [iphone, ipad, macos]
availability: creation

- name: keyboardDismissMode
summary: The manner in which the keyboard is dismissed when a drag begins in the table view.
type: Number
constants: Titanium.UI.iOS.KEYBOARD_DISMISS_MODE_*
platforms: [iphone, ipad, macos]
default: Undefined (behaves like <Titanium.UI.iOS.KEYBOARD_DISMISS_MODE_NONE>)
since: "12.2.0"

- name: showSearchBarInNavBar
summary: A Boolean indicating whether search bar will be in navigation bar.
description: |
Expand Down
7 changes: 7 additions & 0 deletions iphone/Classes/TiUITableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,13 @@ - (void)scrollToIndex:(NSInteger)index position:(UITableViewScrollPosition)posit
[table scrollToRowAtIndexPath:path atScrollPosition:position animated:animated];
}

- (void)setKeyboardDismissMode_:(id)value
{
ENSURE_TYPE(value, NSNumber);
[[self tableView] setKeyboardDismissMode:[TiUtils intValue:value def:UIScrollViewKeyboardDismissModeNone]];
[[self proxy] replaceValue:value forKey:@"keyboardDismissMode" notification:NO];
}

- (void)setSeparatorInsets_:(id)arg
{
DEPRECATED_REPLACED(@"UI.TableView.separatorInsets", @"5.2.0", @"UI.TableView.tableSeparatorInsets")
Expand Down

0 comments on commit 4202779

Please sign in to comment.