I have customized UITableViewCell (Static Content Loaded from nib). This cell contains one UILable and I would like to change its value when user taps on it. (PickerView will be displayed and from that user can pick value for that lable).
So I have created following IBAction. But when I tried to connect it with that UIlable it does not allowed me to do so.
-(IBAction)selectlanguage:(UILabel *)sender
{
/*
Code to display pickerview and select appropriate language
*/
self.languageLable.text=@"Spanish";
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
appDelegate.userTranslationLanuage = @"en|sp";
}
Can anyone tell me what I am missing?
Sumit
Just put an invisible button on the label that’s connected to this IBAction. UILabel objects are not intended to respond directly to user touches.