Skip to content

Commit

Permalink
Refactor: Delete fatal error message in required init #26
Browse files Browse the repository at this point in the history
  • Loading branch information
jinios authored and godrm committed May 14, 2018
1 parent c9ff9e4 commit 96a96ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CardGameApp/CardGameApp/View/CardDeckView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 5 additions & 1 deletion CardGameApp/CardGameApp/View/CardImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 5 additions & 1 deletion CardGameApp/CardGameApp/View/CardStacksView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 1 addition & 0 deletions CardGameApp/CardGameApp/View/FoundationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 96a96ff

Please sign in to comment.