UILabel *label=[[UILabel alloc] initWithFrame:CGRectMake(100, 100, 100, 200)]; label.backgroundColor=[UIColor yellowColor]; label.text=@"账号";//不可更改文.....
分类:
其他好文 时间:
2015-07-24 10:38:46
阅读次数:
117
//背景颜色 self.window.backgroundColor = [UIColor whiteColor]; //让window能够显示出来 //透明度 self.window.alpha=1.0; /* //所有的控件都继承与UIView //第一步:对视图开辟空间,并初始化 UIVie....
分类:
其他好文 时间:
2015-07-24 10:36:21
阅读次数:
81
1,自定义颜色#define cctvColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]2,系统版本号#define IOS7 [[UIDevice currentDevice]...
分类:
其他好文 时间:
2015-07-24 06:56:06
阅读次数:
147
#import @interface UIColor (RandomColor) (UIColor *) randomColor; @end #import "UIColorRandomColor.h" @implementation UIColor (RandomColor) (UIColor *...
分类:
移动开发 时间:
2015-07-24 06:55:44
阅读次数:
278
ViewController.m -?(void)viewDidLoad?{
????[super?viewDidLoad];
????self.view.backgroundColor?=?[UIColor?redColor];
}
-(void)touchesBegan:(NSSet?*)touches?withEvent:(UIEvent?*)eve...
分类:
其他好文 时间:
2015-07-23 18:00:21
阅读次数:
270
UILabel* noteLabel = [[UILabel alloc] init];
noteLabel.frame = CGRectMake(0, 100, 200, 100);
noteLabel.textColor = [UIColor blackColor];
NSMutableAttributedString *noteStr = [[NSMutableA...
分类:
移动开发 时间:
2015-07-23 15:37:35
阅读次数:
125
23//修改webView背景色webView.backgroundColor = [UIColor clearColor];[webView setOpaque:NO];
分类:
Web程序 时间:
2015-07-23 10:38:55
阅读次数:
138
#import @interface UIColor (RandomColor)+(UIColor *) randomColor;@end#import "UIColor+RandomColor.h"@implementation UIColor (RandomColor)+(UIColor *) ...
分类:
移动开发 时间:
2015-07-22 17:51:51
阅读次数:
108
很简单的一句代码
self.view.backgroundColor =
UIColor.clearColor()
由此联想开来,很多的控件想设置为背景透明都可以用UIColor.clearColor()...
分类:
编程语言 时间:
2015-07-22 16:23:55
阅读次数:
212
UIColor *cyanColor = [UIColor redColor];
const CGFloat *RGB = [self RGBFromColor:cyanColor];
NSLog(@"red: %f,green: %f,blue: %f",RGB[0],RGB[1],RGB[2]);
//上行代码将会输出:red: 1.000000,green: 0.000000,blue:...
分类:
其他好文 时间:
2015-07-22 00:11:14
阅读次数:
241