继承于UIView创建UIView对象后,可设置其属性1.label的颜色 label.backgroundColor = [UIColor redColor];2.给label添加文字 label.text = @"我的博客";3.设置字体颜色 label.textColor = [UIColor...
分类:
其他好文 时间:
2015-12-26 16:35:44
阅读次数:
149
设置导航栏的颜色self.navigationController.navigationBar.barTintColor = [UIColor blackColor]; //设置导航栏字体的颜色大小setTitleTextAttributes后面接字典, [self.navigationCont.....
分类:
其他好文 时间:
2015-12-25 18:57:13
阅读次数:
145
画阴影:CGContextRef context = UIGraphicsGetCurrentContext();CGContextSetFillColorWithColor(context, [UIColor grayColor].CGColor);CGContextFillRect(contex...
分类:
移动开发 时间:
2015-12-23 19:38:53
阅读次数:
211
怎么样实现两条水纹动画呢?代码如下#import "LXHTwoWaterWaveView.h"@interface LXHTwoWaterWaveView (){ UIColor *_waterColor1; UIColor *_waterColor2; float _c...
分类:
其他好文 时间:
2015-12-23 00:34:45
阅读次数:
232
//MARK: - 生成指定尺寸的纯色图片func imageWithColor(color: UIColor!, size: CGSize) -> UIImage{ var size = size if CGSizeEqualToSize(size, CGSizeZero){ ...
分类:
编程语言 时间:
2015-12-22 14:34:45
阅读次数:
175
// 颜色转换为背景图片+ (UIImage *)imageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); UIGraphicsBeginImageContext(rect.size);.....
分类:
其他好文 时间:
2015-12-22 11:40:11
阅读次数:
163
UIView *topView = [[UIView alloc] init]; topView.backgroundColor = [UIColor redColor]; [self.view addSubview:topView]; topView.translates...
分类:
其他好文 时间:
2015-12-22 01:16:53
阅读次数:
239
定义#import @interface UIImage (ChangeImageColor)/** * 改变图片的颜色 * * @param tintColor * * @return */- (UIImage *) imageWithTintColor:(UIColor *)tintC...
分类:
其他好文 时间:
2015-12-21 21:47:51
阅读次数:
130
1 UIWindow、UILabel、UIColor、UIScreen、UIViewController、UIView、UIControl、UIButton、IBOutlet、IBAction、UIStepper、 UISlider、 UISwitch、UITextField、UIA...
分类:
其他好文 时间:
2015-12-21 14:23:53
阅读次数:
249
修改placehoder的颜色:[ self.loginnameText setValue:[UIColor colorWithRed:184.f/255 green:214.f/255 blue:225.f/255 alpha:1] forKeyPath:@"_placeholderLabel.t...
分类:
其他好文 时间:
2015-12-19 01:26:59
阅读次数:
204