fix
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
@property (nonatomic,assign) int countX;
|
||||
@property (nonatomic,strong) NSArray *titles;
|
||||
@property (nonatomic,copy) NSString *selectjob;
|
||||
@property (nonatomic) CGFloat btnMaXY;
|
||||
@end
|
||||
|
||||
@implementation GiGaUserJobViewCell
|
||||
@@ -29,6 +30,7 @@
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
_countY = 0;
|
||||
_countX = 0;
|
||||
_btnMaXY = 10;
|
||||
[self creatUI];
|
||||
self.titles = [NSArray new];
|
||||
//self.backgroundColor = [UIColor blueColor];
|
||||
@@ -42,14 +44,14 @@
|
||||
|
||||
}
|
||||
-(void)updateActionBtnFrame{
|
||||
_upDownBtn.frame = CGRectMake(KMainW - 22 - 55,self.frame.size.height - 31, 55, 31);
|
||||
_upDownBtn.frame = CGRectMake(KMainW - 22 - 55,_btnMaXY, 55, 31);
|
||||
|
||||
}
|
||||
|
||||
- (UIButton *)upDownBtn{
|
||||
if (!_upDownBtn) {
|
||||
_upDownBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_upDownBtn.frame = CGRectMake(KMainW - 22 - 55, 10, 55, 31);
|
||||
_upDownBtn.frame = CGRectMake(KMainW - 22 - 55,_btnMaXY, 55, 31);
|
||||
[_upDownBtn addTarget:self action:@selector(upDownBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _upDownBtn;
|
||||
@@ -112,8 +114,7 @@
|
||||
}else{
|
||||
X = X + width + SPACE_X;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,7 +158,6 @@
|
||||
}else{
|
||||
X = X + width + SPACE_X;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -192,18 +192,24 @@
|
||||
_countX = 0;
|
||||
|
||||
}
|
||||
|
||||
if (idx == self.titles.count - 1) {
|
||||
_btnMaXY = Y;
|
||||
[self updateActionBtnFrame];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JobMaskButton *jobBtn = [JobMaskButton buttonWithType:UIButtonTypeCustom];
|
||||
[jobBtn setBackgroundImage:[UIImage imageNamed:@"btn_job"] forState:UIControlStateNormal];
|
||||
//[jobBtn setBackgroundImage:[UIImage imageNamed:@"btn_job"] forState:UIControlStateNormal];
|
||||
jobBtn.layer.masksToBounds =YES;
|
||||
jobBtn.layer.cornerRadius = MARK_H /2;
|
||||
jobBtn.layer.borderWidth = 1;
|
||||
jobBtn.layer.borderColor = GIGARGB(222, 222, 222, 1).CGColor;
|
||||
jobBtn.jobStr = title;
|
||||
NSAttributedString *attri = [GiGaHelper stringWithText:title textColor:GIGARGB(151, 151, 151, 1) textFont:GIGA_TEXTFONTMEDIUM(13) leterSpace:0];
|
||||
[jobBtn setAttributedTitle:attri forState:UIControlStateNormal];
|
||||
jobBtn.frame = CGRectMake(X,Y, width, MARK_H);
|
||||
jobBtn.frame = CGRectMake(X,Y,width, MARK_H);
|
||||
[jobBtn addTarget:self action:@selector(jobClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:jobBtn];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user