Created
August 10, 2019 18:01
-
-
Save SocialKitLtd/96c655bb326e614db98a7b3be762f3d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol CanvasItem: Codable | |
{ | |
var scale: CGFloat { get set } | |
} | |
class StickerItem: CanvasItem | |
{ | |
var scale: CGFloat = 0.0 | |
var stickerName : String = "" | |
} | |
class ShapeItem: CanvasItem | |
{ | |
var scale: CGFloat = 0.0 | |
var colorHex = "" | |
} | |
class CanvasShapeView: UIView { | |
let shapeItem: ShapeItem | |
init(shapeItem: ShapeItem) { | |
self.shapeItem = shapeItem | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
} | |
class CanvasStickerView: UIView { | |
let stickerItem: StickerItem | |
init(stickerItem: StickerItem) { | |
self.stickerItem = stickerItem | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment