| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -168,6 +168,7 @@ | |||
| 168 | 168 | 4E6384011B33C18700D98648 /* task_activity_icon_update_priority@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E6383FA1B33C18700D98648 /* task_activity_icon_update_priority@2x.png */; }; | |
| 169 | 169 | 4E6384031B33C8E900D98648 /* task_activity_icon_create@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E6384021B33C8E900D98648 /* task_activity_icon_create@2x.png */; }; | |
| 170 | 170 | 4E63840B1B33F9B400D98648 /* comment_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E63840A1B33F9B400D98648 /* comment_bg@2x.png */; }; | |
| 171 | + 4E63840F1B34124000D98648 /* task_icon_arrow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E63840E1B34124000D98648 /* task_icon_arrow@2x.png */; }; | ||
| 171 | 172 | 4E66EE261A28226000DA1B3E /* button_file_createFolder_enable@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E66EE211A28226000DA1B3E /* button_file_createFolder_enable@2x.png */; }; | |
| 172 | 173 | 4E66EE271A28226000DA1B3E /* button_file_denete_enable@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E66EE221A28226000DA1B3E /* button_file_denete_enable@2x.png */; }; | |
| 173 | 174 | 4E66EE281A28226000DA1B3E /* button_file_denete_unable@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E66EE231A28226000DA1B3E /* button_file_denete_unable@2x.png */; }; | |
@@ -936,6 +937,7 @@ | |||
| 936 | 937 | 4E6383FA1B33C18700D98648 /* task_activity_icon_update_priority@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "task_activity_icon_update_priority@2x.png"; sourceTree = "<group>"; }; | |
| 937 | 938 | 4E6384021B33C8E900D98648 /* task_activity_icon_create@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "task_activity_icon_create@2x.png"; sourceTree = "<group>"; }; | |
| 938 | 939 | 4E63840A1B33F9B400D98648 /* comment_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "comment_bg@2x.png"; sourceTree = "<group>"; }; | |
| 940 | + 4E63840E1B34124000D98648 /* task_icon_arrow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "task_icon_arrow@2x.png"; sourceTree = "<group>"; }; | ||
| 939 | 941 | 4E66EE211A28226000DA1B3E /* button_file_createFolder_enable@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_file_createFolder_enable@2x.png"; sourceTree = "<group>"; }; | |
| 940 | 942 | 4E66EE221A28226000DA1B3E /* button_file_denete_enable@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_file_denete_enable@2x.png"; sourceTree = "<group>"; }; | |
| 941 | 943 | 4E66EE231A28226000DA1B3E /* button_file_denete_unable@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_file_denete_unable@2x.png"; sourceTree = "<group>"; }; | |
@@ -1907,6 +1909,7 @@ | |||
| 1907 | 1909 | 4E6383A01B3262D300D98648 /* taskPriority2_small@2x.png */, | |
| 1908 | 1910 | 4E6383A11B3262D300D98648 /* taskPriority3@2x.png */, | |
| 1909 | 1911 | 4E6383A21B3262D300D98648 /* taskPriority3_small@2x.png */, | |
| 1912 | + 4E63840E1B34124000D98648 /* task_icon_arrow@2x.png */, | ||
| 1910 | 1913 | ); | |
| 1911 | 1914 | path = task; | |
| 1912 | 1915 | sourceTree = "<group>"; | |
@@ -3847,6 +3850,7 @@ | |||
| 3847 | 3850 | 4E6383B91B32640900D98648 /* messageLeft_bg_img@2x.png in Resources */, | |
| 3848 | 3851 | 8E97CEAB1A0C7E26006F9AD7 /* coding_emoji_20@2x.png in Resources */, | |
| 3849 | 3852 | 8EA6D1AA19E240C40076D59C /* Images.xcassets in Resources */, | |
| 3853 | + 4E63840F1B34124000D98648 /* task_icon_arrow@2x.png in Resources */, | ||
| 3850 | 3854 | 4E6383C71B3265DC00D98648 /* mrpr_icon_refaused@2x.png in Resources */, | |
| 3851 | 3855 | 8ED2AAFB19F60D5200607A1D /* loading_monkey@2x.png in Resources */, | |
| 3852 | 3856 | 8E97CE981A0C7E26006F9AD7 /* coding_emoji_01@2x.png in Resources */, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -330,7 +330,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N | |||
| 330 | 330 | }; | |
| 331 | 331 | ||
| 332 | 332 | cell.backgroundColor = kColorTableBG; | |
| 333 | - [tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:20]; | ||
| 333 | + // [tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:20]; | ||
| 334 | 334 | return cell; | |
| 335 | 335 | }else{ | |
| 336 | 336 | TaskDescriptionCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_TaskDescriptionCell forIndexPath:indexPath]; | |
@@ -341,6 +341,13 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N | |||
| 341 | 341 | titleStr = _myCopyTask.has_description.boolValue? @"查看描述": @"补充描述"; | |
| 342 | 342 | } | |
| 343 | 343 | [cell setTitleStr:titleStr andSpecail:[titleStr isEqualToString:@"查看描述"]]; | |
| 344 | + cell.buttonClickedBlock = ^(){ | ||
| 345 | + if (weakSelf.myCopyTask.has_description.boolValue && !weakSelf.myCopyTask.task_description) { | ||
| 346 | + //描述内容 还没有加载成功 | ||
| 347 | + return ; | ||
| 348 | + } | ||
| 349 | + [weakSelf goToDescriptionVC]; | ||
| 350 | + }; | ||
| 344 | 351 | cell.backgroundColor = kColorTableBG; | |
| 345 | 352 | [tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:20]; | |
| 346 | 353 | return cell; | |
@@ -349,7 +356,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N | |||
| 349 | 356 | LeftImage_LRTextCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_LeftImage_LRText forIndexPath:indexPath]; | |
| 350 | 357 | [cell setObj:_myCopyTask type:indexPath.row]; | |
| 351 | 358 | cell.backgroundColor = kColorTableBG; | |
| 352 | - [tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:20]; | ||
| 359 | + [tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:60]; | ||
| 353 | 360 | return cell; | |
| 354 | 361 | }else{ | |
| 355 | 362 | ProjectActivity *curActivity = [self.myCopyTask.activityList objectAtIndex:indexPath.row]; | |
@@ -432,13 +439,13 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath | |||
| 432 | 439 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; | |
| 433 | 440 | ESWeakSelf; | |
| 434 | 441 | if (indexPath.section == 0) { | |
| 435 | - if (indexPath.row != 0) { | ||
| 436 | - if (self.myCopyTask.has_description.boolValue && !self.myCopyTask.task_description) { | ||
| 437 | - //描述内容 还没有加载成功 | ||
| 438 | - return ; | ||
| 439 | - } | ||
| 440 | - [self goToDescriptionVC]; | ||
| 441 | - } | ||
| 442 | + // if (indexPath.row != 0) { | ||
| 443 | + // if (self.myCopyTask.has_description.boolValue && !self.myCopyTask.task_description) { | ||
| 444 | + // //描述内容 还没有加载成功 | ||
| 445 | + // return ; | ||
| 446 | + // } | ||
| 447 | + // [self goToDescriptionVC]; | ||
| 448 | + // } | ||
| 442 | 449 | }else if (indexPath.section == 1){ | |
| 443 | 450 | if (indexPath.row == LeftImage_LRTextCellTypeTaskOwner) { | |
| 444 | 451 | ProjectMemberListViewController *vc = [[ProjectMemberListViewController alloc] init]; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,7 +25,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus | |||
| 25 | 25 | // Initialization code | |
| 26 | 26 | self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; | |
| 27 | 27 | if (!_iconView) { | |
| 28 | - _iconView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 5, 33, 33)]; | ||
| 28 | + _iconView = [[UIImageView alloc] initWithFrame:CGRectMake(kPaddingLeftWidth, 5, 33, 33)]; | ||
| 29 | 29 | [self.contentView addSubview:_iconView]; | |
| 30 | 30 | } | |
| 31 | 31 | if (!_leftLabel) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,10 +6,8 @@ | |||
| 6 | 6 | // Copyright (c) 2015年 Coding. All rights reserved. | |
| 7 | 7 | // | |
| 8 | 8 | ||
| 9 | - #define kTaskActivityCell_LeftPading 20.0 | ||
| 10 | - #define kTaskActivityCell_LeftPading 20.0 | ||
| 11 | - #define kTaskActivityCell_LeftContentPading (kTaskActivityCell_LeftPading + 40) | ||
| 12 | - #define kTaskActivityCell_ContentWidth (kScreen_Width - kTaskActivityCell_LeftContentPading - kTaskActivityCell_LeftPading) | ||
| 9 | + #define kTaskActivityCell_LeftContentPading (kPaddingLeftWidth + 40) | ||
| 10 | + #define kTaskActivityCell_ContentWidth (kScreen_Width - kTaskActivityCell_LeftContentPading - kPaddingLeftWidth) | ||
| 13 | 11 | ||
| 14 | 12 | #import "TaskActivityCell.h" | |
| 15 | 13 | ||
@@ -34,7 +32,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus | |||
| 34 | 32 | } | |
| 35 | 33 | if (!_tipIconView) { | |
| 36 | 34 | CGFloat borderWidth = 2; | |
| 37 | - _tipIconView = [[UIImageView alloc] initWithFrame:CGRectMake(kTaskActivityCell_LeftPading - borderWidth, 10, 25 + 2*borderWidth, 25 + 2*borderWidth)]; | ||
| 35 | + _tipIconView = [[UIImageView alloc] initWithFrame:CGRectMake(kPaddingLeftWidth - borderWidth, 10, 25 + 2*borderWidth, 25 + 2*borderWidth)]; | ||
| 38 | 36 | _tipIconView.contentMode = UIViewContentModeCenter; | |
| 39 | 37 | ||
| 40 | 38 | _tipIconView.layer.masksToBounds = YES; | |
@@ -45,7 +43,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus | |||
| 45 | 43 | [self.contentView addSubview:_tipIconView]; | |
| 46 | 44 | } | |
| 47 | 45 | if (!_contentLabel) { | |
| 48 | - _contentLabel = [[UITTTAttributedLabel alloc] initWithFrame:CGRectMake(kTaskActivityCell_LeftContentPading, 10, kTaskActivityCell_ContentWidth, 15)]; | ||
| 46 | + _contentLabel = [[UITTTAttributedLabel alloc] initWithFrame:CGRectMake(kTaskActivityCell_LeftContentPading, 13, kTaskActivityCell_ContentWidth, 15)]; | ||
| 49 | 47 | _contentLabel.numberOfLines = 0; | |
| 50 | 48 | [self.contentView addSubview:_contentLabel]; | |
| 51 | 49 | } | |
@@ -114,10 +112,10 @@ + (NSAttributedString *)attrContentWithObj:(ProjectActivity *)curActivity{ | |||
| 114 | 112 | } | |
| 115 | 113 | ||
| 116 | 114 | attrContent = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ %@", userName, contentStr]]; | |
| 117 | - [attrContent addAttributes:@{NSFontAttributeName : [UIFont boldSystemFontOfSize:12], | ||
| 115 | + [attrContent addAttributes:@{NSFontAttributeName : [UIFont boldSystemFontOfSize:13], | ||
| 118 | 116 | NSForegroundColorAttributeName : [UIColor colorWithHexString:@"0x222222"]} | |
| 119 | 117 | range:NSMakeRange(0, userName.length)]; | |
| 120 | - [attrContent addAttributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12], | ||
| 118 | + [attrContent addAttributes:@{NSFontAttributeName : [UIFont systemFontOfSize:13], | ||
| 121 | 119 | NSForegroundColorAttributeName : [UIColor colorWithHexString:@"0x999999"]} | |
| 122 | 120 | range:NSMakeRange(userName.length + 1, contentStr.length)]; | |
| 123 | 121 | ||
@@ -136,7 +134,7 @@ + (CGFloat)cellHeightWithObj:(id)obj{ | |||
| 136 | 134 | if ([obj isKindOfClass:[ProjectActivity class]]) { | |
| 137 | 135 | NSAttributedString *attrContent = [self attrContentWithObj:obj]; | |
| 138 | 136 | CGFloat contentHeight = [attrContent boundingRectWithSize:CGSizeMake(kTaskActivityCell_ContentWidth, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin context:nil].size.height; | |
| 139 | - cellHeight = ceilf(contentHeight + 20); | ||
| 137 | + cellHeight = ceilf(contentHeight + 26); | ||
| 140 | 138 | cellHeight = MAX(44, cellHeight); | |
| 141 | 139 | } | |
| 142 | 140 | return cellHeight; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ | |||
| 7 | 7 | // | |
| 8 | 8 | ||
| 9 | 9 | #define kTaskCommentCell_FontContent [UIFont systemFontOfSize:15] | |
| 10 | - #define kTaskCommentCell_LeftPading 35.0 | ||
| 10 | + #define kTaskCommentCell_LeftPading 30.0 | ||
| 11 | 11 | #define kTaskCommentCell_LeftContentPading (kTaskCommentCell_LeftPading + 40) | |
| 12 | 12 | #define kTaskCommentCell_ContentWidth (kScreen_Width - kTaskCommentCell_LeftContentPading - kTaskCommentCell_LeftPading) | |
| 13 | 13 | ||
@@ -46,7 +46,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus | |||
| 46 | 46 | } | |
| 47 | 47 | if (!_ownerIconView) { | |
| 48 | 48 | CGFloat borderWidth = 0; | |
| 49 | - _ownerIconView = [[UIImageView alloc] initWithFrame:CGRectMake(20 - borderWidth, curBottomY, 25+ 2*borderWidth, 25 + 2*borderWidth)]; | ||
| 49 | + _ownerIconView = [[UIImageView alloc] initWithFrame:CGRectMake(kPaddingLeftWidth - borderWidth, curBottomY, 25+ 2*borderWidth, 25 + 2*borderWidth)]; | ||
| 50 | 50 | ||
| 51 | 51 | _ownerIconView.layer.masksToBounds = YES; | |
| 52 | 52 | _ownerIconView.layer.cornerRadius = _ownerIconView.frame.size.width/2; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,11 +5,9 @@ | |||
| 5 | 5 | // Created by 王 原闯 on 14-8-19. | |
| 6 | 6 | // Copyright (c) 2014年 Coding. All rights reserved. | |
| 7 | 7 | // | |
| 8 | - #define kTaskContentCell_PadingLeft 20.0 | ||
| 9 | - #define kTaskContentCell_PadingRight 20.0 | ||
| 10 | 8 | #define kTaskContentCell_ContentHeightMin kScaleFrom_iPhone5_Desgin(120.0) | |
| 11 | 9 | #define kTextView_Pading 8.0 | |
| 12 | - #define kTaskContentCell_ContentWidth (kScreen_Width-kTaskContentCell_PadingLeft-kTaskContentCell_PadingRight + 2*kTextView_Pading) | ||
| 10 | + #define kTaskContentCell_ContentWidth (kScreen_Width-kPaddingLeftWidth-kPaddingLeftWidth + 2*kTextView_Pading) | ||
| 13 | 11 | #define kTaskContentCell_ContentFont [UIFont systemFontOfSize:18] | |
| 14 | 12 | ||
| 15 | 13 | ||
@@ -19,6 +17,8 @@ @interface TaskContentCell () | |||
| 19 | 17 | @property (strong, nonatomic) UITextView *taskContentView; | |
| 20 | 18 | @property (strong, nonatomic) UIButton *deleteBtn; | |
| 21 | 19 | @property (strong, nonatomic) UILabel *creatorLabel; | |
| 20 | + @property (strong, nonatomic) UIView *lineView; | ||
| 21 | + | ||
| 22 | 22 | @end | |
| 23 | 23 | ||
| 24 | 24 | @implementation TaskContentCell | |
@@ -53,11 +53,16 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus | |||
| 53 | 53 | button; | |
| 54 | 54 | }); | |
| 55 | 55 | } | |
| 56 | + if (!_lineView) { | ||
| 57 | + _lineView = [[UIView alloc] initWithFrame:CGRectMake(kPaddingLeftWidth, 0, kScreen_Width - 2*kPaddingLeftWidth, 0.5)]; | ||
| 58 | + _lineView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"dot_line"]]; | ||
| 59 | + [self.contentView addSubview:_lineView]; | ||
| 60 | + } | ||
| 56 | 61 | [_taskContentView mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 57 | - make.edges.equalTo(self.contentView).insets(UIEdgeInsetsMake(5, kTaskContentCell_PadingLeft-kTextView_Pading, 35, kTaskContentCell_PadingLeft-kTextView_Pading)); | ||
| 62 | + make.edges.equalTo(self.contentView).insets(UIEdgeInsetsMake(5, kPaddingLeftWidth-kTextView_Pading, 35, kPaddingLeftWidth-kTextView_Pading)); | ||
| 58 | 63 | }]; | |
| 59 | 64 | [_creatorLabel mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 60 | - make.left.equalTo(self.contentView.mas_left).offset(kTaskContentCell_PadingLeft); | ||
| 65 | + make.left.equalTo(self.contentView.mas_left).offset(kPaddingLeftWidth); | ||
| 61 | 66 | make.right.equalTo(_deleteBtn.mas_left).offset(10); | |
| 62 | 67 | make.bottom.equalTo(self.contentView.mas_bottom).offset(-10); | |
| 63 | 68 | make.height.mas_equalTo(20); | |
@@ -66,7 +71,13 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus | |||
| 66 | 71 | [_deleteBtn mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 67 | 72 | make.size.mas_equalTo(CGSizeMake(44, 20)); | |
| 68 | 73 | make.bottom.equalTo(self.contentView.mas_bottom).offset(-10); | |
| 69 | - make.right.equalTo(self.contentView.mas_right).offset(-kTaskContentCell_PadingRight); | ||
| 74 | + make.right.equalTo(self.contentView.mas_right).offset(-kPaddingLeftWidth); | ||
| 75 | + }]; | ||
| 76 | + [_lineView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 77 | + make.left.equalTo(self.contentView).offset(kPaddingLeftWidth); | ||
| 78 | + make.right.equalTo(self.contentView).offset(-kPaddingLeftWidth); | ||
| 79 | + make.height.mas_equalTo(0.5); | ||
| 80 | + make.bottom.equalTo(self.contentView); | ||
| 70 | 81 | }]; | |
| 71 | 82 | } | |
| 72 | 83 | return self; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,6 +11,8 @@ | |||
| 11 | 11 | #import <UIKit/UIKit.h> | |
| 12 | 12 | ||
| 13 | 13 | @interface TaskDescriptionCell : UITableViewCell | |
| 14 | + @property (copy, nonatomic) void(^buttonClickedBlock)(); | ||
| 14 | 15 | - (void)setTitleStr:(NSString *)title andSpecail:(BOOL)isSpecail; | |
| 16 | + | ||
| 15 | 17 | + (CGFloat)cellHeight; | |
| 16 | 18 | @end | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ | |||
| 9 | 9 | #import "TaskDescriptionCell.h" | |
| 10 | 10 | ||
| 11 | 11 | @interface TaskDescriptionCell () | |
| 12 | - @property (strong, nonatomic) UILabel *titleLabel; | ||
| 12 | + @property (strong, nonatomic) UIButton *button; | ||
| 13 | 13 | @end | |
| 14 | 14 | ||
| 15 | 15 | @implementation TaskDescriptionCell | |
@@ -18,24 +18,38 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus | |||
| 18 | 18 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; | |
| 19 | 19 | if (self) { | |
| 20 | 20 | // Initialization code | |
| 21 | - self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; | ||
| 22 | - if (!_titleLabel) { | ||
| 23 | - _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 7, (kScreen_Width - 120), 30)]; | ||
| 24 | - _titleLabel.backgroundColor = [UIColor clearColor]; | ||
| 25 | - _titleLabel.font = [UIFont systemFontOfSize:16]; | ||
| 26 | - _titleLabel.textColor = [UIColor colorWithHexString:@"0x222222"]; | ||
| 27 | - [self.contentView addSubview:_titleLabel]; | ||
| 21 | + self.selectionStyle = UITableViewCellSelectionStyleNone; | ||
| 22 | + | ||
| 23 | + if (!_button) { | ||
| 24 | + _button = [[UIButton alloc] initWithFrame:CGRectMake(kPaddingLeftWidth, ([[self class] cellHeight] - 30)/2, kScreen_Width - 2*kPaddingLeftWidth, 30)]; | ||
| 25 | + _button.titleLabel.font = [UIFont systemFontOfSize:16]; | ||
| 26 | + _button.backgroundColor = [UIColor colorWithHexString:@"0xf0f0f0"]; | ||
| 27 | + _button.layer.masksToBounds = YES; | ||
| 28 | + _button.layer.cornerRadius = 2.0; | ||
| 29 | + [_button setImage:[UIImage imageNamed:@"task_icon_arrow"] forState:UIControlStateNormal]; | ||
| 30 | + | ||
| 31 | + _button.titleEdgeInsets = UIEdgeInsetsMake(0, -10, 0, 10); | ||
| 32 | + _button.imageEdgeInsets = UIEdgeInsetsMake(0, 70, 0, -70); | ||
| 33 | + [_button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 34 | + [self.contentView addSubview:_button]; | ||
| 28 | 35 | } | |
| 29 | 36 | } | |
| 30 | 37 | return self; | |
| 31 | 38 | } | |
| 32 | 39 | ||
| 33 | 40 | - (void)setTitleStr:(NSString *)title andSpecail:(BOOL)isSpecail{ | |
| 34 | - _titleLabel.text = title; | ||
| 35 | - _titleLabel.textColor = [UIColor colorWithHexString:isSpecail? @"0x3bbd79": @"0x222222"]; | ||
| 41 | + [_button setTitle:title forState:UIControlStateNormal]; | ||
| 42 | + [_button setTitleColor:[UIColor colorWithHexString:isSpecail? @"0x3bbd79": @"0x222222"] forState:UIControlStateNormal]; | ||
| 43 | + | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + - (void)buttonClicked:(id)sender{ | ||
| 47 | + if (self.buttonClickedBlock) { | ||
| 48 | + self.buttonClickedBlock(); | ||
| 49 | + } | ||
| 36 | 50 | } | |
| 37 | 51 | ||
| 38 | 52 | + (CGFloat)cellHeight{ | |
| 39 | - return 44.0; | ||
| 53 | + return 54.0; | ||
| 40 | 54 | } | |
| 41 | 55 | @end | |
| Back | FazBrowse Home | New Git URL |
0 commit comments