7
7
//
8
8
9
9
#define kTweetCell_PadingLeft kPaddingLeftWidth
10
- #define kTweetCell_PadingTop (65 + 15 )
10
+ #define kTweetCell_PadingTop (75 + 15 )
11
11
12
12
#define kTweetCell_PadingBottom 10.0
13
13
#define kTweetCell_ContentWidth (kScreen_Width -kTweetCell_PadingLeft - kPaddingLeftWidth )
14
14
#define kTweetCell_LikeComment_Height 27.0
15
15
#define kTweetCell_LikeComment_Width 50.0
16
- #define kTweetCell_LikeUserCCell_Height 26 .0
17
- #define kTweetCell_LikeUserCCell_Pading 10 .0
16
+ #define kTweetCell_LikeUserCCell_Height 30 .0
17
+ #define kTweetCell_LikeUserCCell_Pading 5 .0
18
18
#define kTweet_ContentFont [UIFont systemFontOfSize: 16 ]
19
19
#define kTweet_ContentMaxHeight 200.0
20
20
#define kTweet_CommentFont [UIFont systemFontOfSize: 14 ]
21
21
#define kTweet_TimtFont [UIFont systemFontOfSize: 12 ]
22
22
#define kTweet_LikeUsersLineCount 7.0
23
23
24
- #define kTweetCell_MaxCollectionNum (kDevice_Is_iPhone6Plus ? 12 : kDevice_Is_iPhone6 ? 10 : 9 )
24
+ #define kTweetCell_MaxCollectionNum (kDevice_Is_iPhone6Plus ? 10 : kDevice_Is_iPhone6 ? 9 : 8 )
25
25
26
26
#import " TweetCell.h"
27
27
#import " TweetLikeUserCCell.h"
@@ -69,13 +69,13 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
69
69
}
70
70
71
71
if (!self.ownerImgView ) {
72
- self.ownerImgView = [[UITapImageView alloc ] initWithFrame: CGRectMake (kPaddingLeftWidth , 15 + CGRectGetMaxY (_topView.frame), 38 , 38 )];
72
+ self.ownerImgView = [[UITapImageView alloc ] initWithFrame: CGRectMake (kPaddingLeftWidth , 15 + CGRectGetMaxY (_topView.frame), 45 , 45 )];
73
73
[self .ownerImgView doCircleFrame ];
74
74
[self .contentView addSubview: self .ownerImgView];
75
75
}
76
76
if (!self.ownerNameBtn ) {
77
77
self.ownerNameBtn = [UIButton buttonWithUserStyle ];
78
- self.ownerNameBtn .frame = CGRectMake (CGRectGetMaxX (self.ownerImgView .frame ) + 10 , 23 + CGRectGetMaxY (_topView.frame ), 50 , 20 );
78
+ self.ownerNameBtn .frame = CGRectMake (CGRectGetMaxX (self.ownerImgView .frame ) + 15 , 23 + CGRectGetMaxY (_topView.frame ), 50 , 24 );
79
79
[self .ownerNameBtn addTarget: self action: @selector (userBtnClicked ) forControlEvents: UIControlEventTouchUpInside];
80
80
[self .contentView addSubview: self .ownerNameBtn];
81
81
}
@@ -85,17 +85,17 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
85
85
// [self.contentView addSubview:self.timeClockIconView];
86
86
// }
87
87
if (!self.timeLabel ) {
88
- self.timeLabel = [[UILabel alloc ] initWithFrame: CGRectMake (CGRectGetMinX (self .ownerNameBtn.frame), 0 , kScreen_Width /2 , 12 )];
88
+ self.timeLabel = [[UILabel alloc ] initWithFrame: CGRectMake (CGRectGetMinX (self .ownerNameBtn.frame), 0 , kScreen_Width /2 , 15 )];
89
89
// self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreen_Width - kPaddingLeftWidth - 55, 23 + CGRectGetMaxY(_topView.frame), 55, 12)];
90
90
self.timeLabel .font = kTweet_TimtFont ;
91
91
// self.timeLabel.textAlignment = NSTextAlignmentRight;
92
- self.timeLabel .textColor = kColor999 ;
92
+ self.timeLabel .textColor = kColorDark7 ;
93
93
[self .contentView addSubview: self .timeLabel];
94
94
}
95
95
if (!self.contentLabel ) {
96
96
self.contentLabel = [[UITTTAttributedLabel alloc ] initWithFrame: CGRectMake (kTweetCell_PadingLeft , kTweetCell_PadingTop , kTweetCell_ContentWidth , 20 )];
97
97
self.contentLabel .font = kTweet_ContentFont ;
98
- self.contentLabel .textColor = kColor222 ;
98
+ self.contentLabel .textColor = kColorDark3 ;
99
99
self.contentLabel .numberOfLines = 0 ;
100
100
101
101
self.contentLabel .linkAttributes = kLinkAttributes ;
@@ -153,7 +153,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
153
153
if (!self.fromLabel ) {
154
154
self.fromLabel = [[UILabel alloc ] initWithFrame: CGRectMake (CGRectGetMaxX (self .fromPhoneIconView.frame) + 5 , 0 , kScreen_Width /2 , 15 )];
155
155
self.fromLabel .font = kTweet_TimtFont ;
156
- self.fromLabel .textColor = kColor999 ;
156
+ self.fromLabel .textColor = kColorDark7 ;
157
157
[self .contentView addSubview: self .fromLabel];
158
158
}
159
159
@@ -416,7 +416,7 @@ + (CGFloat)locationAndDeviceHeightWithTweet:(Tweet *)tweet{
416
416
+ (CGFloat)likeUsersHeightWithTweet : (Tweet *)tweet {
417
417
CGFloat likeUsersHeight = 0 ;
418
418
if ([tweet hasLikesOrRewards ]) {
419
- likeUsersHeight = 45 ;
419
+ likeUsersHeight = [TweetLikeUserCCell ccellSize ]. height + 20 ;
420
420
// +30*(ceilf([tweet.like_users count]/kTweet_LikeUsersLineCount)-1);
421
421
}
422
422
return likeUsersHeight;
@@ -494,7 +494,7 @@ - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollection
494
494
itemSize = [TweetMediaItemCCell ccellSizeWithObj: _tweet.htmlMedia.imageItems.firstObject];
495
495
}
496
496
}else {
497
- itemSize = CGSizeMake ( kTweetCell_LikeUserCCell_Height , kTweetCell_LikeUserCCell_Height ) ;
497
+ itemSize = [TweetLikeUserCCell ccellSize ] ;
498
498
}
499
499
return itemSize;
500
500
}
@@ -508,7 +508,7 @@ - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UIColl
508
508
insetForSection = UIEdgeInsetsMake (0 , 0 , 0 , 0 );
509
509
}
510
510
}else {
511
- insetForSection = UIEdgeInsetsMake (kTweetCell_LikeUserCCell_Pading , 5 , kTweetCell_LikeUserCCell_Pading , 5 );
511
+ insetForSection = UIEdgeInsetsMake (10 , kPaddingLeftWidth , 10 , kPaddingLeftWidth );
512
512
}
513
513
return insetForSection;
514
514
}
0 commit comments