代码: // 修改进度条的指针图片 [self.progressSlider setThumbImage:[UIImage imageNamed:@"player_slider_playback_thumb"] forState:UIControlStateNormal]; 原来的样子: 现在的样子 ...
分类:
移动开发 时间:
2016-06-13 23:36:37
阅读次数:
433
图片拉伸 +(UIImage*)wlisWithImage:(NSString *)name{ //获取图片 UIImage * img=[UIImage imageNamed:name]; //获取图片宽 CGFloat imgW=img.size.width; //获取图片高 CGFloat i ...
分类:
其他好文 时间:
2016-06-06 23:43:18
阅读次数:
317
在xib拖拽控件的界面给view添加背景 UIImageView *imageView = [[UIImageView alloc]initWithFrame:self.view.bounds]; imageView.image = [UIImage imageNamed:@"51670.jpg"] ...
分类:
其他好文 时间:
2016-05-31 15:40:43
阅读次数:
136
使用instrument中allocation进行调试 使用imageNamed:方法加载图片: 加载到内存中,会一直在内存中,不随对象销毁.程序员无法管理 图片不会重复添加 占内存空间较大 使用imageWithContentOfFile:加载图片:加载到内存的图片随对象销毁而销毁 图片会重复添加 ...
分类:
其他好文 时间:
2016-05-29 13:32:14
阅读次数:
126
一. 直接使用imageNamed进行创建 1 UIImage * image = [UIImage imageNamed:@"1.jpg"]; 简单说一下这种方式的优缺点: 优点:代码量少,一行代码就可以搞定。当程序中多次加载这张图片时,系统会指向同一块内存,这样可以提升效率。 缺点:系统每次会将 ...
分类:
其他好文 时间:
2016-05-28 13:01:16
阅读次数:
189
设置被选中的图片 self.tabBarController.tabBar.selectedItem.selectedImage = [UIImage imageNamed:@"main.png"]; 设置被选中颜色 self.tabBarController.tabBar.tintColor = ...
分类:
移动开发 时间:
2016-05-27 14:28:56
阅读次数:
257
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. //使图片两边不拉伸,中间拉伸 UIImage *image = [UIImage imageNamed:@"1 ...
分类:
其他好文 时间:
2016-05-25 15:03:08
阅读次数:
184
代码: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. //使图片两边不拉伸,中间拉伸 UIImage *image = [UIImage imageNamed ...
分类:
其他好文 时间:
2016-05-25 09:28:09
阅读次数:
135
方式一 代码实现 这种要写很多代码 ,每个控制器都要写 UIImage *image=[UIImage imageNamed:@"tabBar_friendTrends_click_icon"]; // 不让tabbar底部有渲染的关键代码 image=[image imageWithRenderi ...
分类:
移动开发 时间:
2016-05-24 12:00:55
阅读次数:
219
方式一 代码实现 这种要写很多代码 ,每个控制器都要写 UIImage *image=[UIImage imageNamed:@"tabBar_friendTrends_click_icon"]; // 不让tabbar底部有渲染的关键代码 image=[image imageWithRenderi ...
分类:
移动开发 时间:
2016-05-23 21:08:44
阅读次数:
210