随笔分类 -  oc学习笔记

上一页 1 ··· 4 5 6 7 8 9 10 下一页

非常值得学习的第三方资源篇(转)
摘要:项目源代码 : 1.快速搭建项目源代码 地址: https://github.com/wujunyang/MobileProject 2:高仿美团iOS版 地址:https://github.com/lookingstars/meituan 3:模仿网易新闻做的精仿网易新闻 地址:https://g 阅读全文

posted @ 2017-03-31 15:37 高彰 阅读(244) 评论(0) 推荐(0)

iOS 获取当前系统时间戳
摘要:// 获取当前系统时间戳 NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0]; NSTimeInterval a=[dat timeIntervalSince1970]; NSString *timeString = [NSString stringWithFormat:@"%0.0f", a];//转为字符型... 阅读全文

posted @ 2017-03-30 20:21 高彰 阅读(316) 评论(0) 推荐(0)

The file “XXX” couldn’t be opened because you don’t have permission to view it.解决方法
摘要:援引:http://www.cnblogs.com/zhao-jie-li/p/5314584.html The file “XXX” couldn’t be opened because you don’t have permission to view it.解决方法: 果断删除,不要想太多。 阅读全文

posted @ 2017-03-09 17:23 高彰 阅读(482) 评论(0) 推荐(0)

iOS 蓝牙获取MAC地址
摘要:援引:http://www.jianshu.com/p/1d6a8fc8134f iOS要获取蓝牙设备的MAC地址有两种:一是硬件工程师开通的服务特征下有MAC的信息,我们就从通道中获取;二是硬件工程师在扫描中设备信息中放置MAC信息,我们从有RSSI的函数中获取 1.形如你所在其他网站上看到的在某 阅读全文

posted @ 2017-03-07 11:35 高彰 阅读(3432) 评论(0) 推荐(0)

[Graphics] UIColor created with component values far outside the expected range, Set a breakpoint on UIColorBreakForOutOfRangeColorComponents to debug. This message will only be logged once.
摘要:用了别人的代码,一直总有一个报错,一开始没注意,最近项目快完期了,得处理下警告之类的东西, 后面发现之前那个大神代码是这样写的 援引:http://www.cnblogs.com/songxing10000/p/6297542.html 阅读全文

posted @ 2017-02-27 11:41 高彰 阅读(805) 评论(0) 推荐(0)

iOS macOS背景色 圆切角 边框色
摘要:UIColor *color1=[UIColor colorWithRed:155/255 green:255/255 blue:255/255 alpha:1];//方法1,使用 静态方法创建color _view1.backgroundColor=color1; UIColor *color2= 阅读全文

posted @ 2017-02-21 16:03 高彰 阅读(356) 评论(0) 推荐(0)

has no restore identifier but the delegate implements the centralManager:willRestoreState: method. Restoring will not be supported
摘要:http://stackoverflow.com/questions/20956880/corebluetoothwarning-has-no-restore-identifier-but-the-delegate-implements 就是说:要么删掉。 要么保留。 阅读全文

posted @ 2017-01-17 16:48 高彰 阅读(1193) 评论(0) 推荐(0)

五.oc文件操作
摘要:1. NSFileManager的使用 文件和文件夹的创建、删除、改变、遍历,读取等操作 2. NSFileHandle的使用 3. 如何获取沙盒路径 4. NSURL的使用 5. NSBundle的使用 1. NSFileManager的使用:文件和文件夹的创建、删除、改变、遍历,读取等操作 题目 阅读全文

posted @ 2017-01-17 11:21 高彰 阅读(296) 评论(0) 推荐(1)

iOS数据类型转换
摘要:iOS中,将NSData转NSString的一般方法为[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];但是当data中包含00时,所获得的新字符就会为nil,这时我们应该这样转 [NSString stringWi 阅读全文

posted @ 2017-01-11 15:12 高彰 阅读(574) 评论(0) 推荐(0)

十六进制高低位分离转换拆分
摘要:http://www.cocoachina.com/bbs/read.php?tid=1706049同行解答。 十六进制高低位分离转换拆分 以2016为例:2016(十进制)->0x7E0(十六进制),按照硬件方面要求拆分成0x07,0xE0。 阅读全文

posted @ 2016-12-20 19:13 高彰 阅读(9395) 评论(0) 推荐(0)

六.(二)oc分类-category(范畴、非正式协议)
摘要:11 阅读全文

posted @ 2016-12-06 09:27 高彰 阅读(168) 评论(0) 推荐(0)

十二 .ocBlock
摘要:NSProxy是一个不继承NSObject的根类(尽管它遵守NSObject协议),调用[[NSProxy alloc]init]将会产生一个运行异常。 所幸,oc引入被称为“块代码”的第一级函数的概念。就用途来讲块代码可以替代NSProxy子类的需求。 块代码是用于匿名函数的oc结构(即内联)。实 阅读全文

posted @ 2016-12-06 09:26 高彰 阅读(150) 评论(0) 推荐(0)

十.oc内存管理
摘要:引用百度百科图 栈(stack)又名堆栈。 栈定义:栈是限定仅在表头进行插入和删除操作的线性表(有序)。(又称:后进先出表) (动态)数据展示存储的地方。(举例:升降电梯)特点:先进后出(FILO—First-In/Last-Out) 位置:处于内存条的最高地址。栈顶即最低地址,允许进行插入和删除操 阅读全文

posted @ 2016-12-06 09:24 高彰 阅读(232) 评论(0) 推荐(0)

七.(一)oc通知-NSNotification(通知中心-NSNotificationCenter)
摘要:6年了,我来补上 先来最简单的吧。复制粘贴即可用 !⚠️通知传值先有接收通知,再有发起通知。为什么呢?以前开发遇到的人教我的南增教的 1.接收通知部分 #import "VC1.h" @interface VC1 () @end @implementation VC1 - (void)viewDid 阅读全文

posted @ 2016-12-06 09:21 高彰 阅读(305) 评论(0) 推荐(0)

Storyboard中segue(转场)使用
摘要:源引:http://www.2cto.com/kf/201210/161737.html 一、视图切换类型介绍在storyboard中,segue有几种不同的类型,在iphone和ipad的开发中,segue的类型是不同的。在iphone中,segue有:push,modal,和custom三种不同 阅读全文

posted @ 2016-12-05 09:44 高彰 阅读(217) 评论(0) 推荐(0)

Tableview 优化Cell的复用机制01
摘要:#import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; UITableView *tab=[[UITableView alloc]init]; tab.... 阅读全文

posted @ 2016-11-12 17:16 高彰 阅读(356) 评论(0) 推荐(0)

Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/s2/6zhtd60150q2j7jb_btmq3kw0000gn/T/IB-agent-diagnostics_2016-11-12_15-02-16_199000".内部错误。请bugreport.apple.com一个bug,并
该文被密码保护。

posted @ 2016-11-12 15:56 高彰 阅读(3) 评论(0) 推荐(0)

(null): Linker command failed with exit code 1 (use -v to see invocation)
摘要:他山之石,可以攻玉。 感谢热心网友。 此处有更佳的分析:http://www.cnblogs.com/xiaoyouPrince/p/5260378.html 阅读全文

posted @ 2016-10-26 09:20 高彰 阅读(151) 评论(0) 推荐(0)

@import
摘要:源引:https://stackoverflow.com/questions/18947516/import-vs-import-ios-7/18947634# @import vs #import - iOS 7 阅读全文

posted @ 2016-10-25 11:00 高彰 阅读(210) 评论(0) 推荐(0)

iOS开发-xcdatamodeld文件 CoreData的介绍和使用,sqlite的使用
摘要:CoreData的介绍和使用 源引:http://www.jianshu.com/p/d027090af00e CoreData是数据存储的一种方式,CoreData实质也是对SQLite的封装。 CoreData是iOS SDK里的一个很强大的框架,允许程序员以面向对象的方式储存和管理数据。使用C 阅读全文

posted @ 2016-10-24 13:49 高彰 阅读(4612) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 下一页

导航