diff --git a/Sources/iOS/Shape/Image.swift b/Sources/iOS/Shape/Image.swift new file mode 100644 index 0000000..e494dcc --- /dev/null +++ b/Sources/iOS/Shape/Image.swift @@ -0,0 +1,15 @@ +import UIKit +import Reindeer + +class Image: Shape { + + required init(element: Element) { + super.init(element: element) + } + + override var layer: CALayer { + let layer = CATextLayer() + + return layer + } +} diff --git a/Sources/iOS/Shape/Shape.swift b/Sources/iOS/Shape/Shape.swift index 2fffa8a..b4b8da0 100644 --- a/Sources/iOS/Shape/Shape.swift +++ b/Sources/iOS/Shape/Shape.swift @@ -21,7 +21,8 @@ public class Shape { "polyline": Polyline.self, "rect": Rectangle.self, "ellipse": Ellipse.self, - "text": Text.self + "text": Text.self, + "image": Image.self ] let shape = mapping[element.name ?? ""]