diff --git a/AvH Plan/Assets.xcassets/LaunchImage.launchimage/Contents.json b/AvH Plan/Assets.xcassets/LaunchImage.launchimage/Contents.json index 5a29666..3814ad8 100644 --- a/AvH Plan/Assets.xcassets/LaunchImage.launchimage/Contents.json +++ b/AvH Plan/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -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" : { diff --git a/AvH Plan/Assets.xcassets/ic_idea_w.imageset/Contents.json b/AvH Plan/Assets.xcassets/ic_idea_w.imageset/Contents.json new file mode 100644 index 0000000..b2af981 --- /dev/null +++ b/AvH Plan/Assets.xcassets/ic_idea_w.imageset/Contents.json @@ -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" + } +} \ No newline at end of file diff --git a/AvH Plan/Assets.xcassets/ic_idea_w.imageset/ic_idea_w-1.png b/AvH Plan/Assets.xcassets/ic_idea_w.imageset/ic_idea_w-1.png new file mode 100644 index 0000000..077c2dd Binary files /dev/null and b/AvH Plan/Assets.xcassets/ic_idea_w.imageset/ic_idea_w-1.png differ diff --git a/AvH Plan/Assets.xcassets/ic_idea_w.imageset/ic_idea_w-2.png b/AvH Plan/Assets.xcassets/ic_idea_w.imageset/ic_idea_w-2.png new file mode 100644 index 0000000..90b98b8 Binary files /dev/null and b/AvH Plan/Assets.xcassets/ic_idea_w.imageset/ic_idea_w-2.png differ diff --git a/AvH Plan/Assets.xcassets/ic_idea_w.imageset/ic_idea_w.png b/AvH Plan/Assets.xcassets/ic_idea_w.imageset/ic_idea_w.png new file mode 100644 index 0000000..33c41ea Binary files /dev/null and b/AvH Plan/Assets.xcassets/ic_idea_w.imageset/ic_idea_w.png differ diff --git a/AvH Plan/PlanViewController.swift b/AvH Plan/PlanViewController.swift index b0286cd..2a32fc7 100644 --- a/AvH Plan/PlanViewController.swift +++ b/AvH Plan/PlanViewController.swift @@ -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 {