In was wondering whether its possible to create a button that calls a certain number (000) when pressed?
Please include everything as I am quite newb.
By everything I mean what I should put in both the header and implementation file.
In was wondering whether its possible to create a button that calls a certain number (000) when pressed?
Please include everything as I am quite newb.
By everything I mean what I should put in both the header and implementation file.
Use:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAnimated: animated];
UIButton *button = [UIButton buttonWithType: UIButtonTypeCustom];
button.frame = (CGRect){100,100,100,100};
[button addTarget: self action: @selector(makeCall:) forControlEvents: UIControlEventTouchDown];
[self.view addSubview: button];
}
- (void)makeCall:(id)sender
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"tel://000]];
}