I want to pass a url through button action, because i have 10 buttons which are created through code dynamically and on clicking then there a specific url are assign for each corresponding button. Here is my code
NSString *linkUrl = [NSString stringWithFormat:@"%@",[AllrecordG objectForKey:@"Link"]];
[leftLabelG addTarget:self action:@selector(clickMe:linkUrl:) forControlEvents:UIControlEventTouchUpInside];
-(void)clickMe:(UIButton *)sender{
}
But here I get warning as "unused variable linkUrl".
I have studied different articles but somebody told that it is not possible to pass argument linke that. Anybody can tell me that how can i pass url for each button action and also how I retrieve those values. in the clickMe definition.
Thanks in advance.