- 博客(6)
- 收藏
- 关注
原创 去掉UItableview headerview黏性(sticky)
//去掉UItableview headerview黏性(sticky)- (void)scrollViewDidScroll:(UIScrollView *)scrollView { CGFloat sectionHeaderHeight = 40; if (scrollView.contentOffset.y=0) { scrollView.conte
2016-02-18 15:30:23
244
原创 iOS 计算label 字符串的高度
- (CGSize)boundingRectWithSize:(CGSize)size{NSDictionary *attribute = @{NSFontAttributeName: self.font};CGSize retSize = [self.text boundingRectWithSize:sizeoptions:\NSStringDrawingTrunc
2016-02-18 15:29:27
208
原创 json字符串转字典,字典转json字符串
//json字符串转字典+ (NSMutableDictionary*)dictionaryWithJsonString:(NSString*)jsonString { if (jsonString == nil) { return nil; } NSData *jsonData = [jsonString data
2016-02-18 15:27:37
749
原创 ios 下创建,删除文件夹的方法 NSFileManager
创建文件夹:NSString *imageDir = [NSString stringWithFormat:@"%@/Caches/%@", NSHomeDirectory(), dirName];BOOL isDir = NO;NSFileManager *fileManager = [NSFileManager defaultManager];BOOL
2016-02-18 15:24:19
2954
原创 SDWebImage 淡入淡出效果
[cell.coverImageViewsd_setImageWithURL:[NSURLURLWithString:img_url]placeholderImage:[UIImageimageNamed:@"video_default_img.png"]completed:^(UIImage*image,NSError*error,SDImageCacheType
2016-02-18 15:18:54
881
原创 iOS字符串 去掉字符串中的空格 回车
去除两端空格NSString *temp = [textField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];去除两端空格和回车NSString *text = [temp stringByTrimmingCharactersIn
2016-02-18 15:17:13
465
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人