Icon for PSA is now tinted accordingly

This commit is contained in:
Deniz Duezgoeren
2019-08-07 10:59:30 +02:00
parent dd5458bc1b
commit f290223d2b
6 changed files with 47 additions and 17 deletions
@@ -3,22 +3,29 @@
{
"orientation" : "portrait",
"idiom" : "ipad",
"minimum-system-version" : "7.0",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"minimum-system-version" : "7.0",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"minimum-system-version" : "7.0",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
@@ -33,13 +40,6 @@
"minimum-system-version" : "7.0",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"minimum-system-version" : "7.0",
"extent" : "full-screen",
"scale" : "1x"
}
],
"info" : {
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_idea_w.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_idea_w-1.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_idea_w-2.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

+9 -2
View File
@@ -94,6 +94,8 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
cell.additional.text = self.substs[indexPath.item].additional
cell.time.text = self.substs[indexPath.item].time
var psa = false
let course = self.substs[indexPath.item].course
var image = df.getImage(from: course)
@@ -107,12 +109,13 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
url = "\(dateString[dateString.index(dateString.startIndex, offsetBy: 3)...])"
indexOfPSA = indexPath.item
}
image = UIImage(named: "ic_idea")
image = UIImage(named: "ic_idea_w")
cell.backgroundColor = #colorLiteral(red: 0, green: 0.4784313725, blue: 1, alpha: 1)
cell.tintView.backgroundColor = #colorLiteral(red: 0, green: 0.4784313725, blue: 1, alpha: 1)
cell.group.textColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
cell.course.textColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
cell.additional.textColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
psa = true
} else {
cell.date.text = self.substs[indexPath.item].date
cell.group.textColor = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 1)
@@ -137,9 +140,13 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
}
attachment.image = image
let courseImage = NSMutableAttributedString(attachment: attachment)
let courseImage = NSMutableAttributedString(string: "")
courseImage.append(NSAttributedString(attachment: attachment))
let courseString = NSAttributedString(string: " \(course)")
courseImage.append(courseString)
if psa == true {
courseImage.addAttribute(NSAttributedString.Key.foregroundColor, value: #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0), range: NSMakeRange(0, 3))
}
cell.course.attributedText = courseImage
} else {