Archived
Cancelled courses now struck through, switched the colour picker method from using an if tree to a simplified switch statement
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
import MagazineLayout
|
||||
import Crashlytics
|
||||
|
||||
class PlanViewController : UIViewController, UICollectionViewDataSource, UICollectionViewDelegateMagazineLayout {
|
||||
|
||||
@@ -58,6 +59,10 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
|
||||
self.collectionView.reloadData()
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
}
|
||||
|
||||
func getViewType() -> String {
|
||||
return "plan"
|
||||
}
|
||||
@@ -134,6 +139,12 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
|
||||
}
|
||||
}
|
||||
|
||||
let add = self.substs[indexPath.item].additional.lowercased()
|
||||
if add.contains("eigenverantwortliches arbeiten") || add.contains("entfall") || add.contains("fällt aus"){
|
||||
mutableStrings[2].addAttribute(NSAttributedString.Key.strikethroughStyle, value: 2, range: NSMakeRange(0, mutableStrings[2].length))
|
||||
mutableStrings[3].addAttribute(NSAttributedString.Key.strikethroughStyle, value: 2, range: NSMakeRange(0, mutableStrings[3].length))
|
||||
}
|
||||
|
||||
cell.group.attributedText = mutableStrings[0]
|
||||
cell.additional.text = self.substs[indexPath.item].additional
|
||||
cell.time.attributedText = mutableStrings[1]
|
||||
|
||||
Reference in New Issue
Block a user