We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__typeof (self) __weak weakSelf = self; REMenuItem *size350 = [[REMenuItem alloc]initWithTitle:@"Max Size 350" image:nil highlightedImage:nil action:^(REMenuItem *item){ size = 350; [self savingValues]; // calling method }];
every thing going right way.. menu open and on click it closes but the action method is not called... plz help on this...
The text was updated successfully, but these errors were encountered:
You can use initWithCustomView for menu click action. Like below code
UIView *itemView1 = [self createCustomMenuItem:@"MenuTitle 1" index:1]; REMenuItem *menuItem1 = [[REMenuItem alloc] initWithCustomView:itemView1]; [self setMemoItemProperty:menuItem1]; UIView *itemView2 = [self createCustomMenuItem:@"MenuTitle 2" index:2]; REMenuItem *menuItem2 = [[REMenuItem alloc] initWithCustomView:itemView2]; [self setMemoItemProperty:menuItem2];
- (UIView *) createCustomMenuItem:(NSString *)title index:(int)index { UIButton *customMenuItem = [[UIButton alloc] init]; customMenuItem.tag = index; customMenuItem.titleLabel.font = [UIFont fontWithName:@"OpenSans" size:12.0]; [customMenuItem setTitle:title forState:UIControlStateNormal]; [customMenuItem setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [customMenuItem addTarget:self action:@selector(menuItemTapHandler:) forControlEvents:UIControlEventTouchUpInside]; return customMenuItem; }
- (void) menuItemTapHandler:(UIButton *)sender { [self.menu close]; int index = (int) sender.tag; if (index == 1) { //Item 1 tap } else if (index == 2) { //Item 2 tap } }
Sorry, something went wrong.
No branches or pull requests
__typeof (self) __weak weakSelf = self;
REMenuItem *size350 = [[REMenuItem alloc]initWithTitle:@"Max Size 350" image:nil highlightedImage:nil action:^(REMenuItem *item){
size = 350;
[self savingValues]; // calling method
}];
every thing going right way.. menu open and on click it closes but the action method is not called... plz help on this...
The text was updated successfully, but these errors were encountered: