add weixinapi
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
{
|
||||
if (!_view) {
|
||||
UIView *view = [[UIView alloc] init];
|
||||
//view.backgroundColor = [UIColor blueColor];
|
||||
view.backgroundColor = [UIColor blueColor];
|
||||
[self addSubview:view];
|
||||
_view = view;
|
||||
}
|
||||
@@ -77,13 +77,15 @@
|
||||
NSString *labelText = _answerArr[i];
|
||||
labelText = [labelText stringByReplacingOccurrencesOfString:@"\r" withString:@""];
|
||||
labelText = [labelText stringByReplacingOccurrencesOfString:@"\n" withString:@""];
|
||||
|
||||
|
||||
//内容高度
|
||||
CGFloat labelH = [GiGaHelper sizeWithText:labelText font:font maxSize:CGSizeMake(KMainW - 50, MAXFLOAT)].height;
|
||||
//CGFloat labelH = [GiGaHelper sizeWithText:labelText font:font maxSize:CGSizeMake(frame.size.width - btnH - 5, MAXFLOAT)].height;
|
||||
CGFloat labelH = [GiGaHelper getSpaceLabelHeight:labelText withFont:font maxSize:CGSizeMake(frame.size.width - btnH - 5, MAXFLOAT)];
|
||||
|
||||
//选项标签
|
||||
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(btnH + 5, labelY + 4, KMainW - 50, labelH)];
|
||||
label.text = labelText;
|
||||
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(btnH + 5, labelY + 4,frame.size.width - btnH - 5, labelH)];
|
||||
[GiGaHelper setLabelSpace:label withValue:labelText withFont:font] ;
|
||||
label.font = font;
|
||||
label.numberOfLines = 0;
|
||||
label.textColor = GIGAUIColorFromRGBA(0x616161);
|
||||
@@ -112,18 +114,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
self.view.frame = CGRectMake(10, 0, KMainW - 20, labelY - padding);
|
||||
self.view.frame = CGRectMake(0,0,frame.size.width, labelY - padding);
|
||||
frame.size.height = labelY - padding;
|
||||
self.frame = frame;
|
||||
|
||||
[self setNeedsUpdateConstraints];
|
||||
[self mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.superview.mas_top).offset(frame.origin.y + 10);
|
||||
make.left.mas_equalTo(self.superview.mas_left).offset(30);
|
||||
make.height.mas_equalTo(frame.size.height);
|
||||
make.width.mas_equalTo(frame.size.width - 30*2);
|
||||
}];
|
||||
|
||||
// [self setNeedsUpdateConstraints];
|
||||
// [self mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.mas_equalTo(self.superview.mas_top).offset(frame.origin.y + 10);
|
||||
// make.left.mas_equalTo(self.superview.mas_left).offset(30);
|
||||
// make.height.mas_equalTo(frame.size.height);
|
||||
// make.width.mas_equalTo(frame.size.width - 30*2);
|
||||
// }];
|
||||
}
|
||||
|
||||
- (void)btnOnClick:(UIButton *)btn
|
||||
|
||||
Reference in New Issue
Block a user