// 实现委托函数
- (void)onEndWithViews:(BDRecognizerViewController *)aBDRecognizerView withResults:(NSArray *)aResults
{
NSString *backString=[[[[aResults lastObject]lastObject]allKeys]lastObject];
NSLog(@"==%@",backString);
if (label.text == nil) {
label.text = backString;
}else{
NSString *str = label.text;
label.text = [NSString stringWithFormat:@"%@%@",str,backString];
}
}
- (void)onEndWithViews:(BDRecognizerViewController *)aBDRecognizerView withResults:(NSArray *)aResults
{
NSString *backString=[[[[aResults lastObject]lastObject]allKeys]lastObject];
NSLog(@"==%@",backString);
if (label.text == nil) {
label.text = backString;
}else{
NSString *str = label.text;
label.text = [NSString stringWithFormat:@"%@%@",str,backString];
}
}
本文介绍了一个使用 Objective-C 实现的委托模式示例。该示例展示了如何通过代理函数处理从 BDRecognizerViewController 返回的数据,并更新 UI 标签内容。具体包括如何解析返回的数组并将其内容追加到界面上。
1203

被折叠的 条评论
为什么被折叠?



