图像翻转功能
This commit is contained in:
parent
ef2a9df605
commit
0ab7d833a0
Binary file not shown.
|
Before Width: | Height: | Size: 1022 B After Width: | Height: | Size: 994 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
|
@ -246,6 +246,18 @@ Strong UIImage *screenShotImage;//截图
|
||||||
}else{
|
}else{
|
||||||
[self.yProgressView stop];
|
[self.yProgressView stop];
|
||||||
}
|
}
|
||||||
|
NSString* key = [NSString stringWithFormat:@"camera_%@_flip",self.contact.cameraId];
|
||||||
|
NSString* flip =[[DataCenter defaultDtacenter].cache stringForKey:key];
|
||||||
|
if ([flip isEqualToString:@"1"])
|
||||||
|
{
|
||||||
|
[UIView animateWithDuration:0.1f animations:^{
|
||||||
|
self.player.viewController.view.transform = CGAffineTransformMakeRotation(M_PI);
|
||||||
|
|
||||||
|
} completion:^(BOOL finished) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#pragma mark --LoadBaseUI
|
#pragma mark --LoadBaseUI
|
||||||
-(UIView *)canvasView{
|
-(UIView *)canvasView{
|
||||||
|
|
@ -707,12 +719,31 @@ Strong UIImage *screenShotImage;//截图
|
||||||
}
|
}
|
||||||
else if (tag == 4){
|
else if (tag == 4){
|
||||||
//翻转
|
//翻转
|
||||||
[UIView animateWithDuration:2.0f animations:^{
|
NSString* key = [NSString stringWithFormat:@"camera_%@_flip",weakSelf.contact.cameraId];
|
||||||
weakSelf.player.viewController.view.transform = CGAffineTransformMakeRotation(M_PI);
|
NSString* flip =[[DataCenter defaultDtacenter].cache stringForKey:key];
|
||||||
|
if ([flip isEqualToString:@"0"]||!flip.length)
|
||||||
|
{
|
||||||
|
[UIView animateWithDuration:0.25f animations:^{
|
||||||
|
weakSelf.player.viewController.view.transform = CGAffineTransformMakeRotation(M_PI);
|
||||||
|
|
||||||
|
} completion:^(BOOL finished) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
[[DataCenter defaultDtacenter].cache setSynString:@"1" forKey:key];
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[UIView animateWithDuration:0.25 animations:^{
|
||||||
|
weakSelf.player.viewController.view.transform = CGAffineTransformIdentity;
|
||||||
|
|
||||||
|
} completion:^(BOOL finished) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
[[DataCenter defaultDtacenter].cache setSynString:@"0" forKey:key];
|
||||||
|
}
|
||||||
|
|
||||||
} completion:^(BOOL finished) {
|
|
||||||
|
|
||||||
}];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
[weakSelf popAppear];//隐藏弹出框
|
[weakSelf popAppear];//隐藏弹出框
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue