+ (CGRect)createSize:(NSString *)lableStr andFont:(NSInteger)fondS andSize:(CGSize)mysize andName:(NSString *)name;
{
UIFont *font;
if (name.length == 0)
{
font=[UIFont systemFontOfSize:fondS];
}else
{
font=[UIFont fontWithName:name size:fondS];
}
CGRect rect=[lableStr boundingRectWithSize:mysize options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName] context:nil];
return rect;
}
网友评论