【发布时间】:2015-12-26 20:52:52
【问题描述】:
我有一个 CAShapeLayer,我正在用图像填充它。但是,图像颠倒了......
CAShapeLayer *shapeLayer = [CAShapeLayer layer];
shapeLayer.path = [[self makeCircleAtLocation:location radius:100.0] CGPath];
shapeLayer.strokeColor = [[UIColor colorWithRed:30/255.0f green:30/255.0f blue:30/255.0f alpha:1.0] CGColor];
[self.dd.layer addSublayer:shapeLayer];
shapeLayer.fillColor = [UIColor colorWithPatternImage:previewImageView.image].CGColor; //turned upside down inside the circle
【问题讨论】:
-
你从哪里得到的图像?是照片吗?如果是这样,问题可能出在照片元数据(方向)中。
-
可以是用相机拍的照片,也可以是从照片库中选择的...
标签: ios objective-c