@@ -149,19 +149,21 @@ class ScheduleTableViewController: UITableViewController {
149149 */
150150
151151 // Colors, and point (if not nil)
152+ // @TODO: Increase contrast of description color, see TimelineTableViewCell fork
153+ cell. backgroundColor = UIColor . clear
152154 cell. timeline. backColor = allColor
153155 cell. timelinePoint = timelinePoint ?? TimelinePoint ( diameter: 0 , color: allColor, filled: true )
154156 cell. timeline. frontColor = allColor
155157
156158 // If point is filled, set FRONTCOLOR to match rest of list, and show bubble.
157159 // (point is current bit)
158160 if ( indexPath. section == 0 && indexPath. row == sampleData [ 0 ] !. count - 1 ) {
159-
160161 // This is a bit counterintuitive but it works ¯\_(ツ)_/¯
161162 cell. timeline. backColor = frontColor
163+ // Sets white text no matter what, due to contrastive background of bubble (set later in method)
164+ cell. titleLabel. textColor = UIColor . white
162165 cell. bubbleEnabled = true
163166 } else {
164-
165167 // Only current item gets button.
166168 // @TODO: Check with design on this one.
167169 cell. bubbleEnabled = false
@@ -174,15 +176,6 @@ class ScheduleTableViewController: UITableViewController {
174176 dateFormatter. dateFormat = " hh:mm a "
175177 cell. descriptionLabel. text = dateFormatter. string ( from: date)
176178
177-
178- // Set label color properly depending on dark mode, or no dark mode option.
179- // Only change if bubble is not enableld to preserve contrast. Might need tweaking.
180- if #available( iOS 13 . 0 , * ) , !cell. bubbleEnabled {
181- cell. titleLabel. textColor = UIColor . label
182- } else {
183- cell. titleLabel. textColor = UIColor . black
184- }
185-
186179 // Configure favorite accessory
187180 let favButton = FavoriteButton ( type: . custom)
188181 // Set images
@@ -197,9 +190,10 @@ class ScheduleTableViewController: UITableViewController {
197190 favButton. isSelected = isFavorite
198191
199192 // Confgure bubble
200- cell. bubbleColor = UIColor . clear
201- cell. bubbleWidth = 20.0
202- cell. bubbleBorderColor = UIColor ( named: " primaryColor " ) !
193+ cell. bubbleColor = UIColor ( named: " primaryColor " ) !
194+ cell. bubbleBorderColor = UIColor . clear
195+ // (I dont think this property works, check TimelineTableViewCell fork)
196+ // cell.bubbleWidth = 100.0
203197
204198 // Disable selection per cell
205199 cell. selectionStyle = . none
0 commit comments