0
我有我有image.However填充它CAShapeLayer,圖像顛倒了......colorWithPatternImage將圖像顛倒了嗎?
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
你從哪裏得到圖像?這是照片嗎?如果是這樣,問題可能在照片元數據(方向)。 – rkyr
它可以是一個照相機拍攝的圖片或從照片庫中選擇... –