1
최근에 PaintCode 2에서 PaintCode 3으로 전환했으며 xCode/Swift와 함께 사용하고 있습니다.resizableImageWithCapInsets로 인해 PaintCode 2와 3이 호환되지 않습니다.
그러나 모든 제 이미지 생성 함수는 다르게 동작하지 않습니다. 그들은 표준 addopt 뚜껑 삽목에 솔기.
예를 들어 하나의 캔버스 "ViewMissingImage"와 PaintCode (2 또는 3이 동일)에서 어떻게 구성되었는지 확인할 수 있습니다. PaintCode 통해 생성
코드 2
public class func imageOfViewMissingImage(frame frame: CGRect = CGRect(x: 6, y: 5, width: 109, height: 109)) -> UIImage {
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0)
PaintCode.drawViewMissingImage(frame: CGRect(x: 0, y: 0, width: frame.size.width, height: frame.size.height))
let imageOfViewMissingImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return imageOfViewMissingImage
}
코드 내가 PaintCode 2는 CAPP의 세트를 사용한 적이 있다고 생각 PaintCode 3
public dynamic class func imageOfViewMissingImage(imageSize imageSize: CGSize = CGSize(width: 109, height: 109)) -> UIImage {
UIGraphicsBeginImageContextWithOptions(imageSize, false, 0)
PaintCode.drawViewMissingImage(frame: CGRect(x: 0, y: 0, width: imageSize.width, height: imageSize.height))
let imageOfViewMissingImage = UIGraphicsGetImageFromCurrentImageContext()!.resizableImageWithCapInsets(UIEdgeInsetsZero, resizingMode: .Tile)
UIGraphicsEndImageContext()
return imageOfViewMissingImage
}
통해 생성, 어쩌면 버그이었다 ? 이 뚜껑 삽 입함을 원하지 않습니다. 어떻게 제거 할 수 있습니까?