我有这段代码,我希望它根据选定的数组文本获取标签值。
- (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
是数组