Tôi biết cách lật/phản ánh/xoay UIImage bằng cách vẽ lại nó trong giới hạn của nó.iPhone iOS làm thế nào để lật/phản ánh bất kỳ UIView tại chỗ?
- (IBAction)reflectImageView:(UIImageView)imageView {
UIGraphicsBeginImageContextWithOptions(imageView.bounds.size, NO, 0.0);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextScaleCTM(context, 1.0, -1.0);
CGContextTranslateCTM(context, 0.0, -imageView.bounds.size.height);
[imageView.layer renderInContext:context];
imageView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
}
Nhưng làm cách nào để tạo hiệu ứng "lật/phản chiếu" cho bất kỳ UIView nào, tốt nhất là giữ trung tâm ở cùng vị trí như trước?
Cảm ơn bạn!
câu hỏi của bạn là câu trả lời về cách xoay hình ảnh: P thanks +1 –