具有基于块的API和可定制外观的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];
视图可由直接或通过UIAppearance API进行自定义。请参阅头文件(Classes/AHKActionSheet.h
)和示例项目以了解更多信息。
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