I'm new to iOS planet, and below is my sample code:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIButton * _btnSample = [UIButton buttonWithType:UIButtonTypeCustom];
[_btnSample setFrame: CGRectMake(100, 160, 200, 30)];
[_btnSample setBackgroundColor:[UIColor redColor]];
[_btnSample setTitle:@"Click Me" forState:UIControlStateNormal];
[_btnSample addTarget:self action:@selector(btnClick::)withObjects forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:_btnSample];
//[self btnClick:@"12" :@"13"];
}
- (void)btnClick :(NSString *) stringValue1 : (NSString *) stringValue2
{
NSLog(@"Click ME Button Clicked with a value::%@",stringValue1);
NSLog(@"Click ME Button Clicked with a value::%@",stringValue2);
}
in the @selector
i need to call btnClick
fn which has two parameters, how?