自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Leo的IOS开发博客

厚积薄发

  • 博客(15)
  • 收藏
  • 关注

转载 Json解析

http://blog.csdn.net/enuola/article/details/7903632/

2014-07-09 23:54:56 323

转载 UITabelView section headerView浮动问题

解决方案一: headerView 直接添加到 self.tableView.headerView 中 解决方案二:(多 section 情况下建议使用) 更改 TabelViewStyle 为 Grouped UITableViewStyleGrouped 多个 section之间  间距调整 显示效果的各个section间距其实是section头部和底

2014-07-09 23:37:36 1033

转载 坐标转换

- (CGRect)convertRect:(CGRect)rect toView:(UIView *)view; 意思就是说把一个矩形从接收者的坐标系转换到另一个视图(view)的坐标系中. 注:若view参数为空,则转换为窗口(window)的坐标系;接收者与view都必须是同一窗口(window)的对象。 例: CGRect convertRect =  [tableView con

2014-07-09 23:37:07 528

转载 IOS 7 适配问题

//解决 Navi…… 遮盖 tableView 问题 [self.navigationController.navigationBar setTranslucent:NO];

2014-07-09 23:36:28 460

转载 NSLog输出NSRange,CGRect等结构体

//NSLog输出NSRange,CGRect等结构体 使用对应的转换 NSStringFromCGPoint   NSStringFromCGSize   NSStringFromCGRect   NSStringFromCGAffineTransform   NSStringFromUIEdgeInsets 比如 NSLog(@"rect1: %@", NSStringFrom

2014-07-09 23:35:27 383

转载 view转image

- (UIImage*) imageWithUIView:(UIView*) view{ // 创建一个bitmap的context // 并把它设置成为当前正在使用的context UIGraphicsBeginImageContext(view.bounds.size); CGContextRef currnetContext = UIGraphicsGe

2014-07-09 23:34:24 401

原创 UILabel使用

UILable 字体加粗 加粗; [UILabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:20]]; 加粗并且倾斜 [UILabel setFont:[UIFont fontWithName:@"Helvetica-BoldOblique" size:20]]; UILabel自适应高度 换行 //初始化labe

2014-07-09 23:25:14 431

原创 关于ARC

关于ARC 默认所以实例变量和本地变量都为 strong 类型的指针。 weak 指针主要用于“父-子”关系,父亲拥有一个儿子的 strong 指针,因此是儿子的所有者;但为了阻止所有权回环,儿子需要使用 weak 指针向父亲。例如 delegate 模式。 属性写法: @property (nonatomic, strong) NSString *firstNam

2014-07-09 23:17:08 496

原创 cell上 button点击弹出信息提示框

-(IBAction)onWarnInfo:(id)sender{ UIButton *btn=(UIButton *)sender; NSIndexPath *_indexPath=[NSIndexPath indexPathForRow:btn.tag inSection:0]; UITableViewCell *_cell=[_tableVi

2014-07-09 23:15:13 1555

转载 UILable 根据text字符长度改变frame.size.width

.m -(void)setSinger:(ktvEntitySinger*)_singer { singer=_singer; CGSize singerNameSize=[[singer objectForKey:ktvEntityNSingerName] sizeWithFont:[UIFont fontWithName:@"Helvetica" size:16.0] cons

2014-07-09 23:14:50 439

原创 字典类

.h #define ktvEntityNSingerId @"id" #define ktvEntityNSingerName @"singerName" #define ktvEntityNSingerSongs @"SongCount" typedef NSDictionary ktvEntitySinger;

2014-07-09 23:13:48 342

转载 圆图片+边框

- (UIImage *) ellipseImage: (UIImage *) image withInset: (CGFloat) inset; - (UIImage *) ellipseImage: (UIImage *) image withInset: (CGFloat) inset withBorderWidth:(CGFloat)width withBorderColor:(UICol

2014-07-09 23:12:01 425

转载 判断UITextField.text 是否为空

判断NSString字符串为空几乎是每一个开发人员肯定会碰到的问题,对于绝大多数人最先闪过大脑的是下面的方法 if([yourTextString isEqualToString:@""]) 但是很遗憾,这样的判断往往经常会出现失败的情况,造成很多莫名其妙的bug,例如如果用这种方法判断UITextField是否为空便会出现问题 [yourTextField.text isEqualToSt

2014-07-09 22:59:19 602

转载 关于MD5加密

#import +(NSString*)32_md5:(NSString *)string { if(string == nil || [string length] == 0) return nil; const char *value = [string UTF8String]; unsigned char outputBuffe

2014-07-09 22:48:01 455

转载 IOS开发9个常用方法

1、存储写入文件 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDir

2014-07-09 22:39:44 527

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除