├── .gitignore ├── DOPScrollableActionSheet.h ├── DOPScrollableActionSheet.m ├── DOPScrollableActionSheet ├── DOPScrollableActionSheet.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── DOPScrollableActionSheet │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── LaunchImage.launchimage │ │ │ └── Contents.json │ │ ├── copy.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_21@2x.png │ │ ├── dropbox.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_35@2x.png │ │ ├── email.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_18@2x.png │ │ ├── evernote.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_12@2x.png │ │ ├── fb.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_10@2x.png │ │ ├── g+.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_14@2x.png │ │ ├── in.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_16@2x.png │ │ ├── line.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_42@2x.png │ │ ├── pin.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_30@2x.png │ │ ├── pocket.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_26@2x.png │ │ ├── print.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_20@2x.png │ │ ├── qq.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_24@2x.png │ │ ├── qzone.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_6@2x.png │ │ ├── sms.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_19@2x.png │ │ ├── twitter.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_11@2x.png │ │ ├── weibo.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_1@2x.png │ │ ├── weixin.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_22@2x.png │ │ ├── whatsapp.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_43@2x.png │ │ └── wxFriends.imageset │ │ │ ├── Contents.json │ │ │ └── sns_icon_23@2x.png │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m └── DOPScrollableActionSheetTests │ ├── DOPScrollableActionSheetTests.m │ └── Info.plist ├── LICENSE ├── README.md └── images ├── sample_ipad.gif └── sample_iphone.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet.h: -------------------------------------------------------------------------------- 1 | // 2 | // DOPScrollableActionSheet.h 3 | // DOPScrollableActionSheet 4 | // 5 | // Created by weizhou on 12/27/14. 6 | // Copyright (c) 2014 fengweizhou. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class DOPAction; 13 | 14 | //DOPAction model 15 | //DOPScrollableActionSheet view and partial controller for showing and programmatical dismissing 16 | 17 | //multi scrollable row actionsheet 18 | //only for iPhone 19 | @interface DOPScrollableActionSheet : UIView 20 | /* 21 | actions = @[@"row title one", //with title 22 | @[action1, action2, action3, ...], 23 | @"row title two", //with title 24 | @[action4, action5], 25 | @"", //without title 26 | @[action6, action7], 27 | ...]; 28 | */ 29 | - (instancetype)initWithActionArray:(NSArray *)actions; 30 | 31 | //always show in a new window 32 | - (void)show; 33 | - (void)dismiss; 34 | @end 35 | 36 | #pragma mark - DOPAction interface 37 | @interface DOPAction : NSObject 38 | 39 | @property (nonatomic, copy) NSString *iconName; 40 | @property (nonatomic, copy) NSString *actionName; 41 | @property (nonatomic, copy) void(^handler)(void); 42 | 43 | - (instancetype)initWithName:(NSString *)name 44 | iconName:(NSString *)iconName 45 | handler:(void(^)(void))handler; 46 | 47 | @end -------------------------------------------------------------------------------- /DOPScrollableActionSheet.m: -------------------------------------------------------------------------------- 1 | // 2 | // DOPScrollableActionSheet.m 3 | // DOPScrollableActionSheet 4 | // 5 | // Created by weizhou on 12/27/14. 6 | // Copyright (c) 2014 fengweizhou. All rights reserved. 7 | // 8 | 9 | #import "DOPScrollableActionSheet.h" 10 | 11 | static CGFloat horizontalMargin = 20.0; 12 | 13 | @interface DOPScrollableActionSheet () 14 | 15 | @property (nonatomic, assign) CGRect screenRect; 16 | @property (nonatomic, strong) UIWindow *window; 17 | @property (nonatomic, strong) UIView *dimBackground; 18 | @property (nonatomic, copy ) NSArray *actions; 19 | @property (nonatomic, strong) NSMutableArray *buttons; 20 | @property (nonatomic, strong) NSMutableArray *handlers; 21 | @property (nonatomic, copy) void(^dismissHandler)(void); 22 | 23 | @end 24 | 25 | @implementation DOPScrollableActionSheet 26 | 27 | - (instancetype)initWithActionArray:(NSArray *)actions { 28 | self = [super init]; 29 | if (self) { 30 | _screenRect = [UIScreen mainScreen].bounds; 31 | if ([[UIDevice currentDevice].systemVersion floatValue] < 7.5 && 32 | UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)) { 33 | _screenRect = CGRectMake(0, 0, _screenRect.size.height, _screenRect.size.width); 34 | } 35 | _actions = actions; 36 | _buttons = [NSMutableArray array]; 37 | _handlers = [NSMutableArray array]; 38 | _dimBackground = [[UIView alloc] initWithFrame:_screenRect]; 39 | _dimBackground.backgroundColor = [UIColor clearColor]; 40 | UITapGestureRecognizer *gr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismiss)]; 41 | [_dimBackground addGestureRecognizer:gr]; 42 | self.backgroundColor = [UIColor colorWithWhite:1 alpha:0.8]; 43 | 44 | NSInteger rowCount = _actions.count; 45 | 46 | /*calculate action sheet frame begin*/ 47 | //row title screenwidth*40 without row title margin screenwidth*20 48 | //60*60 icon 60*30 icon name 49 | CGFloat height = 0.0; 50 | for (int i = 0; i < rowCount; i++) { 51 | if ([_actions[i] isKindOfClass:[NSString class]]) { 52 | if ([_actions[i] isEqualToString:@""]) { 53 | height += 20; 54 | } else { 55 | height += 40; 56 | } 57 | } else { 58 | height = height+60+30; 59 | } 60 | } 61 | //cancel button screenwidth*60 62 | height += 60; 63 | /*calculation end*/ 64 | self.frame = CGRectMake(0, _screenRect.size.height, _screenRect.size.width, height); 65 | 66 | //add each row 67 | CGFloat y = 0.0; 68 | for (int i = 0; i < rowCount; i++) { 69 | if ([_actions[i] isKindOfClass:[NSString class]]) { 70 | //title 71 | if ([_actions[i] isEqualToString:@""]) { 72 | UIView *marginView = [[UIView alloc] initWithFrame:CGRectMake(0, y, _screenRect.size.width, 20.0)]; 73 | [self addSubview:marginView]; 74 | y+=20; 75 | } else { 76 | UILabel *rowTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, y, _screenRect.size.width, 40.0)]; 77 | rowTitle.font = [UIFont systemFontOfSize:14.0]; 78 | rowTitle.text = _actions[i]; 79 | rowTitle.textAlignment = NSTextAlignmentCenter; 80 | [self addSubview:rowTitle]; 81 | y+=40; 82 | } 83 | } else { 84 | NSArray *items = _actions[i]; 85 | //actions array 86 | UIScrollView *rowContainer = [[UIScrollView alloc] initWithFrame:CGRectMake(0, y, _screenRect.size.width, 90)]; 87 | rowContainer.directionalLockEnabled = YES; 88 | rowContainer.showsHorizontalScrollIndicator = NO; 89 | rowContainer.showsVerticalScrollIndicator = NO; 90 | rowContainer.contentSize = CGSizeMake(items.count*80+20, 90); 91 | [self addSubview:rowContainer]; 92 | //add each item 93 | CGFloat x = horizontalMargin; 94 | for (int j = 0; j < items.count; j++) { 95 | DOPAction *action = items[j]; 96 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 97 | button.frame = CGRectMake(x, 0, 60, 60); 98 | [button setImage:[UIImage imageNamed:action.iconName] forState:UIControlStateNormal]; 99 | [button addTarget:self action:@selector(handlePress:) forControlEvents:UIControlEventTouchUpInside]; 100 | [rowContainer addSubview:button]; 101 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(x, 60, 60, 30)]; 102 | label.text = action.actionName; 103 | label.font = [UIFont systemFontOfSize:13.0]; 104 | label.textAlignment = NSTextAlignmentCenter; 105 | [rowContainer addSubview:label]; 106 | x = x + 60 + horizontalMargin; 107 | 108 | [_buttons addObject:button]; 109 | [_handlers addObject:action.handler]; 110 | } 111 | y+=90; 112 | UIView *separator = [[UIView alloc] initWithFrame:CGRectMake(0, y, _screenRect.size.width,0.5)]; 113 | separator.backgroundColor = [UIColor lightGrayColor]; 114 | [self addSubview:separator]; 115 | } 116 | } 117 | UIButton *cancel = [UIButton buttonWithType:UIButtonTypeSystem]; 118 | cancel.frame = CGRectMake(0, y, _screenRect.size.width, 60); 119 | [cancel setTitle:NSLocalizedString(@"Cancel", @"cancel button name") forState:UIControlStateNormal]; 120 | [cancel setTitleColor:[UIColor purpleColor] forState:UIControlStateNormal]; 121 | cancel.titleLabel.font = [UIFont systemFontOfSize:25]; 122 | cancel.backgroundColor = [UIColor whiteColor]; 123 | [self addSubview:cancel]; 124 | [cancel addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside]; 125 | } 126 | return self; 127 | } 128 | 129 | - (void)handlePress:(UIButton *)button { 130 | NSInteger index = [self.buttons indexOfObject:button]; 131 | if (index != self.buttons.count-1) { 132 | void(^handler)(void) = self.handlers[index]; 133 | handler(); 134 | } 135 | [self dismiss]; 136 | } 137 | 138 | - (void)show { 139 | self.window = [[UIWindow alloc] initWithFrame:self.screenRect]; 140 | self.window.windowLevel = UIWindowLevelAlert; 141 | self.window.backgroundColor = [UIColor clearColor]; 142 | self.window.rootViewController = [UIViewController new]; 143 | self.window.rootViewController.view.backgroundColor = [UIColor clearColor]; 144 | 145 | [self.window.rootViewController.view addSubview:self.dimBackground]; 146 | 147 | [self.window.rootViewController.view addSubview:self]; 148 | 149 | self.window.hidden = NO; 150 | [UIView animateWithDuration:0.2 animations:^{ 151 | self.dimBackground.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.2]; 152 | self.frame = CGRectMake(0, self.screenRect.size.height-self.frame.size.height, self.frame.size.width, self.frame.size.height); 153 | } completion:^(BOOL finished) { 154 | // 155 | }]; 156 | } 157 | 158 | - (void)dismiss { 159 | [UIView animateWithDuration:0.2 animations:^{ 160 | self.dimBackground.backgroundColor = [UIColor clearColor]; 161 | self.frame = CGRectMake(0, self.screenRect.size.height, self.frame.size.width, self.frame.size.height); 162 | } completion:^(BOOL finished) { 163 | self.window = nil; 164 | }]; 165 | } 166 | 167 | @end 168 | 169 | @implementation DOPAction 170 | 171 | - (instancetype)initWithName:(NSString *)name iconName:(NSString *)iconName handler:(void(^)(void))handler { 172 | self = [super init]; 173 | if (self) { 174 | _actionName = name; 175 | _iconName = iconName; 176 | _handler = handler; 177 | } 178 | return self; 179 | } 180 | 181 | @end 182 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8728AF541A4EFC64007609D4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8728AF531A4EFC64007609D4 /* main.m */; }; 11 | 8728AF571A4EFC64007609D4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8728AF561A4EFC64007609D4 /* AppDelegate.m */; }; 12 | 8728AF5A1A4EFC64007609D4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8728AF591A4EFC64007609D4 /* ViewController.m */; }; 13 | 8728AF5D1A4EFC64007609D4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8728AF5B1A4EFC64007609D4 /* Main.storyboard */; }; 14 | 8728AF5F1A4EFC64007609D4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8728AF5E1A4EFC64007609D4 /* Images.xcassets */; }; 15 | 8728AF6E1A4EFC65007609D4 /* DOPScrollableActionSheetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8728AF6D1A4EFC65007609D4 /* DOPScrollableActionSheetTests.m */; }; 16 | 8728AF791A4F0022007609D4 /* DOPScrollableActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 8728AF781A4F0022007609D4 /* DOPScrollableActionSheet.m */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 8728AF681A4EFC64007609D4 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 8728AF461A4EFC64007609D4 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 8728AF4D1A4EFC64007609D4; 25 | remoteInfo = DOPScrollableActionSheet; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 8728AF4E1A4EFC64007609D4 /* DOPScrollableActionSheet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DOPScrollableActionSheet.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 8728AF521A4EFC64007609D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 8728AF531A4EFC64007609D4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 8728AF551A4EFC64007609D4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 34 | 8728AF561A4EFC64007609D4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 35 | 8728AF581A4EFC64007609D4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 36 | 8728AF591A4EFC64007609D4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 37 | 8728AF5C1A4EFC64007609D4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 38 | 8728AF5E1A4EFC64007609D4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 39 | 8728AF671A4EFC64007609D4 /* DOPScrollableActionSheetTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DOPScrollableActionSheetTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 8728AF6C1A4EFC64007609D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 8728AF6D1A4EFC65007609D4 /* DOPScrollableActionSheetTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DOPScrollableActionSheetTests.m; sourceTree = ""; }; 42 | 8728AF771A4F0022007609D4 /* DOPScrollableActionSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOPScrollableActionSheet.h; path = ../../DOPScrollableActionSheet.h; sourceTree = ""; }; 43 | 8728AF781A4F0022007609D4 /* DOPScrollableActionSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DOPScrollableActionSheet.m; path = ../../DOPScrollableActionSheet.m; sourceTree = ""; }; 44 | /* End PBXFileReference section */ 45 | 46 | /* Begin PBXFrameworksBuildPhase section */ 47 | 8728AF4B1A4EFC64007609D4 /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | 8728AF641A4EFC64007609D4 /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 8728AF451A4EFC64007609D4 = { 65 | isa = PBXGroup; 66 | children = ( 67 | 8728AF501A4EFC64007609D4 /* DOPScrollableActionSheet */, 68 | 8728AF6A1A4EFC64007609D4 /* DOPScrollableActionSheetTests */, 69 | 8728AF4F1A4EFC64007609D4 /* Products */, 70 | ); 71 | sourceTree = ""; 72 | }; 73 | 8728AF4F1A4EFC64007609D4 /* Products */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 8728AF4E1A4EFC64007609D4 /* DOPScrollableActionSheet.app */, 77 | 8728AF671A4EFC64007609D4 /* DOPScrollableActionSheetTests.xctest */, 78 | ); 79 | name = Products; 80 | sourceTree = ""; 81 | }; 82 | 8728AF501A4EFC64007609D4 /* DOPScrollableActionSheet */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 8728AF551A4EFC64007609D4 /* AppDelegate.h */, 86 | 8728AF561A4EFC64007609D4 /* AppDelegate.m */, 87 | 8728AF581A4EFC64007609D4 /* ViewController.h */, 88 | 8728AF591A4EFC64007609D4 /* ViewController.m */, 89 | 8728AF771A4F0022007609D4 /* DOPScrollableActionSheet.h */, 90 | 8728AF781A4F0022007609D4 /* DOPScrollableActionSheet.m */, 91 | 8728AF5B1A4EFC64007609D4 /* Main.storyboard */, 92 | 8728AF5E1A4EFC64007609D4 /* Images.xcassets */, 93 | 8728AF511A4EFC64007609D4 /* Supporting Files */, 94 | ); 95 | path = DOPScrollableActionSheet; 96 | sourceTree = ""; 97 | }; 98 | 8728AF511A4EFC64007609D4 /* Supporting Files */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 8728AF521A4EFC64007609D4 /* Info.plist */, 102 | 8728AF531A4EFC64007609D4 /* main.m */, 103 | ); 104 | name = "Supporting Files"; 105 | sourceTree = ""; 106 | }; 107 | 8728AF6A1A4EFC64007609D4 /* DOPScrollableActionSheetTests */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 8728AF6D1A4EFC65007609D4 /* DOPScrollableActionSheetTests.m */, 111 | 8728AF6B1A4EFC64007609D4 /* Supporting Files */, 112 | ); 113 | path = DOPScrollableActionSheetTests; 114 | sourceTree = ""; 115 | }; 116 | 8728AF6B1A4EFC64007609D4 /* Supporting Files */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 8728AF6C1A4EFC64007609D4 /* Info.plist */, 120 | ); 121 | name = "Supporting Files"; 122 | sourceTree = ""; 123 | }; 124 | /* End PBXGroup section */ 125 | 126 | /* Begin PBXNativeTarget section */ 127 | 8728AF4D1A4EFC64007609D4 /* DOPScrollableActionSheet */ = { 128 | isa = PBXNativeTarget; 129 | buildConfigurationList = 8728AF711A4EFC65007609D4 /* Build configuration list for PBXNativeTarget "DOPScrollableActionSheet" */; 130 | buildPhases = ( 131 | 8728AF4A1A4EFC64007609D4 /* Sources */, 132 | 8728AF4B1A4EFC64007609D4 /* Frameworks */, 133 | 8728AF4C1A4EFC64007609D4 /* Resources */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | ); 139 | name = DOPScrollableActionSheet; 140 | productName = DOPScrollableActionSheet; 141 | productReference = 8728AF4E1A4EFC64007609D4 /* DOPScrollableActionSheet.app */; 142 | productType = "com.apple.product-type.application"; 143 | }; 144 | 8728AF661A4EFC64007609D4 /* DOPScrollableActionSheetTests */ = { 145 | isa = PBXNativeTarget; 146 | buildConfigurationList = 8728AF741A4EFC65007609D4 /* Build configuration list for PBXNativeTarget "DOPScrollableActionSheetTests" */; 147 | buildPhases = ( 148 | 8728AF631A4EFC64007609D4 /* Sources */, 149 | 8728AF641A4EFC64007609D4 /* Frameworks */, 150 | 8728AF651A4EFC64007609D4 /* Resources */, 151 | ); 152 | buildRules = ( 153 | ); 154 | dependencies = ( 155 | 8728AF691A4EFC64007609D4 /* PBXTargetDependency */, 156 | ); 157 | name = DOPScrollableActionSheetTests; 158 | productName = DOPScrollableActionSheetTests; 159 | productReference = 8728AF671A4EFC64007609D4 /* DOPScrollableActionSheetTests.xctest */; 160 | productType = "com.apple.product-type.bundle.unit-test"; 161 | }; 162 | /* End PBXNativeTarget section */ 163 | 164 | /* Begin PBXProject section */ 165 | 8728AF461A4EFC64007609D4 /* Project object */ = { 166 | isa = PBXProject; 167 | attributes = { 168 | LastUpgradeCheck = 0610; 169 | ORGANIZATIONNAME = fengweizhou; 170 | TargetAttributes = { 171 | 8728AF4D1A4EFC64007609D4 = { 172 | CreatedOnToolsVersion = 6.1.1; 173 | }; 174 | 8728AF661A4EFC64007609D4 = { 175 | CreatedOnToolsVersion = 6.1.1; 176 | TestTargetID = 8728AF4D1A4EFC64007609D4; 177 | }; 178 | }; 179 | }; 180 | buildConfigurationList = 8728AF491A4EFC64007609D4 /* Build configuration list for PBXProject "DOPScrollableActionSheet" */; 181 | compatibilityVersion = "Xcode 3.2"; 182 | developmentRegion = English; 183 | hasScannedForEncodings = 0; 184 | knownRegions = ( 185 | en, 186 | Base, 187 | ); 188 | mainGroup = 8728AF451A4EFC64007609D4; 189 | productRefGroup = 8728AF4F1A4EFC64007609D4 /* Products */; 190 | projectDirPath = ""; 191 | projectRoot = ""; 192 | targets = ( 193 | 8728AF4D1A4EFC64007609D4 /* DOPScrollableActionSheet */, 194 | 8728AF661A4EFC64007609D4 /* DOPScrollableActionSheetTests */, 195 | ); 196 | }; 197 | /* End PBXProject section */ 198 | 199 | /* Begin PBXResourcesBuildPhase section */ 200 | 8728AF4C1A4EFC64007609D4 /* Resources */ = { 201 | isa = PBXResourcesBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | 8728AF5D1A4EFC64007609D4 /* Main.storyboard in Resources */, 205 | 8728AF5F1A4EFC64007609D4 /* Images.xcassets in Resources */, 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | }; 209 | 8728AF651A4EFC64007609D4 /* Resources */ = { 210 | isa = PBXResourcesBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | }; 216 | /* End PBXResourcesBuildPhase section */ 217 | 218 | /* Begin PBXSourcesBuildPhase section */ 219 | 8728AF4A1A4EFC64007609D4 /* Sources */ = { 220 | isa = PBXSourcesBuildPhase; 221 | buildActionMask = 2147483647; 222 | files = ( 223 | 8728AF5A1A4EFC64007609D4 /* ViewController.m in Sources */, 224 | 8728AF571A4EFC64007609D4 /* AppDelegate.m in Sources */, 225 | 8728AF791A4F0022007609D4 /* DOPScrollableActionSheet.m in Sources */, 226 | 8728AF541A4EFC64007609D4 /* main.m in Sources */, 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | 8728AF631A4EFC64007609D4 /* Sources */ = { 231 | isa = PBXSourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | 8728AF6E1A4EFC65007609D4 /* DOPScrollableActionSheetTests.m in Sources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | /* End PBXSourcesBuildPhase section */ 239 | 240 | /* Begin PBXTargetDependency section */ 241 | 8728AF691A4EFC64007609D4 /* PBXTargetDependency */ = { 242 | isa = PBXTargetDependency; 243 | target = 8728AF4D1A4EFC64007609D4 /* DOPScrollableActionSheet */; 244 | targetProxy = 8728AF681A4EFC64007609D4 /* PBXContainerItemProxy */; 245 | }; 246 | /* End PBXTargetDependency section */ 247 | 248 | /* Begin PBXVariantGroup section */ 249 | 8728AF5B1A4EFC64007609D4 /* Main.storyboard */ = { 250 | isa = PBXVariantGroup; 251 | children = ( 252 | 8728AF5C1A4EFC64007609D4 /* Base */, 253 | ); 254 | name = Main.storyboard; 255 | sourceTree = ""; 256 | }; 257 | /* End PBXVariantGroup section */ 258 | 259 | /* Begin XCBuildConfiguration section */ 260 | 8728AF6F1A4EFC65007609D4 /* Debug */ = { 261 | isa = XCBuildConfiguration; 262 | buildSettings = { 263 | ALWAYS_SEARCH_USER_PATHS = NO; 264 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 265 | CLANG_CXX_LIBRARY = "libc++"; 266 | CLANG_ENABLE_MODULES = YES; 267 | CLANG_ENABLE_OBJC_ARC = YES; 268 | CLANG_WARN_BOOL_CONVERSION = YES; 269 | CLANG_WARN_CONSTANT_CONVERSION = YES; 270 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 271 | CLANG_WARN_EMPTY_BODY = YES; 272 | CLANG_WARN_ENUM_CONVERSION = YES; 273 | CLANG_WARN_INT_CONVERSION = YES; 274 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 275 | CLANG_WARN_UNREACHABLE_CODE = YES; 276 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 277 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 278 | COPY_PHASE_STRIP = NO; 279 | ENABLE_STRICT_OBJC_MSGSEND = YES; 280 | GCC_C_LANGUAGE_STANDARD = gnu99; 281 | GCC_DYNAMIC_NO_PIC = NO; 282 | GCC_OPTIMIZATION_LEVEL = 0; 283 | GCC_PREPROCESSOR_DEFINITIONS = ( 284 | "DEBUG=1", 285 | "$(inherited)", 286 | ); 287 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 288 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 289 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 290 | GCC_WARN_UNDECLARED_SELECTOR = YES; 291 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 292 | GCC_WARN_UNUSED_FUNCTION = YES; 293 | GCC_WARN_UNUSED_VARIABLE = YES; 294 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 295 | MTL_ENABLE_DEBUG_INFO = YES; 296 | ONLY_ACTIVE_ARCH = YES; 297 | SDKROOT = iphoneos; 298 | }; 299 | name = Debug; 300 | }; 301 | 8728AF701A4EFC65007609D4 /* Release */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ALWAYS_SEARCH_USER_PATHS = NO; 305 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 306 | CLANG_CXX_LIBRARY = "libc++"; 307 | CLANG_ENABLE_MODULES = YES; 308 | CLANG_ENABLE_OBJC_ARC = YES; 309 | CLANG_WARN_BOOL_CONVERSION = YES; 310 | CLANG_WARN_CONSTANT_CONVERSION = YES; 311 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 312 | CLANG_WARN_EMPTY_BODY = YES; 313 | CLANG_WARN_ENUM_CONVERSION = YES; 314 | CLANG_WARN_INT_CONVERSION = YES; 315 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 316 | CLANG_WARN_UNREACHABLE_CODE = YES; 317 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 318 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 319 | COPY_PHASE_STRIP = YES; 320 | ENABLE_NS_ASSERTIONS = NO; 321 | ENABLE_STRICT_OBJC_MSGSEND = YES; 322 | GCC_C_LANGUAGE_STANDARD = gnu99; 323 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 324 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 325 | GCC_WARN_UNDECLARED_SELECTOR = YES; 326 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 327 | GCC_WARN_UNUSED_FUNCTION = YES; 328 | GCC_WARN_UNUSED_VARIABLE = YES; 329 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 330 | MTL_ENABLE_DEBUG_INFO = NO; 331 | SDKROOT = iphoneos; 332 | VALIDATE_PRODUCT = YES; 333 | }; 334 | name = Release; 335 | }; 336 | 8728AF721A4EFC65007609D4 /* Debug */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 340 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 341 | INFOPLIST_FILE = DOPScrollableActionSheet/Info.plist; 342 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 343 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 344 | PRODUCT_NAME = "$(TARGET_NAME)"; 345 | TARGETED_DEVICE_FAMILY = "1,2"; 346 | }; 347 | name = Debug; 348 | }; 349 | 8728AF731A4EFC65007609D4 /* Release */ = { 350 | isa = XCBuildConfiguration; 351 | buildSettings = { 352 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 353 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 354 | INFOPLIST_FILE = DOPScrollableActionSheet/Info.plist; 355 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 356 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 357 | PRODUCT_NAME = "$(TARGET_NAME)"; 358 | TARGETED_DEVICE_FAMILY = "1,2"; 359 | }; 360 | name = Release; 361 | }; 362 | 8728AF751A4EFC65007609D4 /* Debug */ = { 363 | isa = XCBuildConfiguration; 364 | buildSettings = { 365 | BUNDLE_LOADER = "$(TEST_HOST)"; 366 | FRAMEWORK_SEARCH_PATHS = ( 367 | "$(SDKROOT)/Developer/Library/Frameworks", 368 | "$(inherited)", 369 | ); 370 | GCC_PREPROCESSOR_DEFINITIONS = ( 371 | "DEBUG=1", 372 | "$(inherited)", 373 | ); 374 | INFOPLIST_FILE = DOPScrollableActionSheetTests/Info.plist; 375 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 376 | PRODUCT_NAME = "$(TARGET_NAME)"; 377 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DOPScrollableActionSheet.app/DOPScrollableActionSheet"; 378 | }; 379 | name = Debug; 380 | }; 381 | 8728AF761A4EFC65007609D4 /* Release */ = { 382 | isa = XCBuildConfiguration; 383 | buildSettings = { 384 | BUNDLE_LOADER = "$(TEST_HOST)"; 385 | FRAMEWORK_SEARCH_PATHS = ( 386 | "$(SDKROOT)/Developer/Library/Frameworks", 387 | "$(inherited)", 388 | ); 389 | INFOPLIST_FILE = DOPScrollableActionSheetTests/Info.plist; 390 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 391 | PRODUCT_NAME = "$(TARGET_NAME)"; 392 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DOPScrollableActionSheet.app/DOPScrollableActionSheet"; 393 | }; 394 | name = Release; 395 | }; 396 | /* End XCBuildConfiguration section */ 397 | 398 | /* Begin XCConfigurationList section */ 399 | 8728AF491A4EFC64007609D4 /* Build configuration list for PBXProject "DOPScrollableActionSheet" */ = { 400 | isa = XCConfigurationList; 401 | buildConfigurations = ( 402 | 8728AF6F1A4EFC65007609D4 /* Debug */, 403 | 8728AF701A4EFC65007609D4 /* Release */, 404 | ); 405 | defaultConfigurationIsVisible = 0; 406 | defaultConfigurationName = Release; 407 | }; 408 | 8728AF711A4EFC65007609D4 /* Build configuration list for PBXNativeTarget "DOPScrollableActionSheet" */ = { 409 | isa = XCConfigurationList; 410 | buildConfigurations = ( 411 | 8728AF721A4EFC65007609D4 /* Debug */, 412 | 8728AF731A4EFC65007609D4 /* Release */, 413 | ); 414 | defaultConfigurationIsVisible = 0; 415 | }; 416 | 8728AF741A4EFC65007609D4 /* Build configuration list for PBXNativeTarget "DOPScrollableActionSheetTests" */ = { 417 | isa = XCConfigurationList; 418 | buildConfigurations = ( 419 | 8728AF751A4EFC65007609D4 /* Debug */, 420 | 8728AF761A4EFC65007609D4 /* Release */, 421 | ); 422 | defaultConfigurationIsVisible = 0; 423 | }; 424 | /* End XCConfigurationList section */ 425 | }; 426 | rootObject = 8728AF461A4EFC64007609D4 /* Project object */; 427 | } 428 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DOPScrollableActionSheet 4 | // 5 | // Created by weizhou on 12/27/14. 6 | // Copyright (c) 2014 fengweizhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // DOPScrollableActionSheet 4 | // 5 | // Created by weizhou on 12/27/14. 6 | // Copyright (c) 2014 fengweizhou. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "minimum-system-version" : "7.0", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "orientation" : "portrait", 11 | "idiom" : "iphone", 12 | "minimum-system-version" : "7.0", 13 | "subtype" : "retina4", 14 | "scale" : "2x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/copy.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_21@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/copy.imageset/sns_icon_21@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/copy.imageset/sns_icon_21@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/dropbox.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_35@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/dropbox.imageset/sns_icon_35@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/dropbox.imageset/sns_icon_35@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/email.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_18@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/email.imageset/sns_icon_18@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/email.imageset/sns_icon_18@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/evernote.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_12@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/evernote.imageset/sns_icon_12@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/evernote.imageset/sns_icon_12@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/fb.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_10@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/fb.imageset/sns_icon_10@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/fb.imageset/sns_icon_10@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/g+.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_14@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/g+.imageset/sns_icon_14@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/g+.imageset/sns_icon_14@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/in.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_16@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/in.imageset/sns_icon_16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/in.imageset/sns_icon_16@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/line.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_42@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/line.imageset/sns_icon_42@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/line.imageset/sns_icon_42@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/pin.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_30@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/pin.imageset/sns_icon_30@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/pin.imageset/sns_icon_30@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/pocket.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_26@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/pocket.imageset/sns_icon_26@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/pocket.imageset/sns_icon_26@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/print.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_20@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/print.imageset/sns_icon_20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/print.imageset/sns_icon_20@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/qq.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_24@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/qq.imageset/sns_icon_24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/qq.imageset/sns_icon_24@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/qzone.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_6@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/qzone.imageset/sns_icon_6@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/qzone.imageset/sns_icon_6@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/sms.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_19@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/sms.imageset/sns_icon_19@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/sms.imageset/sns_icon_19@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/twitter.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_11@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/twitter.imageset/sns_icon_11@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/twitter.imageset/sns_icon_11@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/weibo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_1@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/weibo.imageset/sns_icon_1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/weibo.imageset/sns_icon_1@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/weixin.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_22@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/weixin.imageset/sns_icon_22@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/weixin.imageset/sns_icon_22@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/whatsapp.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_43@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/whatsapp.imageset/sns_icon_43@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/whatsapp.imageset/sns_icon_43@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/wxFriends.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "sns_icon_23@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/wxFriends.imageset/sns_icon_23@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/DOPScrollableActionSheet/DOPScrollableActionSheet/Images.xcassets/wxFriends.imageset/sns_icon_23@2x.png -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | fengweizhou.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | Main 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | UIInterfaceOrientationPortraitUpsideDown 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // DOPScrollableActionSheet 4 | // 5 | // Created by weizhou on 12/27/14. 6 | // Copyright (c) 2014 fengweizhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UITableViewController 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // DOPScrollableActionSheet 4 | // 5 | // Created by weizhou on 12/27/14. 6 | // Copyright (c) 2014 fengweizhou. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "DOPScrollableActionSheet.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | BOOL isIPhone = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone; 21 | self.title = isIPhone?@"DOPScrollableActionSheet on iPhone":@"DOPScrollableActionSheet on iPad"; 22 | } 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | } 27 | 28 | #pragma mark - table view delegate 29 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 30 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 31 | DOPAction *action1 = [[DOPAction alloc] initWithName:@"Wechat" iconName:@"weixin" handler:^{ 32 | // 33 | }]; 34 | DOPAction *action2 = [[DOPAction alloc] initWithName:@"QQ" iconName:@"qq" handler:^{ 35 | // 36 | }]; 37 | DOPAction *action3 = [[DOPAction alloc] initWithName:@"WxFriends" iconName:@"wxFriends" handler:^{ 38 | // 39 | }]; 40 | DOPAction *action4 = [[DOPAction alloc] initWithName:@"Qzone" iconName:@"qzone" handler:^{ 41 | // 42 | }]; 43 | DOPAction *action5 = [[DOPAction alloc] initWithName:@"Weibo" iconName:@"weibo" handler:^{ 44 | // 45 | }]; 46 | DOPAction *action6 = [[DOPAction alloc] initWithName:@"Twitter" iconName:@"twitter" handler:^{ 47 | // 48 | }]; 49 | DOPAction *action7 = [[DOPAction alloc] initWithName:@"Facebook" iconName:@"fb" handler:^{ 50 | // 51 | }]; 52 | DOPAction *action8 = [[DOPAction alloc] initWithName:@"G+" iconName:@"g+" handler:^{ 53 | // 54 | }]; 55 | DOPAction *action9 = [[DOPAction alloc] initWithName:@"Pin" iconName:@"pin" handler:^{ 56 | // 57 | }]; 58 | DOPAction *action10 = [[DOPAction alloc] initWithName:@"Whatsapp" iconName:@"whatsapp" handler:^{ 59 | // 60 | }]; 61 | DOPAction *action11 = [[DOPAction alloc] initWithName:@"Line" iconName:@"line" handler:^{ 62 | // 63 | }]; 64 | DOPAction *action12 = [[DOPAction alloc] initWithName:@"SMS" iconName:@"sms" handler:^{ 65 | // 66 | }]; 67 | DOPAction *action13 = [[DOPAction alloc] initWithName:@"Email" iconName:@"email" handler:^{ 68 | // 69 | }]; 70 | DOPAction *action14 = [[DOPAction alloc] initWithName:@"Print" iconName:@"print" handler:^{ 71 | // 72 | }]; 73 | DOPAction *action15 = [[DOPAction alloc] initWithName:@"Copy" iconName:@"copy" handler:^{ 74 | // 75 | }]; 76 | 77 | NSArray *actions; 78 | 79 | switch (indexPath.row) { 80 | case 0:{ 81 | actions = @[@"", @[action1, action2, action3, action4, action5]]; 82 | } break; 83 | case 1:{ 84 | actions = @[@"Share", @[action1, action2, action3, action4, action5]]; 85 | } break; 86 | case 2:{ 87 | actions = @[@"Share", 88 | @[action1, action2, action3, action4, action5], 89 | @"", 90 | @[action6, action7, action8, action9, action10, action11]]; 91 | } break; 92 | case 3:{ 93 | actions = @[@"Share", 94 | @[action1, action2, action3, action4, action5], 95 | @"Share More", 96 | @[action6, action7, action8, action9, action10, action11], 97 | @"", 98 | @[action12, action13, action14, action15]]; 99 | } break; 100 | default: 101 | break; 102 | } 103 | 104 | DOPScrollableActionSheet *as = [[DOPScrollableActionSheet alloc] initWithActionArray:actions]; 105 | [as show]; 106 | } 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheet/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DOPScrollableActionSheet 4 | // 5 | // Created by weizhou on 12/27/14. 6 | // Copyright (c) 2014 fengweizhou. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheetTests/DOPScrollableActionSheetTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // DOPScrollableActionSheetTests.m 3 | // DOPScrollableActionSheetTests 4 | // 5 | // Created by weizhou on 12/27/14. 6 | // Copyright (c) 2014 fengweizhou. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface DOPScrollableActionSheetTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation DOPScrollableActionSheetTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /DOPScrollableActionSheet/DOPScrollableActionSheetTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | fengweizhou.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Weizhou 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DOPScrollableActionSheet 2 | ======================== 3 | 4 | Multi-row scrollable action sheet 5 | 6 | tested on 7 | 8 | 1. iPad Air 7.1 8.1 9 | 2. iPhone5s 7.1 8.1 10 | 11 | 12 | on iPad 13 | 14 | ![image](https://github.com/dopcn/DOPScrollableActionSheet/blob/master/images/sample_ipad.gif) 15 | 16 | on iPhone 17 | ![image](https://github.com/dopcn/DOPScrollableActionSheet/blob/master/images/sample_iphone.gif) 18 | 19 | ```objc 20 | //DOPAction model 21 | //DOPScrollableActionSheet view and partial controller for showing and programmatical dismissing 22 | 23 | //multi scrollable row actionsheet 24 | @interface DOPScrollableActionSheet : UIView 25 | /* 26 | actions = @[@"row title one", //with title 27 | @[action1, action2, action3, ...], 28 | @"row title two", //with title 29 | @[action4, action5], 30 | @"", //without title 31 | @[action6, action7], 32 | ...]; 33 | */ 34 | - (instancetype)initWithActionArray:(NSArray *)actions; 35 | 36 | //always show in a new window 37 | - (void)show; 38 | - (void)dismiss; 39 | @end 40 | 41 | #pragma mark - DOPAction interface 42 | @interface DOPAction : NSObject 43 | 44 | @property (nonatomic, copy) NSString *iconName; 45 | @property (nonatomic, copy) NSString *actionName; 46 | @property (nonatomic, copy) void(^handler)(void); 47 | 48 | - (instancetype)initWithName:(NSString *)name 49 | iconName:(NSString *)iconName 50 | handler:(void(^)(void))handler; 51 | 52 | @end 53 | ``` 54 | 55 | all the icons come from [mob.com](http:mob.com) -------------------------------------------------------------------------------- /images/sample_ipad.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/images/sample_ipad.gif -------------------------------------------------------------------------------- /images/sample_iphone.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopcn/DOPScrollableActionSheet/96722f510f05c7c37c44fe6bdb1e6f5190d014b8/images/sample_iphone.gif --------------------------------------------------------------------------------