UNICORN - iOS
MActionsheetButtonView.h
1 //
2 // MActionsheetButtonView.h
3 //
4 // Created by maichi on 2014/07/30.
5 // Version:1.0
6 /*
7  [how to use]
8 
9  #import "MActionsheetButtonView.h"
10 
11  ・isCloseButtonがYESだと下にcancelボタンあり、NOだとなし
12 
13  // sample code
14  [MActionsheetButtonView showActionsheetButtonView:[NSArray arrayWithObjects:@"1番上", @"2番め", nil]
15  isCancelButton:YES
16  completion:^(NSInteger buttonIndex) {
17  // 1番上のボタンを押した時
18  if (buttonIndex == 1) {
19  NSLog(@"first button pushed");
20 
21  // 2番めのボタンを押した時
22  } else if (buttonIndex == 2) {
23  NSLog(@"second button pushed");
24  }
25  }];
26 
27  ※※ #define MACTIONBUTTON_FONT_COLOR でフォントカラー変更可
28 
29  */
30 
31 #import <UIKit/UIKit.h>
32 
33 // フォントカラー(デフォルトはiOSの標準風 #146dfa)
34 #define MACTIONBUTTON_FONT_COLOR [UIColor colorWithRed:0.078 green:0.427 blue:0.980 alpha:1.00]
35 #define MACTIONBUTTON_CANCEL_INDEX -1
36 
37 @interface MActionsheetButtonView : UIView
38 
39 + (MActionsheetButtonView *)showActionsheetButtonView:(NSArray *)buttonTitleArray
40  isCancelButton:(BOOL)isCancelButton
41  completion:(void (^)(NSInteger buttonIndex))completion;
42 
43 @end
Definition: MActionsheetButtonView.h:37