- 博客(13)
- 资源 (1)
- 收藏
- 关注
原创 摇一摇
- (void)viewDidLoad { [superviewDidLoad]; // 设置允许摇一摇功能 [UIApplicationsharedApplication].applicationSupportsShakeToEdit =YES; // 并让自己成为第一响应者 [selfb
2016-07-29 16:43:02 375
原创 NSBundle
IImageView *padlock = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ZYQAssetPicker.Bundle/Images/Ass
2016-07-22 17:25:42 194
原创 UIAlertController
UIAlertController *alert = [UIAlertControlleralertControllerWithTitle:@"提示"message:aMessage preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *agreeAction = [UIAlertActionactio
2016-07-22 15:38:55 184
原创 UITabBarController
//1.创建Window16 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];17 self.window.backgroundColor = [UIColor whiteColor];18 19 //a.初始化一个tabBar控制器20 U
2016-07-20 16:06:00 168
原创 UITextField
UITextField * tf=[[UITextField alloc]init]; //设置UITextField的文字颜色tf.textColor=[UIColor redColor]; //设置UITextField的文本框背景颜色tf.backgroundColor=[UIColor grayColor]; //设置UITe
2016-07-20 13:54:24 268
原创 背景颜色转为UIImage
UIColor *colorHightlighted = [UIColor colorWithRed:186.0/255 green:189.0/255blue:194.0/255 alpha:1.0];CGSize imageSize = CGSizeMake(frameW, 54); UIGraphicsBeginImageContextWithOptions
2016-07-18 10:37:45 349
原创 UIView初始化
UIView *view = [[UIViewalloc]init]; view.backgroundColor =QBB_GRAY_COLOR; view.layer.cornerRadius =10; view.clipsToBounds =YES; [selfaddSubview:vi
2016-07-15 16:42:35 269
原创 cell自定义横线
UIBezierPath *path = [UIBezierPathbezierPathWithRect:CGRectMake(0, rect.size.height, rect.size.width,1)]; [[UIColorcolorWithHexString:@"#3c4453"withAlpha:1]setStroke]; [path
2016-07-15 11:18:11 217
原创 手写rootViewController
self.window = [[UIWindowalloc]initWithFrame:[[UIScreenmainScreen]bounds]]; AreasTableViewController *vc = [[AreasTableViewControlleralloc]initWithNibName:@"AreasTableViewController"bund
2016-07-14 10:15:14 201
原创 UIImageView初始化
({ UIImageView *imgView = [[UIImageViewalloc]init]; imgView.image = [UIImageimageNamed:@"iphone_5.png"]; [selfaddSubview:imgView]; [imgVie
2016-07-11 10:43:04 363
原创 button初始化
_startLiveButton = [UIButtonbuttonWithType:UIButtonTypeCustom]; [_startLiveButtonsetTitleColor:[UIColorblackColor] forState:UIControlStateNormal]; [_startLiveButton.titleLa
2016-07-04 14:09:25 3265
原创 判断string是否为null
////判断是否为null+(NSString *)getUseFullStr:(id)str{ if ([strclass] != [NSNullclass] && str != nil) { return str; } return@"";}
2016-07-04 09:51:56 1266
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人