Im testing against this: case 0,6,7,13,14,20,21,27,28,34,35,41:
The case == the position of cells in collectionview.
I am trying to get the string interpolation to equal the cells position.
case 0,6,7,13,14,20,21,27,28,34,35,41:
if Int(cell.dayOfMonth.text = "\(indexPath.item)" > 0 { // <=== I get the error on this line
cell.dayOfMonth.textColor = UIColor.lightGray
}
Post
Replies
Boosts
Views
Activity
Im testing the (position of cells in a collectionview): case 0,6,7,13,14,20,21,27,28,34,35,41:
But I can't seem to get the string interpolation to equal the cell position.
case 0,6,7,13,14,20,21,27,28,34,35,41:
if Int(cell.dayOfMonth.text = "\(indexPath.item)" > 0 { // <=== I get the error on this line.
cell.dayOfMonth.textColor = UIColor.lightGray
}
Thanks, this helped a lot!
Correct... My apologies, I didn't specify. I meant as far as using a reusable Identifer...I was unable to add a cell to the collectionview nor was I able to see the identifier name in the property inspector. So I was wondering if it can be done programmatically.
Sure, the set up is for a calendar. When the user taps a cell from the collectionview.. model view appears with date(cell) details. From there the user can also scroll the individual dates and their details.
Okay got it, is it something like this? what do that block of code look like?
cell.detailTextLabel!.isHidden = theSelectedRow != nil && theSelectedRow! == indexPath.item
By forward and backward, I mean by scrolling the views (of UILabels), the labels are populated with said arrays.
Thanks @ Claude31
That was just too easy to miss. I don't know how I did that.