![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS
Bnsyzwmz
这个作者很懒,什么都没留下…
展开
-
Class 反射机制
普通: Class class = [Dog class];类名为字符串 Class cls = NSClassFromString(NSString *aClassName) (括号内为字符串)原创 2016-03-02 10:19:03 · 314 阅读 · 0 评论 -
iOS字符串的方法
们转载 2016-04-23 10:07:27 · 292 阅读 · 0 评论 -
视图的移动,旋转,缩放
1.平移 //self.label.transform = CGAffineTransformMakeTranslation(0, 10);//一直以初始位置开始 self.label.transform =CGAffineTransformTranslate(self.label.transform,0, 10);//每次将当前位置作为初始 //self.la原创 2016-04-22 17:06:17 · 462 阅读 · 0 评论 -
关于info.plist
#判断是否首次安装应用- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bound原创 2016-05-09 17:56:42 · 532 阅读 · 0 评论 -
定位和导航
1.系统自带的定位2.SDK的定位和导航原创 2016-04-26 10:48:31 · 581 阅读 · 0 评论 -
IOS开发技巧
1. 打印日志#ifdef DEBUG#define printLog(...) NSLog(__VA_ARGS__)#else#define printLog(...)原创 2016-06-13 11:05:22 · 302 阅读 · 0 评论 -
NSDate的使用和转化
关于NSDate的使用原创 2016-08-04 18:33:38 · 431 阅读 · 0 评论 -
UINavigationBar 的设置
由于UINavigationBar的特殊性;(有两层,不能直接设置透明度和颜色)//改变NavigationBar的颜色1. self.navigationController.navigationBar.tintColor = [UIColor redColor];2.给NavigationBar增加类别(Category),如下,之后可以使用如下原创 2016-03-02 10:44:24 · 374 阅读 · 0 评论 -
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 · 335 阅读 · 0 评论 -
获取系统键盘所在的View
实际开发过程中,会有自定义键盘的需求,比如,需要添加一个表情键盘。本文提供一种解决方法,思路就是通过获取系统键盘所在的view,然后自定义一个view覆盖在系统键盘view上,接下来的事情就非常简单了,就是在自定义的view里做任何自己想做的事情。这个方法的关键在于获取系统键盘所在的view。要完成这个,需要监听UIKeyboardDidShowNotification这个系统通知(注意:转载 2016-05-31 10:44:22 · 1694 阅读 · 1 评论 -
键盘收回和拉起以及键盘的类型
UISearchBar:-(void)createNotiFication{ [[NSNotificationCenter defaultCenter]addObserver:selfselector:@selector(keyboardwillshow:) name:UIKeyboardWillShowNotificationobject:nil];原创 2016-03-02 10:45:32 · 366 阅读 · 0 评论 -
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 · 436 阅读 · 0 评论 -
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 · 389 阅读 · 0 评论 -
UMeng分享
1. 进入http://www.umeng.com2. 点击我的产品(右上角)3. 添加新应用(左下角) 。。。。。4. 按照流程进行注释: 如果需要添加其他,需要先注册需要添加的平台的AppId 和AppKey然后:原创 2016-03-02 10:39:39 · 525 阅读 · 0 评论 -
iOS拨打电话
1,这种方法,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"186xxxx6979"]; // NSLog(@"str======%@",str);[[UIApplication原创 2016-03-02 10:43:13 · 286 阅读 · 0 评论 -
iOS多线程技术
1. NSObject多线程[selfperformSelectorInBackground:@selector(intoBackground)withObject:nil];[selfperformSelectorOnMainThread:@selector(intoForword)withObject:nilwaitUntilDone:YES];原创 2016-03-02 11:04:42 · 263 阅读 · 0 评论 -
UISearchBar 和 UISearchController
UISearchBarUISearchBar属性相关_searchBar = [[UISearchBar alloc] initWithFrame:CGRectZero];//初始化,不解释 [self.searchBar setPlaceholder:@"Search"];// 搜索框的占位符 [self.searc转载 2016-03-02 10:41:22 · 310 阅读 · 0 评论 -
SVN & Git
SVN(命令行)A. 服务器端1. 在桌面上新建一个文件夹,做为该项目的工作中使用,以及下载代码。 如:MyProject2. 在该文件夹中创建一个SVN的工作目录。 如:MyCode 使用命令: cd /username/yonghuming/Desktop/MyProjectsvnadmin create MyCode3、 进入这个文件中修改一些内容原创 2016-04-04 17:42:42 · 321 阅读 · 0 评论 -
Cell的操作
1.滑动删除Cell//先要设Cell可编辑- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{return YES;} //定义编辑样式- (UITableViewCellEditingStyle)ta原创 2016-05-10 16:14:13 · 481 阅读 · 0 评论 -
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 · 583 阅读 · 0 评论