- 博客(20)
- 收藏
- 关注
原创 iOS_分栏控制器
1. ###iOS_分栏控制器点击背景 CGSize indicatorImageSize = CGSizeMake(self.tabBar.bounds.size.width / KTabItemCounts, self.tabBar.bounds.size.height); CGSize indicatorImageSizeBack = CGSizeMake(s
2017-05-10 09:39:00
622
原创 IOS开发技巧
1. 打印日志#ifdef DEBUG#define printLog(...) NSLog(__VA_ARGS__)#else#define printLog(...)
2016-06-13 11:05:22
346
转载 获取系统键盘所在的View
实际开发过程中,会有自定义键盘的需求,比如,需要添加一个表情键盘。本文提供一种解决方法,思路就是通过获取系统键盘所在的view,然后自定义一个view覆盖在系统键盘view上,接下来的事情就非常简单了,就是在自定义的view里做任何自己想做的事情。这个方法的关键在于获取系统键盘所在的view。要完成这个,需要监听UIKeyboardDidShowNotification这个系统通知(注意:
2016-05-31 10:44:22
1750
1
原创 Cell的操作
1.滑动删除Cell//先要设Cell可编辑- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{return YES;} //定义编辑样式- (UITableViewCellEditingStyle)ta
2016-05-10 16:14:13
524
原创 关于info.plist
#判断是否首次安装应用- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bound
2016-05-09 17:56:42
575
原创 视图的移动,旋转,缩放
1.平移 //self.label.transform = CGAffineTransformMakeTranslation(0, 10);//一直以初始位置开始 self.label.transform =CGAffineTransformTranslate(self.label.transform,0, 10);//每次将当前位置作为初始 //self.la
2016-04-22 17:06:17
516
原创 cocoaPods安装和使用
1.检查ruby默认源的镜像(没有改过是cocoapods.org)gem sources -l 2.移除原有的,镜像换成淘宝的sudo gem sources -r https://rubygems.org/sudo gem sources -a https://ruby.taobao.org/报错:Error fetching https://ge...
2016-04-17 10:04:23
370
原创 SVN & Git
SVN(命令行)A. 服务器端1. 在桌面上新建一个文件夹,做为该项目的工作中使用,以及下载代码。 如:MyProject2. 在该文件夹中创建一个SVN的工作目录。 如:MyCode 使用命令: cd /username/yonghuming/Desktop/MyProjectsvnadmin create MyCode3、 进入这个文件中修改一些内容
2016-04-04 17:42:42
364
原创 iOS多线程技术
1. NSObject多线程[selfperformSelectorInBackground:@selector(intoBackground)withObject:nil];[selfperformSelectorOnMainThread:@selector(intoForword)withObject:nilwaitUntilDone:YES];
2016-03-02 11:04:42
308
原创 键盘收回和拉起以及键盘的类型
UISearchBar:-(void)createNotiFication{ [[NSNotificationCenter defaultCenter]addObserver:selfselector:@selector(keyboardwillshow:) name:UIKeyboardWillShowNotificationobject:nil];
2016-03-02 10:45:32
407
原创 UINavigationBar 的设置
由于UINavigationBar的特殊性;(有两层,不能直接设置透明度和颜色)//改变NavigationBar的颜色1. self.navigationController.navigationBar.tintColor = [UIColor redColor];2.给NavigationBar增加类别(Category),如下,之后可以使用如下
2016-03-02 10:44:24
411
原创 iOS拨打电话
1,这种方法,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"186xxxx6979"]; // NSLog(@"str======%@",str);[[UIApplication
2016-03-02 10:43:13
314
转载 UISearchBar 和 UISearchController
UISearchBarUISearchBar属性相关_searchBar = [[UISearchBar alloc] initWithFrame:CGRectZero];//初始化,不解释 [self.searchBar setPlaceholder:@"Search"];// 搜索框的占位符 [self.searc
2016-03-02 10:41:22
350
原创 UMeng分享
1. 进入http://www.umeng.com2. 点击我的产品(右上角)3. 添加新应用(左下角) 。。。。。4. 按照流程进行注释: 如果需要添加其他,需要先注册需要添加的平台的AppId 和AppKey然后:
2016-03-02 10:39:39
566
转载 iOS第三方整理
一:第三方插件1:基于响应式编程思想的oc地址:https://github.com/ReactiveCocoa/ReactiveCocoa2:hud提示框地址:https://github.com/jdg/MBProgressHUD3:XML/HTML解析地址:https://github.com/topfunky/hpple4:有文字
2016-03-02 10:37:45
432
原创 SDWebImage 加载网路图片
1.添加SDWebImage 第三方库,导入#import "UIImageView+WebCache.h" (设置imageView图片) #import "UIButton+WebCache.h" (设置button图片)2. 使用方法 [cell.imageView sd_setImageWithURL:[NSURL URLWithS
2016-03-02 10:32:40
482
原创 Class 反射机制
普通: Class class = [Dog class];类名为字符串 Class cls = NSClassFromString(NSString *aClassName) (括号内为字符串)
2016-03-02 10:19:03
352
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人