이 코드를 사용하면 선택한 배열 텍스트에 따라 태그 값을 가져오고 싶습니다.사용자 정의 클래스에서 태그 값 가져 오기
- (IBAction)Share:(UIButton*)sender
{
menuItems =
@[
[KxMenuItem menuItem:@"Share"
image:nil
target:self
action:NULL],
[KxMenuItem menuItem:@"Share this on Facebook"
image:[UIImage imageNamed:@"facebook.png"]
target:self
action:@selector(pushMenuItem:)],
[KxMenuItem menuItem:@"Share this on Twitter"
image:[UIImage imageNamed:@"Twitter.png"]
target:self
action:@selector(pushMenuItem:)],
[KxMenuItem menuItem:@"Version 1.0"
image:nil
target:self
action:NULL],
];
first = menuItems[0];
first.foreColor = [UIColor colorWithRed:47/255.0f green:112/255.0f blue:225/255.0f alpha:1.0];
first.alignment = NSTextAlignmentCenter;
[KxMenu showMenuInView:self.view fromRect:sender.frame menuItems:menuItems];
}
- (void) pushMenuItem:(id)sender
{
NSLog(@"%@",sender);
}
송신자에 태그 값을 가져 오려고합니다. 어떻게이 사용자 정의 팝업 클래스에 태그 값을 설정할 수 있습니다. 내가 잘못 아니에요 경우 다음 MenuItem
는 KXMenuItem
무료로 사용 가능한 tag
재산이 없다는 것을 의미 UIView
의 서브 클래스 아닌, 배열
확인이 http://stackoverflow.com/questions/9146670/ios-uimenucontroller-uimenuitem-how-to-determine-item-selected-with-generic-sel/9874092#9874092 U 도움이 될 수 있습니다 ... – Kalpesh