自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 Split NSString with "." or "," 分割一个带有"."或者","的 string

NSString *fileName = @"save.plist"; NSArray *fileNameArray = [fileName componentsSeparatedByString:@"."]; NSString *save = fileNameArray[0]; NSString *plist = fileNameArray[1];

2016-08-31 16:09:43 355

原创 Git_版本

Git 命令语句git log 用来告诉历史记录git log --pretty=oneline 历史记录中只显示 id 号与提交内容commit id (版本号)是用十六进制表示的数字 HEAD 表示当钱版本 HEAD^表示上一个版本 HEAD^^表示上上一个版本 Git 命令语句 git reset –hard HEAD^ 也可以直接将 HEAD^ 转换成为 Commi

2016-08-30 23:23:10 329

原创 Git_创建

Git 命令## 基本使用 ## 1. pwd 用于显示当前目录 2. git init 把这个目录变成 Git 可以管理的仓库 **init 之后会多出一个 .git 的目录,但目录是被隐藏的,需要用3.的命令来看。** 3. ls -ah 用来显示目录内容## 把文件添加到仓库 ## ## 把文件提交到仓库 ## 1. git add readme.txt 2.

2016-08-30 23:06:59 327

原创 Git_简介

来源于:廖雪峰老师的博客SVN_集中式 版本库是集中在中央服务器的,工作时使用的是自己的电脑,但是,在结束时是将自己工作的内容推送至服务器的。 集中式必须联网才能工作。 Git_分布式 不需要联网 没有中央服务器 安全性能高 最重要的是有强大的分支管理功能

2016-08-30 22:47:39 253

原创 判断图片是否为空

if (UIImagePNGRepresentation(UIImage *image) != nil) { NSLog(@"image != nil"); } UIImagePNGRepresentation (image 的实例化对象) UIImagePNGRepresentation 对图片进行压缩两种实现方法 UIImageJPEGRepresentation

2016-08-30 17:12:39 3448

原创 Storyboard 本地化修改

点中 Main.storyboard 文件 找到当前位置将[Localizable Strings]文件类型改为[Interface Builder Cocoa Touch Storyboard] Command + B 之后在将[Interface Builder Cocoa Touch Storyboard]修改回[Localizable Strings] 相当于重新生成了一遍

2016-08-30 16:55:49 973

转载 UITextField 设置键盘样式

textField.keyboardType = UIKeyboardTypeNumberPad; typedef enum { UIKeyboardTypeDefault, 默认键盘,支持所有字符 UIKeyboardTypeASCIICapable, 支持ASCII的默认键盘 UIKeyboardTypeNumbersAndPunctuation, 标准电话键盘,支持+*#

2016-08-25 22:07:32 2160

原创 使用 Storyboard 用到的问题

问题: Application tried to push a nil view controller on target UINavigationController: 0x7b98940. 原因: 因为在使用 Storyboard 的时候,self.storyboard is nil.means you didn’t initialise you master viewcontrolle

2016-08-25 22:04:00 334

原创 使用 Storyboard 用到的问题

问题: Application tried to push a nil view controller on target UINavigationController: 0x7b98940. 原因: 因为在使用 Storyboard 的时候,self.storyboard is nil.means you didn’t initialise you master viewcontrolle

2016-08-25 22:03:08 250

原创 得到 NSDictionary count (个数)

key

2016-08-25 21:54:55 1382

原创 UITableView default separator color

CGContextSetRGBStrokeColor ( CGContextRef c, 224.0/255.0, 224.0/255.0, 224.0/255.0, CGFloat alpha );

2016-08-25 11:29:41 410

原创 #pragma 的使用

#pragma 最重要的两个使用 1.整理代码 2.防止编译器警告 1.整理代码使用 #pragma mark - 来将代码分割成逻辑区块。2.防止编译器警告###并不是很常见 用来防止编译器或者静态分析器的警告。 通过使用#pragma clang diagnostic push/pop,你可以告诉编译器仅仅为某一特定部分的代码(最初的诊断设置在最后的pop被恢复)来忽视特定警告

2016-08-23 00:45:59 398

原创 控制台警告“"This application is modifying the autolayout engine from a background thread, which can lead”

需要打开另外一个线程中,进行 UI 更新。 Swiftdispatch_async(dispatch_get_main_queue(), { // code here })Objective-cdispatch_async(dispatch_get_main_queue(), ^{ // code here });

2016-08-23 00:36:01 330

原创 Push的使用

1.最简单的使用DayTimeViewController *dayTimeVC = [[DayTimeViewController alloc] init]; [self.navigationController pushViewController:dayTimeVC animated:YES];2.Pop到根页面[self.navigationController popToRootV

2016-08-23 00:32:06 3102

原创 移除视图

Call -removeFromSuperview on viewB.view.[view.view removeFromSuperview]

2016-08-17 10:42:06 300

原创 数组中得到最大值与最小值

NSInteger colMaxNumber = [[self.colNumberArray valueForKeyPath:@"@max.intValue"] intValue]; NSInteger rowMaxNumber = [[self.rowNumberArray valueForKeyPath:@"@max.intValue"] intValue];

2016-08-15 18:17:36 344

空空如也

空空如也

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

TA关注的人

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