fastred / AHKActionSheet

An alternative to the UIActionSheet inspired by the Spotify app.
MIT License
1.16k stars 130 forks source link

allow user to keep track of item they selected. #33

Closed fahied closed 8 years ago

fahied commented 8 years ago

allow user to keep track of item they selected.

fastred commented 8 years ago

I'm sorry but I won't be merging this PR. The same functionality can be achieved by keeping state in blocks in the call site, e.g.:

    [actionSheet addButtonWithTitle:NSLocalizedString(@"Info", nil)
                              image:[UIImage imageNamed:@"Icon1"]
                               type:AHKActionSheetButtonTypeDefault
                            handler:^(AHKActionSheet *as) {
                                NSInteger index = 1;
                                NSLog(@"Info tapped");
                            }];