DMEBottomView 是一种简单的视图,可以放置在其他视图的底部。
或者将 /DMEBottomView
目录下的内容复制到你的项目中。
导航到 /DMEBottomViewExample
并打开项目文件。
在现代项目中包含以下文件
DMEBottomView.h
通过调用以下方式来创建 DMEBottomView:
-(void)createInViewController:withView:
-(void)createInViewController:withView:withOpenImage:withCloseImage:
-(void)createInViewController:withView:withViewHeight:
-(void)createInViewController:withView:withOpenImage:withCloseImage:withViewHeight:
你可以让用户手动打开和关闭视图,或者你可以通过编程方式来控制它。
-(void)toogle:(BOOL)animated withCompletionBlock:(DMEBottomViewControllerCompletionBlock)completionBlock
-(void)open:(BOOL)animated withCompletionBlock:(DMEBottomViewControllerCompletionBlock)completionBlock
-(void)close:(BOOL)animated withCompletionBlock:(DMEBottomViewControllerCompletionBlock)completionBlock
你可以选择按钮的位置
//Button align left (default)
[DMEBottomViewController sharedInstance].position = DMEBottomViewControllerPositionLeft;
//Button align center
[DMEBottomViewController sharedInstance].position = DMEBottomViewControllerPositionCenter;
//Button align right
[DMEBottomViewController sharedInstance].position = DMEBottomViewControllerPositionRight;
如果你不替换它,可以选择默认按钮的颜色。
//Background color
[DMEBottomViewController sharedInstance].buttonBackgroundColor = [UIColor darkGrayColor];
//Arrow color
[DMEBottomViewController sharedInstance].buttonArrowColor = [UIColor whiteColor];
//Border color
[DMEBottomViewController sharedInstance].buttonBorderColor = [UIColor lightGrayColor];