adjust leftBottomLabel's frame

This commit is contained in:
nixzhu
2016-01-08 09:27:20 +08:00
parent 316c680d25
commit 8cf3a6f2c1
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -97,7 +97,7 @@ class FeedBasicCell: UITableViewCell {
label.textColor = UIColor.grayColor()
label.font = UIFont.feedBottomLabelsFont()
label.frame = CGRect(x: 65, y: 0, width: 200, height: 17)
label.frame = CGRect(x: 65, y: 0, width: screenWidth - 65 - 85, height: 17)
label.opaque = true
label.backgroundColor = UIColor.whiteColor()
label.clipsToBounds = true
@@ -109,6 +109,7 @@ class FeedBasicCell: UITableViewCell {
let label = UILabel()
label.textColor = UIColor.yepTintColor()
label.font = UIFont.feedBottomLabelsFont()
label.textAlignment = .Right
label.frame = CGRect(x: 65, y: 0, width: 200, height: 17)
label.opaque = true
@@ -258,6 +259,7 @@ class FeedBasicCell: UITableViewCell {
leftBottomLabel.text = feed.timeAndDistanceString
let messagesCountString = feed.messagesCount > 99 ? "99+" : "\(feed.messagesCount)"
messageCountLabel.text = messagesCountString
messageCountLabel.hidden = (feed.messagesCount == 0)
+1 -1
View File
@@ -184,7 +184,7 @@ struct FeedCellLayout {
let messageTextViewFrame = CGRect(x: 65, y: 54, width: screenWidth - 65 - 15, height: messageTextViewHeight)
let leftBottomLabelOriginY = height - 17 - 15
let leftBottomLabelFrame = CGRect(x: 65, y: leftBottomLabelOriginY, width: 200, height: 17)
let leftBottomLabelFrame = CGRect(x: 65, y: leftBottomLabelOriginY, width: screenWidth - 65 - 85, height: 17)
//let messagesCountString = feed.messagesCount > 99 ? "99+" : "\(feed.messagesCount)"