ios
张天航
这个作者很懒,什么都没留下…
展开
-
[IOS] Object - Oriented
//———————object-oriented—————————– //类的属性应该初始化,String可以用String? class Person { //swift property is public var age:Int = 0; var name:String? ; // ? 表示 name为空或nil或没有设置,name是可选的 //构造方法原创 2015-08-08 13:28:56 · 327 阅读 · 0 评论 -
[ios] How to fix thread 1 signal sigabrt
How to fix thread 1 signal sigabrt check if every connection is useful , if not , delete it ! this bug often appears when you import other people’s project !原创 2015-08-05 21:48:17 · 333 阅读 · 0 评论 -
[ios] Xcode shortcuts
Xcode shortcutscommand + R 运行程序 shift + command + H 在模拟器中回到”桌面”, 相当于在 iPhone上按一下 home 键 shift + command + (按两下 H), 相当于在 iPhone上按两下 home 键原创 2015-08-03 22:40:27 · 410 阅读 · 0 评论 -
[objective-c] 面向对象1
一、 定义OC的类和创建OC的对象 ➢ 接下来就在OC中模拟现实生活中的情况,创建一辆车出来。首先要有一个车子类,然后再利用车子类创建车子对象 ➢ 要描述OC中的类稍微麻烦一点,分2大步骤:类的声明、类的实现(定义)。跟函数类似,函数有分声明和定义 1. 类的声明 1) 代码编写 ➢ 定义一个Car类,拥有2个属性:轮子数、时速,1个行为:跑 ➢ 类名\属性的命名原创 2015-08-02 21:12:20 · 346 阅读 · 0 评论 -
[Objective-c] OC介绍
一、 OC简介 ➢ C语言的基础上,增加了一层最小的面向对象语法 ➢ 完全兼容C语言 ➢ 可以在OC代码中混入C语言代码,甚至是C++代码 ➢ 可以使用OC开发Mac OS X平台和iOS平台的应用程序 二、 OC语法预览关键字 ➢ 基本上所有关键字都是以@开头 ➢ 下面列举一些常见的关键字,看一眼就行了,不用去翻资料查找它们的含义 @inte原创 2015-08-02 20:09:35 · 359 阅读 · 0 评论 -
[IOS] The difference between functions and methods
The difference between functions and methods原创 2015-08-01 19:01:16 · 369 阅读 · 0 评论 -
[IOS] Class Memory Analysis
memory analysis Each object has a isa pointer which point to it’s class , so each object can get the same method from the class .原创 2015-07-31 21:40:22 · 297 阅读 · 0 评论 -
[ios] UI TableView
UITableView原创 2015-08-10 10:25:57 · 322 阅读 · 0 评论 -
[ios] UI Delegate
What is the use of delegate ? where ? when?监听那些不能通过addTarget监听的事件! 主要用来负责在两个对象之间,发生了某些事件时,来传递消息和数据 代理设计模式,是在oc中使用最为广泛的一种设计模式 例如UITextField -> UIControl , 不能添加addTarget ,可以使用代理,让viewController监听textFiel原创 2015-08-09 17:04:33 · 424 阅读 · 0 评论 -
[IOS] Swift enum and Struct
// ——————enum—————————— // type 1 enum Direction{ case East case South case West case North } enum Direction2{ case East, South,West, North }var d = Direction.East var d2: Direction原创 2015-08-08 10:00:16 · 400 阅读 · 0 评论 -
[ios] Swift Closure(闭包)
———————Closure闭包————————– Closure 类似于之前oc的Blocks , 还有c语言的函数指针 var arr = [20,9,39,39,46] //(num:Int,value:Int)->Bool is the Closure type, cb的类型 func hasClosureMatch(arr:[Int], value:Int, cb:(num:In原创 2015-08-07 16:00:32 · 387 阅读 · 0 评论 -
[ios] Recommended book list
IT社区: http://www.cnblogs.com/ http://www.csdn.net/ http://www.51cto.com/ http://www.cocoachina.com/ http://www.techcn.com.cn/ http://mobilehub.io/ 推荐 iOS 学习网站: http://www.w3school.com.cn/原创 2015-08-06 18:25:22 · 427 阅读 · 0 评论