Misbehavior of UITableView willDisplayCell method

后端 未结 2 643
情书的邮戳
情书的邮戳 2021-01-20 14:48

There is a UITableView of posts.
Seen posts id\'s are saved in sqlite
I want to show, seen posts in orange color and others in black.
But when I

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-20 15:29

    Try completing the if statement

     if (post.isRead.boolValue == true) {
        print("Color it")
        cellPost!.body.textColor = UIColor.orangeColor()
        cellPost!.title.textColor = UIColor.orangeColor()
    }else{
        cellPost!.body.textColor = UIColor.blackColor()
        cellPost!.title.textColor = UIColor.blackColor()}
    

提交回复
热议问题