- 博客(19)
- 问答 (2)
- 收藏
- 关注
原创 iOS中xib设置label等的圆角
选中xib中所要设置圆角的View 按下图来 输入 layer.cornerRadius 其中设置layer.shouldRasterize = YES 可设置可不设置 不影响 详情参考:小心别让圆角成了你列表的帧数杀手 看起来高大上的样子,设置一下也不为过。也就是自定义运行时属性图:
2015-08-28 17:17:43 3671
原创 iOS系统SDK实现毛玻璃效果(swift版 iOS8.0及其以上)
let tempEffectView = UIVisualEffectView(effect: UIBlurEffect(style: UIBlurEffectStyle.Light)) tempEffectView.frame = self.view.bounds; tempEffectView.alpha = 0.8
2015-08-28 16:56:13 1581
原创 iOS开发 自定义一个全屏的蒙板(导航栏也能遮挡住)
__weak typeof(self)weakSelf = self; [UIView animateWithDuration:0.5 animations:^{ weakSelf.alpha = 0; } completion:^(BOOL finished) { [weakSelf removeFromSuperview]; }];
2015-08-20 15:14:11 14354
原创 iOS开发 iOS8 分割线右移15像素 将其归零
#pragma mark - **iOS8 分割***************// iOS8 分割线右移15像素 下面将其归零// 目的是去除没有内容的cell的分割线(适用于没有tableFooterView的tableView)或者选择table的style为group,就不用写下面的代码tableView.tableFooterView = [[UIView alloc] init];
2015-08-17 15:39:04 947
原创 iOS开发 UITableViewCell滚动到特定的行数
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:lastSelectRow inSection:0]; [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];
2015-08-14 15:45:53 2602
原创 iOS开发 关于CocoaPods安装和使用(图文并茂版)
原文地址:http://coder-lee.lofter.com/post/3b0173_134150aCocoaPods是什么?在iOS开发中势必会用到一些第三方依赖库,比如大家都熟悉的ASIHttpRequest、AFNetworking、JSONKit等。使用这些第三方类库能极大的方便项目的开发,但是,集成这些依赖库需要我们手动去配置,例如集成ASIHttpRequest库时除了加入...
2015-08-13 16:04:33 1386
原创 iOS开发 汉字转拼音
CFStringRef aCFString = (__bridge CFStringRef)str; CFMutableStringRef string = CFStringCreateMutableCopy(NULL, 0, aCFString);
2015-08-13 15:41:28 541
原创 iOS开发 单例类,拨打电话以及禁用导航条的侧滑功能和隐藏导航底部的线 跳转系统设置页面
static UserInfoCenter *userInfo = nil; static dispatch_once_t onceDBToken; dispatch_once(&onceDBToken, ^{ userInfo = [[UserInfoCenter alloc]init]; });
2015-08-07 18:08:40 812
原创 iOS开发 ARC和MRC混编相关
选Build Phases,在其中Complie Sources中选择需要操作文件双击,在非ARC环境中使用ARC文件在输入框中输入:-fobjc-arc,如果ARC环境下使用时非ARC文件则输入:-fno-objc-arc
2015-08-05 15:07:42 411
原创 iOS 判断身份证号码
NSString *pattern = @"(^[0-9]{15}$)|([0-9]{17}([0-9]|X)$)"; NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", pattern];
2015-08-05 11:59:45 974
原创 iOS开发 代码创建UITabBarController
//创建tabbarcontroller来管理这些页面 UITabBarController *tabBarController = [[UITabBarController alloc] init]; tabBarController.viewControllers = @[chatNavigation, contactsNavigation, dynamicNavigation];
2015-08-04 11:33:40 901
原创 iOS开发 获取应用名称和版本号
NSBundle *bundle = [NSBundle bundleForClass:[self class]]; NSString *appName = [bundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
2015-08-04 11:11:06 2503
原创 iOS开发 将图片打包编码以便上传
// 新增,图片压缩,因为原图都是很大的,不必要传原图 UIImage *scaleImage = [self scaleImage:image toScale:scale1]; // 图片压缩成Data NSData *imgData ;
2015-08-04 11:05:58 458
原创 iOS开发 字符串转换成字典
NSMutableDictionary *dictionaryFromJson = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves
2015-08-04 11:00:36 1102
原创 iOS开发 NSString根据字符串一定高度/宽度返回字符串所占的宽度/高度
根据字符串一定高度/宽度返回字符串所占的宽度/高度,根据内容计算label的宽/高时常用到此方法
2015-08-03 17:04:19 3118
原创 iOS开发 字符串过滤html标签
NSScanner *theScanner = [NSScanner scannerWithString:html]; NSString *text = nil;
2015-08-03 16:57:18 816
原创 iOS开发 线程计时器
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,queue); dispatch_source_set_timer(_timer,dispatch_walltime(NULL, 0),1.0*NSEC_
2015-08-03 10:16:07 467
空空如也
求swift大神 给个代码自定义tabelView的cell的比较完整的写法
2015-07-20
ios开发中 如何实现搜索关键字高亮显示?
2014-12-10
TA创建的收藏夹 TA关注的收藏夹
TA关注的人