UILabel How to set background image
来源:互联网 发布:风靡美国华人网络的菜 编辑:程序博客网 时间:2024/05/17 22:37
UILabel *myLabel=[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 20)];UIImage *img = [UIImage imageNamed:@"a.png"];CGSize imgSize = myLabel.frame.size;UIGraphicsBeginImageContext( imgSize );[img drawInRect:CGRectMake(0,0,imgSize.width,imgSize.height)];UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();myLabel.backgroundColor = [UIColor colorWithPatternImage:newImage];
0 0
- UILabel How to set background image
- how to set UITableViewCell background image
- How to set background image of a component in GWTEXT
- How can I set the background of UITableView (the tableview style is "Grouped") to use an image?
- How to stretch a background image of a windows form
- How to make android app’s background image repeat.
- How to tile a background image in Android
- How to make android app's background image repeat
- how to select a transparent background image in ms paint.
- set transparent button image and background color to button
- Apple Watch set background image
- How to Set Relative Path for Jasper Reports Image
- QT11 How to set image with QLabel in Qt
- Fit background image to div
- How to tile small texture image onto page as its background?
- set button background to color
- Set image as background for a view
- How to set vim
- 爱情
- 告诉你Hadoop是什么
- 程序调优
- 场景资源之解包(2)
- poj 1276 DP
- UILabel How to set background image
- 无线调试android应用——ADB OVER NETWORK
- WinCE和Windows Mobile下使用TinyXML进行C++的开发
- Android数据Json解析之开源jar类Gson解析
- 排序算法--希尔算法
- 设计模式C++实现(2)——策略模式
- 什么是游戏2048的最佳算法
- 双向链表 只使用一个指针
- IOS socket GCDAsyncSocket