1 课务 iOS 概述
重要注意
紫色解释
蓝色分类
新内容
CS193P 本课老版本 2010 年冬 http://open.163.com/movie/2010/6/C/7/M6RU83DCT_M6RU957C7.html
iOS5 http://v.163.com/special/opencourse/ipadandiphoneapplication.html
CS06A(java)
编程方法学
CS106B
抽象编程(C++,内存)
CS106X
CS107
编程范式(C,C++,python)
CS108
CS110
开始学术语
看完这集再决定看不看前面的课程
决定直接看下去,不懂的再查 因为还好听的懂噻
2015版 https://itunes.apple.com/us/course/developing-ios-8-apps-swift/id961180099
http://itunes.stanford.edu/ 可以在iTunes上面看到所有的斯坦福课程
好之上面有iOS9 http://www.howzhi.com/course/11377/lesson/72730
术语
消息 message
实例变量 instance variable
父类 superclass
子类 subclass
what’s in iOS?
1 Core OS 核心操作系统层 close to the hardware
Unix Kernel,BSD-based mock(基于 BSD 的 Unix 版本), Unix 有的 它都有,sockets(嵌套字),file system ,permissions + power management ,key chain access to kind of manage the security of things(安全管理的钥匙串访问), Bonjour .
2 Core services an object-orented on the top of 1
Arrays dictionaries strings, objected - oriented ways to access the file system, objected - oriented ways to find out the GPS, multithreading .
3 Media
video/video editing image audio/3D audio
4 Cocoa Touch UI Layer
Buliding buttons , sliders , textfields, interact, animation happening, things sliding in and out, fading out and in, get pics from camera from the user, localization, map kit,
high - level objects
Tools Xcode 5 Instruments
一.Language
二.Frameworks Foundation UiKit ,Core data, Core motion ,Map Kit
三.Design strategies MVC(Model View Controller)
1.MVC: is essentially a strategy for how to organise all the classes in your app. Camps。
Model-> what (independent of UI)
Controller-> how the model is presented on screen (hTake the model data and put it in, and using it to view minions, put on screen)
View-> UI
Controller Model View
13.30~29.52 MVC
2.how they communicate?
View -> Controller
1.target action
2. Will+should+did delegate protocols
protocaol
is a blind way to talk to another object. Blind communication.
View should not own the data they're displaying
(eg, a player, song in the model, surface in the view, way in the controller)
3. data source count (It's a special delegate)
Model -> Controller
Notification&KVO (Radio broadcast)
An MVC can use another MVC as part of its View.
eg:
Calender (year,month,day)
Tab Bar Controlers
Objective - C
1. Strict superset of C
2. Properties
Card class
Card.h is the public API
Card.m is your private API and all your implementation
Card.h
@interface Card:NSObject
@property [strong,nonatomic] NSString *contens;
@property [nonatomic, getter=isChosen] BOOL chosen;
//太帅了,可以更改getter的方法名,自己爽就好
//BOOL 原始数据类型,没有在堆栈中,like int or floate 不需要管理内存,不涉及指针
@property [nonatomic, getter=isMatched] BOOL matched;
// strong mean reference counting (引用计数)
// OC will track every single strong pointer to an object in the heap, as long as at least one strong pointer exists, it going to keep that thing in the heap. 只要有就保留。没有强指针时候,立刻释放内存。
// weak means OC keep it in memory as long as someone else has a strong pointer to it. No strong pointer to it, it gets freed from the memory, and this pointer gets set to nil. 配合强指针,指向内存,没有强指针指向时,释放内存,弱指针为nil。weak不仅释放内存,还会使指针为空。
// nonatomic calling this setter and getter that go along with this property is not thread safe
// @property advantage: balance checking, set a property then updating UI, initialize pointers
// advantage to use setter & getter:
// all properties in OC start off 0
-(int)match:(NSArray *)otherCards; // 0 don't match
//
@end
Card.h
Setter and Getter are created automatically but you can't see, they are in Card.m all public.
@interface Card()
@end
@implementation Card
-(int)match:(NSArray *)otherCards{
int score=0; // all local variables start out 0
for(Card *card in otherCards){
if([Card.contents isEqualToString:self.comtents]){ // [ ]
score=1;
}
}
// . dot noattin is only for properties (actually call the setter and setter), other places u will get warning
// self 就是正在这段代码起作用的实例, this instance that this code is operating on.
// == compare two pointers, not contents they pointing
return score;
}
@end
总结
新内容
.m 文件中好像不太一样,但是都是XCode自动生成的,应该只是版本问题,问题不大
新语法 在 @property 里面修饰有strong和weak之分
并且 getter 方法名可以自己重命名哦
然后,我觉得课程笔记最好还是大象上方便,装逼的话发到博客上去吧
1 课务 iOS 概述的更多相关文章
- 课务IOS概述_1
1.网络 2.多线程 3.各种图形 4.动画 5.面向对象的数据库 Preconditions: 1.CS106 A和B 或CS106X 2.CS107或CS108更好 3.CS110就更好了 熟 ...
- Oracle Hyperion Planning 11.1 .1:创建与管理应用程序 第1课:Planning概述
第1课:Planning概述 1.说明 Oracle Enterprise Performance Management system Oracle Enterprise Performance Ma ...
- 蜗牛爱课- iOS中plist的创建,数据写入与读取
iOS中plist的创建,数据写入与读取功能创建一个test.plist文件-(void)triggerStorage{ NSArray *paths=NSSearchPathForDirect ...
- 蜗牛爱课- iOS中定时器NSTimer使用
调用一次计时器方法: //不重复,只调用一次.timer运行一次就会自动停止运行 self.locationTimer = [NSTimer target:self selector: @selec ...
- 后端码农谈前端(CSS篇)第一课:CSS概述
一.从扮演浏览器开始 扮演浏览器是Head First图书中很有意义的一个环节.可作者忘记了告诉我们扮演浏览器的台本.我们从这里开始. 上图是webkit内核渲染html和css的流程图.从该图我们可 ...
- 后端码农谈前端(HTML篇)第一课:HTML概述
一.什么是HTML? HTML不是编程语言,是用来描述网页文档(页面结构)的一种标记语言: HTML指超文本标记语言(Hyper Text Markup Language),之所以称为超文本标记语言, ...
- 第一课: iOS入门
xcode几个项目模板的说明: http://blog.csdn.net/chang6520/article/details/7926444 1. single view app: xcode中的st ...
- JAVA学习第五十九课 — 网络编程概述
网络模型 OSI(Open System Interconnection)开放系统互连:參考模型 TCP/IP 网络通讯要素 IP地址 port号 传输协议 网络參考模型 七层OSI模型的基本概念要了 ...
- Java Spring-事务管理概述
2017-11-11 23:05:39 事务(Transaction):是逻辑上一组操作,要么全都成功,要么全都失败. 一.事务的特性 原子性:事务不可分割 一致性:事务执行的前后,数据完整性保持一致 ...
随机推荐
- JAVA实现种子填充算法
种子填充算法原理在网上很多地方都能找到,这篇是继上篇扫描线算法后另一种填充算法,直接上实现代码啦0.0 我的实现只是实现了种子填充算法,但是运行效率不快,如果大佬有改进方法,欢迎和我交流,谢谢! 最后 ...
- puppet工作原理之模块使用
一.模块介绍 1.什么是模块 通常情况把manifest文件分解成易于理解得结构,例如类文件,配置文件分类存放,并通过某种机制整合使用,这种机制就是模块,有助于结构化.层次化的方式使用puppet,p ...
- Mac 下编译 Hadoop
Mac 下编译 Hadoop-2.9.2 系统环境 系统: Mac OS_10.14.4 maven: Apache Maven 3.6.0 jdk: jdk_1.8.0_201 ProtocolBu ...
- reinterpret
reinterpret意为“重新解释” reinterpret_cast是C++中与C风格类型转换最接近的类型转换运算符.它让程序员能够将一种对象类型转换为另一种,不管它们是否相关. reinterp ...
- java引用传递和值传递
关于Java传参时是引用传递还是值传递,一直是一个讨论比较多的话题,有论坛说Java中只有值传递,也有些地方说引用传递和值传递都存在,比较容易让人迷惑.关于值传递和引用传递其实需要分情况看待,今天学习 ...
- 【ogg三】日常运维篇:清理归档日志,ogg进程注册服务,定期备份数据库
清理归档日志 ogg使用需要开启归档日志,归档日志会随着时间的推移逐渐增多,占满空间,导致应用无法正常运行. 如果归档日志满了会报错 ORA-00257:archiver error解决办法 检查fl ...
- java - day019 - 反射
网络程序,难点在线程 反射 reflect 实用 类对象 来执行反射操作 反射获得一个类的定义信息 反射创建对象 反射调用成员变量, 方法 方法 获得类对象的三种方式 A.class Class.fo ...
- Flink原理(一)——基础架构
Flink系列博客,基于Flink1.6,打算分为三部分:原理.源码.实例以及API使用分析,后期等系列博客完成后再弄一个目录. 该系列博客是我自己学习过程中的一些理解,若有不正确.不准确的地方欢迎大 ...
- 3.Git 命令行操作
1.Git 命令行操作(本地库操作): 1.1. 创建本地库(本地库初始化): 第一步:首先在D盘建了个名为git空文件夹,命令行中cd到这个文件夹: 第二步:通过git init命令把这个目录变成G ...
- unity之中级必备知识
Mask,Scroll Rect实现图拖拽:新建Imag,添加Mask,Scroll Rect组件:新建Image,托放在Scroll下的Content:新建Scroll Bar实现滚动条的同步:托放 ...