图像翻转功能

This commit is contained in:
kai 2021-06-15 21:57:14 +08:00
parent ef2a9df605
commit 0ab7d833a0
4 changed files with 37 additions and 6 deletions

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

View File

@ -246,6 +246,18 @@ Strong UIImage *screenShotImage;//截图
}else{
[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
-(UIView *)canvasView{
@ -707,12 +719,31 @@ Strong UIImage *screenShotImage;//截图
}
else if (tag == 4){
//
[UIView animateWithDuration:2.0f animations:^{
weakSelf.player.viewController.view.transform = CGAffineTransformMakeRotation(M_PI);
} completion:^(BOOL finished) {
}];
NSString* key = [NSString stringWithFormat:@"camera_%@_flip",weakSelf.contact.cameraId];
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];
}
}
[weakSelf popAppear];//