We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8035e2 commit eef8ec7Copy full SHA for eef8ec7
Authenticator/Classes/OTPTokenListViewController.m
@@ -208,6 +208,13 @@ - (void)tokenSource:(id)tokenSource didCreateToken:(OTPToken *)token
208
if ([self.tokenManager addToken:token]) {
209
[self.tableView reloadData];
210
[self update];
211
+
212
+ // Scroll to the new token (added at the bottom)
213
+ NSInteger section = [self numberOfSectionsInTableView:self.tableView] - 1;
214
+ NSInteger row = [self tableView:self.tableView numberOfRowsInSection:section] - 1;
215
+ [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:section]
216
+ atScrollPosition:UITableViewScrollPositionMiddle
217
+ animated:YES];
218
}
219
220
0 commit comments