[英]Change the language of iOS virtual keyboard “previous”, “next”, “done” buttons
[英]iOS keyboard with next, previous and done buttons, for text fields in UITableView
我有一个UItableview与包含文本字段的自定义单元格。 在表格视图中,我有5行以及自定义单元格。 我想为表格视图中加载的文本字段实现附件视图(下一步,上一步,完成按钮)。 请帮忙。
码:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 5;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"CPMyTableViewCell";
CPMyTableViewCell *cell = (CPMyTableViewCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CPMyTableViewCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
cell.textVw.placeholder = @"text";
return cell;
}
您可以使用BSKeyboardControls https://github.com/SimonBS/BSKeyboardControls 。
这样,将控件添加到键盘非常容易。 您还可以在项目中找到示例。
也看看这个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.