是UIActionSheet的替代品,具有基于块和可定制的界面。灵感来自Spotify应用。它在实际使用中看起来比GIF中好得多(因为压缩)。
在Xcode中构建和运行AHKActionSheetExample
项目。在AHKViewController.m
文件中包含了示例中所用的重要代码。
将Classes/
目录下所有文件复制到您的项目中。然后,将QuartzCore.framework
添加到项目中。
简单示例
#import "AHKActionSheet.h"
...
AHKActionSheet *actionSheet = [[AHKActionSheet alloc] initWithTitle:nil];
[actionSheet addButtonWithTitle:@"Test" type:AHKActionSheetButtonTypeDefault handler:^(AHKActionSheet *as) {
NSLog(@"Test tapped");
}];
[actionSheet show];
视图可自定义,直接在界面外观API中进行。请参阅头文件(Classes/AHKActionSheet.h
)和示例项目以获取更多信息。
0.5.4
cancelOnTapEmptyAreaEnabled
的行为0.5.3
cancelOnTapEmptyAreaEnabled
属性0.5.2
0.5.1
0.5
0.4.2
0.4.1
0.4.0
AHKActionSheetButtonTypeDisabled
cancelOnPanGestureEnabled
属性,允许您禁用:cancelOnPanGestureEnabled
关闭时,内部滚动视图的bounces
被禁用,并且当滚动视图的contentSize
的高度小于屏幕高度时。0.3.0
0.2.0
animationDuration
属性0.1.3
0.1.2
UIWindow
现在是快照而不是 UIViewController
的 view
0.1.1
0.1.0
Arkadiusz Holko