【发布时间】:2011-05-24 13:41:44
【问题描述】:
代码有效,但应用程序在没有按下按钮的情况下调用字符串。一旦我到达应用程序的特定页面,它就会绕过所有内容(其他按钮、地图视图等)并进行调用...
我使用的代码是:
- (void)loadNo2 {
UIButton *no2 = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[no2 setTitle:@"2108642700" forState:UIControlStateNormal];
[no2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[no2 setBackgroundColor:[UIColor blackColor]];
[no2 setFrame:CGRectMake(84, 260, 152, 31)];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://1234567890"]];
[self addSubview:no2];
}
这是怎么回事???
【问题讨论】: