我有一個放置在特定變換的視圖。我想截取這個視圖的截圖,但是在渲染之後它沒有考慮到變換的價值。轉換並截取視圖?
我查看
dragView = [[DragbleView alloc] initWithFrame:CGRectMake(10, 200, 200, 90)];
dragView.contentView = textField;
dragView.transform = CGAffineTransformMakeRotation (-0.663247);
[self.view addSubview:dragView];
我的截圖代碼
UIGraphicsBeginImageContextWithOptions(view.bounds.size, NO, [UIScreen mainScreen].scale);
[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
問題After taking screenshot it always comes horizontal neglecting the value of transform
請顯示更多代碼。你的屏幕截圖代碼中的「視圖」是什麼?如何使用圖像? – gabbler 2014-12-07 11:46:40
https://github.com/SunnyShah407/DragImageView ..請檢查這個項目 – 2014-12-07 12:21:23
因此,你希望視圖的變換停留在截圖圖像中嗎? – gabbler 2014-12-07 12:27:56