iOS?????÷????????bug???
???????? ???????[ 2016/12/23 14:55:17 ] ?????????????? ??????????
????8.???????????????壬??????????????
// ?????????????????????????
- (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxHeight:(CGFloat)height
{
NSMutableDictionary *attrDict = [NSMutableDictionary dictionary];
attrDict[NSFontAttributeName] = font;
CGSize size = [text boundingRectWithSize:CGSizeMake(MAXFLOAT?? height) options:NSStringDrawingUsesLineFragmentOrigin attributes:attrDict context:nil].size;
return size;
}
// ?????????????????????????
- (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxWidth:(CGFloat)width
{
NSMutableDictionary *attrDict = [NSMutableDictionary dictionary];
attrDict[NSFontAttributeName] = font;
CGSize size = [text boundingRectWithSize:CGSizeMake(width?? MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:attrDict context:nil].size;
return size;
}
????9.??UILabel?????м????????????????????????
//??UILabel?????м???????
-(void)setLabelSpace:(UILabel*)label withValue:(NSString*)str withFont:(UIFont*)font {
NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init];
paraStyle.lineBreakMode = NSLineBreakByCharWrapping; //??β??????????????
paraStyle.alignment = NSTextAlignmentLeft; //????????
paraStyle.lineSpacing = 7; //?????м??
paraStyle.hyphenationFactor = 1.0; //???????? ??iOS???????????0??1
paraStyle.firstLineHeadIndent = 0.0; //????????
paraStyle.paragraphSpacingBefore = 0.0; //?????п????
paraStyle.headIndent = 0; //????????(???г???)
paraStyle.paragraphSpacing = 15; //???????????
//???????? NSKernAttributeName:@1.5f
NSDictionary *dic = @{NSFontAttributeName:font?? NSParagraphStyleAttributeName:paraStyle?? NSKernAttributeName:@1.5f};
NSAttributedString *attributeStr = [[NSAttributedString alloc] initWithString:str attributes:dic];
label.attributedText = attributeStr;
}
//????UILabel????(?????м??????)
-(CGFloat)getSpaceLabelHeight:(NSString*)str withFont:(UIFont*)font withWidth:(CGFloat)width {
NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init];
paraStyle.lineBreakMode = NSLineBreakByCharWrapping;
paraStyle.alignment = NSTextAlignmentLeft;
paraStyle.lineSpacing = 7;
paraStyle.hyphenationFactor = 1.0;
paraStyle.firstLineHeadIndent = 0.0;
paraStyle.paragraphSpacingBefore = 0.0;
paraStyle.headIndent = 0;
paraStyle.paragraphSpacing = 15;
NSDictionary *dic = @{NSFontAttributeName:font?? NSParagraphStyleAttributeName:paraStyle?? NSKernAttributeName:@1.5f};
CGSize size = [str boundingRectWithSize:CGSizeMake(width?? MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil].size;
return size.height;
}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
??????????????????Bug???????????????????????γ?????????????????????????????????????????????ж??????????????????????????????????????????Щ????ν??????????????????е???????????????????Ч????????????????????????ALM(??????????????)???????-??????????ALM(??????????????)???????-???????????ALM(??????????????)???????-?????????á????????ALM(??????????????)???????-????????????Bug????????????????????????????????????????????????JIRA??????????????????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????