diff --git a/CardGameApp/CardGameApp/View/CardDeckView.swift b/CardGameApp/CardGameApp/View/CardDeckView.swift index c8a1bc49..d28c74b8 100644 --- a/CardGameApp/CardGameApp/View/CardDeckView.swift +++ b/CardGameApp/CardGameApp/View/CardDeckView.swift @@ -23,6 +23,7 @@ class CardDeckView: UIView { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) + self.frame = CGRect(x: 0, y: 0, width: 414, height: 100) } convenience init() { diff --git a/CardGameApp/CardGameApp/View/CardImageView.swift b/CardGameApp/CardGameApp/View/CardImageView.swift index d76b352e..f08ebf0f 100644 --- a/CardGameApp/CardGameApp/View/CardImageView.swift +++ b/CardGameApp/CardGameApp/View/CardImageView.swift @@ -29,7 +29,11 @@ class CardImageView: UIImageView { } required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") + super.init(coder: aDecoder) + self.frame = CGRect(x: 0, y: 0, width: 0, height: 0) + self.layer.cornerRadius = 5.0 + self.clipsToBounds = true + self.isUserInteractionEnabled = true } func getImage(of card: ImageSelector) { diff --git a/CardGameApp/CardGameApp/View/CardStacksView.swift b/CardGameApp/CardGameApp/View/CardStacksView.swift index 3b2bb273..26327534 100644 --- a/CardGameApp/CardGameApp/View/CardStacksView.swift +++ b/CardGameApp/CardGameApp/View/CardStacksView.swift @@ -69,7 +69,11 @@ class OneStack: UIView { } required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") + super.init(coder: aDecoder) + self.frame = CGRect(x: PositionX.allValues[column].value, + y: 0, + width: 414 / 7, + height: 736 - PositionY.bottom.value) } func setup() { diff --git a/CardGameApp/CardGameApp/View/FoundationView.swift b/CardGameApp/CardGameApp/View/FoundationView.swift index b6e7f090..6931c3f2 100644 --- a/CardGameApp/CardGameApp/View/FoundationView.swift +++ b/CardGameApp/CardGameApp/View/FoundationView.swift @@ -19,6 +19,7 @@ class FoundationView: UIView { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) + self.frame = CGRect(x: 0, y: 0, width: 414, height: 100) } convenience init() {