Commit 02070814 authored by zhu's avatar zhu

no message

parent 8a8209ab
......@@ -20,4 +20,7 @@
@property (nonatomic,strong) SeceneLibraryView *seceneLibraryView;
@property (nonatomic,strong) ProductLibraryView *productLibraryView;
@property (nonatomic,strong)UIImageView* backGroundImageView;
@property (nonatomic,strong)UIButton* zoomButton;
@property (nonatomic,strong)UIButton* temporaryBtn;
@end
......@@ -115,34 +115,44 @@
cropper.image = image;
[self.view addSubview:cropper];
}
//全屏
-(void)setViewAnimations:(UIButton *)sender
{
UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom];
btn.frame=sender.frame;
[btn setTitle:@"缩小" forState:UIControlStateNormal];
[btn addTarget:self action:@selector(resetViewDidSelected:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
[UIView beginAnimations:nil context:nil];
self.zoomButton=sender;
self.zoomButton.hidden=YES;
self.temporaryBtn=[UIButton buttonWithType:UIButtonTypeCustom];
self.temporaryBtn.frame=sender.frame;
[self.temporaryBtn setBackgroundImage:[UIImage imageNamed:@"xiaoping"] forState:UIControlStateNormal];
[self.temporaryBtn addTarget:self action:@selector(resetViewDidSelected:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:self.temporaryBtn];
[UIView beginAnimations:@"quanping" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:1.0f];
self.leftSubView.frame=CGRectMake(-200, 0, 200, ScreenHeight-200);
self.rightSubView.frame=CGRectMake(ScreenWidth, 0, 200, ScreenHeight-200);
self.footSubView.frame=CGRectMake(0, ScreenHeight, ScreenWidth, 200);
btn.frame=CGRectMake(sender.frame.origin.x, 20, sender.frame.size.width, sender.frame.size.height);
self.temporaryBtn.frame=CGRectMake(sender.frame.origin.x, 20, sender.frame.size.width, sender.frame.size.height);
[UIView commitAnimations];
}
-(void)resetViewDidSelected:(UIButton *)sender
{
[UIView beginAnimations:nil context:nil];
[sender setBackgroundImage:[UIImage imageNamed:@"quanping"] forState:UIControlStateNormal];
[UIView beginAnimations:@"xiaoping" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationFinish)];
[UIView setAnimationDuration:1.0f];
self.leftSubView.frame=CGRectMake(0, 0, 200, ScreenHeight-200);
self.rightSubView.frame=CGRectMake(ScreenWidth-200, 0, 200, ScreenHeight-200);
self.footSubView.frame=CGRectMake(0, ScreenHeight-200, ScreenWidth, 200);
sender.hidden=YES;
sender.frame=self.zoomButton.frame;
[UIView commitAnimations];
}
-(void)animationFinish
{
self.zoomButton.hidden=NO;
[self.temporaryBtn removeFromSuperview];
}
//添加场景
-(void)addSceneLibraryView
......
......@@ -28,7 +28,7 @@
{
UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
button.frame=CGRectMake(30, 50, 60, 60);
[button setBackgroundImage:[UIImage imageNamed:@"场景"] forState:UIControlStateNormal];
[button setBackgroundImage:[UIImage imageNamed:@"场景1"] forState:UIControlStateNormal];
button.tag=200;
[button addTarget:self action:@selector(footBtnDidSelected:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];
......
......@@ -27,9 +27,37 @@
for (int i=0; i<self.dataArray.count; i++) {
UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
button.tag=100+i;
button.frame=CGRectMake(30, 30+(60 +15)*i, 100, 60);
[button setTitle:[self.dataArray objectAtIndex:i] forState:UIControlStateNormal];
button.frame=CGRectMake(30, 30+(60 +15)*i, 60, 60);
[button addTarget:self action:@selector(leftBtnDidSelected:) forControlEvents:UIControlEventTouchUpInside];
switch (i) {
case 0:
[button setBackgroundImage:[UIImage imageNamed:@"reBackBtn"] forState:UIControlStateNormal];
break;
case 1:
[button setBackgroundImage:[UIImage imageNamed:@"gouwuche"] forState:UIControlStateNormal];
break;
case 2:
[button setBackgroundImage:[UIImage imageNamed:@"fenxiang"] forState:UIControlStateNormal];
break;
case 3:
[button setBackgroundImage:[UIImage imageNamed:@"customchangjing"] forState:UIControlStateNormal];
break;
case 4:
[button setBackgroundImage:[UIImage imageNamed:@"quanping"] forState:UIControlStateNormal];
break;
case 5:
[button setBackgroundImage:[UIImage imageNamed:@"bangzhu"] forState:UIControlStateNormal];
break;
default:
break;
}
[self addSubview:button];
}
......
......@@ -29,7 +29,7 @@
UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
button.frame=CGRectMake(self.frame.size.width-100, self.frame.size.height-100, 60, 60);
button.tag=300;
[button setBackgroundImage:[UIImage imageNamed:@"产品"] forState:UIControlStateNormal];
[button setBackgroundImage:[UIImage imageNamed:@"产品1"] forState:UIControlStateNormal];
[button addTarget:self action:@selector(rightBtnDidSelected:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];
self.scrollView=[[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height-100)];
......
......@@ -23,9 +23,6 @@
@property (nonatomic, assign) id <ImageCropperDelegate> delegate;
- (void)setup;
- (void)finishCropping;
- (void)reset;
@end
@protocol ImageCropperDelegate <NSObject>
......
......@@ -26,23 +26,40 @@
@synthesize imageView, image = _image, delegate, croppedImage;
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self setup];
}
return self;
}
- (void)setup
{
self.clipsToBounds = YES;
self.backgroundColor = [UIColor clearColor];
self.userInteractionEnabled = YES;
[self setUserInteractionEnabled:YES];
[self setMultipleTouchEnabled:YES];
// 旋转
UIRotationGestureRecognizer *rotateGes = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotateImage:)];
[self addGestureRecognizer:rotateGes];
// 放大缩小
UIPinchGestureRecognizer *scaleGes = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(scaleImage:)];
[self addGestureRecognizer:scaleGes];
// 长按
UILongPressGestureRecognizer *longPressGR =
[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress2:)];
longPressGR.allowableMovement=NO;
longPressGR.minimumPressDuration = 0.5;
[self addGestureRecognizer:longPressGR];
// 移动
UIPanGestureRecognizer *moveGes = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(moveImage:)];
[moveGes setMinimumNumberOfTouches:1];
[moveGes setMaximumNumberOfTouches:1];
......@@ -50,16 +67,6 @@
}
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self setup];
}
return self;
}
float _lastTransX = 0.0, _lastTransY = 0.0;
- (void)moveImage:(UIPanGestureRecognizer *)sender
......@@ -84,7 +91,7 @@ float _lastScale = 1.0;
{
if([sender state] == UIGestureRecognizerStateBegan) {
_lastScale = 1.0;
_lastScale = 2.0;
return;
}
......@@ -98,6 +105,7 @@ float _lastScale = 1.0;
}
float _lastRotation = 0.0;
//旋转
- (void)rotateImage:(UIRotationGestureRecognizer *)sender
{
if([sender state] == UIGestureRecognizerStateEnded) {
......@@ -115,6 +123,12 @@ float _lastRotation = 0.0;
_lastRotation = [sender rotation];
}
//长按响应的事件
-(void)handleLongPress2:(id)sender{
[self removeFromSuperview];
}
@end
......@@ -1449,7 +1449,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6";
PROVISIONING_PROFILE = "1984600d-9582-4f80-b666-2975a03aee8f";
STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
};
......@@ -1501,7 +1501,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6";
PROVISIONING_PROFILE = "1984600d-9582-4f80-b666-2975a03aee8f";
STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
};
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "Cog.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Cog@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ablum.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ablum@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "bg.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "bg@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "box-副本.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "box-副本@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "data.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "data@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "dial.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "dial@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "line.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "line@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "search.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "search@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "圆角矩形-3.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "圆角矩形-3@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "当前.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "当前@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "矢量智能对象.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "矢量智能对象@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "10-副本-3.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "10-副本-3@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "7.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "7@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "Trash.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Trash@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "View.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "View@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "View1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "View1@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ablum-副本.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ablum-副本@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "icon-副本.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon-副本@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "已完成.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "已完成@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "已撤销.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "已撤销@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "已退货.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "已退货@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "视角.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "视角@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "视角1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "视角1@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "视角3.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "视角3@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "jia.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "jia@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "筛选.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "筛选@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "筛选1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "筛选1@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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