UIImage에 UILabel을 그립니다.
UILabel의 너비는 193.5이며 아래 코드의 결과 UIImage는 194 와이드입니다.
이유가 무엇인가요?UILabel을 UIImage로 변환 할 때의 크기가 다른 경우
UIGraphicsBeginImageContextWithOptions(label.bounds.size, YES, [[UIScreen mainScreen] scale]);
[label.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
hm, 193.5 픽셀? – beryllium
이것을 해결할 수 있었습니까? –