Как получить индекс WKInterfacebutton Tapped в WKinterfaceTable?
Мой код
-(void)addSelectionTarget:(id)target action:(SEL)action {
//You will need to add properties for these.
self.selectionTarget = target;
self.selectionAction = action;
}
//Call this when you want to call back to your interface controller
- (void)fireSelectionAction {
[self.selectionTarget performSelector:self.selectionAction];
//Or to do it without warnings on ARC
IMP imp = [self.selectionTarget methodForSelector:self.selectionAction];
void (*func)(id, SEL) = (void *)imp;
func(self.selectionTarget, self.selectionAction);
}
-(IBAction)btnclicked:(id)sender{
[self fireSelectionAction];
}