這是一個標題
正式衣蛾能死啊死安徽省曬曬酸奶酸奶賽思安賽事你賽尼斯按時就撒手及哦啊叫少睡覺奧少見掃睡覺奧少睡覺奧
無序列表
- 1 曬曬曬曬曬曬曬曬曬那些看似塞納擦三是哪款 三棵樹那看三棵樹那看薩克尼克斯
- 2
- 3
有序列表
- sais
- sjaisa
- saksaksnak
引用
曬曬曬曬sjainxkansak你看少數(shù)你打開是哪款帶你看撒開上哪看啊啊叫是哪款不打卡薩克不打卡
插入圖片
插入鏈接
粗體
這是粗體
斜體
我是斜體
我是table
Tables | Are | Cool | 颯颯 asasasasada |
---|---|---|---|
col 3 is | right-aligned | $1600 | |
col 2 is | centered | $12 | |
zebra stripes | are neat | $1 | |
這是自己的哈 | 這是第二 | 這是最后sjaks |
我是代碼
//設置字體樣式
- (UIImage*)text:(NSString*)text addToView:(UIImage*)image
{
UIFont*font = [UIFont fontWithName:@"Arial-BoldItalicMT"size:32];
NSDictionary*dict =@{NSFontAttributeName:font,NSForegroundColorAttributeName:[UIColor redColor]};
CGSize textSize = [text sizeWithAttributes:dict];
//繪制上下文
UIGraphicsBeginImageContext(image.size);
[image drawInRect:CGRectMake(0,0, image.size.width, image.size.height)];
int border =10;
CGRect re = {CGPointMake(image.size.width- textSize.width- border, image.size.height- textSize.height- border), textSize};
//此方法必須寫在上下文才生效
[text drawInRect:re withAttributes:dict];
UIImage *newImage =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}