Skip to content

Commit

Permalink
Add Image
Browse files Browse the repository at this point in the history
  • Loading branch information
onmyway133 committed Nov 27, 2016
1 parent 35a76a6 commit 9ec4c6a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Sources/iOS/Shape/Image.swift
Original file line number Diff line number Diff line change
@@ -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
}
}
3 changes: 2 additions & 1 deletion Sources/iOS/Shape/Shape.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? ""]
Expand Down

0 comments on commit 9ec4c6a

Please sign in to comment.