나는 아래의 방법으로 호출 프로그램을 개발한다. 내 주요 목표는 텍스트 필드에 숫자를 입력하고 난 통화 버튼을 누를 때마다이 정수에내 앱에서 전화를 거는 방법은 무엇입니까?
를 변환 한 후 발신 통화에 대한
코드를 만들 수있는 가능성이있다 엑스 코드 action.in 호출 수행입니까?
들어오는 호출을 차단할 가능성이 있습니까?
아래 코드를 작성하고 있습니다.
내 .H 파일입니다
@interface mytextViewController : UIViewController
{
IBOutlet UILabel *enterphonenumber;
int currentNumber;
}
@property(nonatomic,retain)IBOutlet UILabel *enterphonenumber;
-(IBAction)call;
-(IBAction)press:(id)sender;
@end
내하는 .m 파일
-(IBAction)press:(id)sender
{
currentNumber = currentNumber*10 + (int)[sender tag];
enterphonenumber.text = [NSString stringWithFormat:@"%i",currentNumber];
}
-(IBAction)call
{
int x =[enterphonenumber.text intValue];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:x]];
//[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"%tel:9963610177"]];
NSLog(@"sample %@",[NSURL URLWithString:@"my phone number is calling"]);
}
또한 검사하는 방법에 그것이 호출
수행하는 어떤 하나의 도움을 나는 새를 생각하십시오 때문에 이 응용 프로그램을 개발하려면
감사합니다,
전화 걸기 및 걸려 오는 전화를 차단하는 방법. –