Skip to content

Commit

Permalink
Feat: Add showing refresh Image (#5)
Browse files Browse the repository at this point in the history
Showing Refresh Image when there is no remaining cards in the deck
  • Loading branch information
jinios authored and godrm committed Apr 20, 2018
1 parent 3df117e commit dd96dba
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "cardgameapp-refresh-app.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion CardGameApp/CardGameApp/CardImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ class CardImageView: UIImageView {
super.awakeFromNib()
}

override init(frame: CGRect) { // by code
override init(frame: CGRect) {
super.init(frame: frame)
self.layer.cornerRadius = 5.0
self.clipsToBounds = true
self.isUserInteractionEnabled = true
}

convenience init() {
Expand All @@ -36,4 +37,8 @@ class CardImageView: UIImageView {
self.image = UIImage(named: "card-back")
}

func getRefreshImage() {
self.image = UIImage(named: "cardgameapp-refresh-app")
}

}

0 comments on commit dd96dba

Please sign in to comment.