初级调用错误
sasky2008 发布于2016-07 浏览:1252 回复:1
0
收藏
快速回复

- (void)viewDidLoad {

    [super viewDidLoad];

    // Do any additional setup after loading the view, typically from a nib.

    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];

    button.frame = CGRectMake(0, 200, 100, 100);

    [button setTitle:@"测试" forState:UIControlStateNormal];

    [self.view addSubview:button];

    [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];

    

    baiduVoiceVC = [[BDRecognizerViewController alloc] initWithOrigin:CGPointMake(20, 100) withTheme:[BDTheme lightOrangeTheme]];

//    baiduVoiceVC.enableFullScreenMode = YES;

    baiduVoiceVC.delegate = self;

    

}

- (void)buttonAction:(UIButton *)button

{

    BDRecognizerViewParamsObject *objc = [[BDRecognizerViewParamsObject alloc] init];

    objc.apiKey  = @"xxx";

    objc.secretKey = @"xxx";

    [baiduVoiceVC startWithParams:objc];

}


这么写, 为什么点击按钮只是显示一下 请等候1秒直接消失.



收藏
点赞
0
个赞
共1条回复 最后由用户已被禁言回复于2022-04
#2fang4096回复于2016-07

控制台有什么输出打印吗?

0
TOP
切换版块