Commit 5c7ebaba authored by huanglu's avatar huanglu

update

parent 76ce9b51
......@@ -24,6 +24,10 @@
#import "FilterSuiteUtils.h"
#import "LFImageCoder.h"
#import "CheckView.h"
#import "Utils.h"
#import "NSObject+LFTipsGuideView.h"
/************************ Attributes ************************/
......@@ -57,6 +61,8 @@ LFPhotoEditOperationStringKey const LFPhotoEditCropCanAspectRatioAttributeName =
UIView *_edit_naviBar;
/** 底部栏菜单 */
LFEditToolbar *_edit_toolBar;
/** 对错 */
CheckView *_check;
/** 剪切菜单 */
LFClipToolbar *_edit_clipping_toolBar;
/** 安全区域涂层 */
......@@ -147,6 +153,10 @@ LFPhotoEditOperationStringKey const LFPhotoEditCropCanAspectRatioAttributeName =
[self configCustomNaviBar];
[self configBottomToolBar];
[self configDefaultOperation];
_check = [[CheckView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, self.view.frame.size.width, 150) data:self.data[@"questions"]];
[self.view addSubview:_check];
}
- (void)viewWillAppear:(BOOL)animated
......@@ -592,6 +602,10 @@ LFPhotoEditOperationStringKey const LFPhotoEditCropCanAspectRatioAttributeName =
_EditingView.splashEnable = NO;
/** 打开绘画 */
_EditingView.drawEnable = !_EditingView.drawEnable;
[UIView animateWithDuration:0.3 animations:^{
self->_check.frame = CGRectMake(0, SCREEN_HEIGHT, self.view.frame.size.width, 150);
}];
}
break;
case LFEditToolbarType_sticker:
......@@ -600,6 +614,31 @@ LFPhotoEditOperationStringKey const LFPhotoEditCropCanAspectRatioAttributeName =
[self changeStickerMenu:YES animated:YES];
}
break;
case LFEditToolbarType_eraser:
NSLog(@"打开对错弹出框");
_EditingView.drawEnable = NO;
if (self.data[@"questions"] == nil || [self.data[@"questions"] count] == 0) {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"暂无题目" preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"好" style:UIAlertActionStyleCancel handler:nil]];
[self presentViewController:alert animated:YES completion:nil];
break;
}
if (_check.frame.origin.y == SCREEN_HEIGHT) {
[UIView animateWithDuration:0.3 animations:^{
if ([Utils isIPhoneXSeries]) {
self->_check.frame = CGRectMake(0, SCREEN_HEIGHT - 44 - 30 - 150, self.view.frame.size.width, 150);
} else {
self->_check.frame = CGRectMake(0, SCREEN_HEIGHT - 44 - 150, self.view.frame.size.width, 150);
}
}];
} else {
[UIView animateWithDuration:0.3 animations:^{
self->_check.frame = CGRectMake(0, SCREEN_HEIGHT, self.view.frame.size.width, 150);
}];
}
break;
case LFEditToolbarType_text:
{
[self showTextBarController:nil];
......@@ -623,6 +662,10 @@ LFPhotoEditOperationStringKey const LFPhotoEditCropCanAspectRatioAttributeName =
{
[_EditingView setClipping:YES animated:YES];
[self changeClipMenu:YES];
[UIView animateWithDuration:0.3 animations:^{
self->_check.frame = CGRectMake(0, SCREEN_HEIGHT, self.view.frame.size.width, 150);
}];
}
break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment