start developing ios apps today.pdf PartI:Introduction知识点汇总

PartI:Introduction  summary(这章主要是介绍如果获得app开发的tools,以及对一些object-c概念的回顾)

(以下黑体字旁边为个人理解,如有不准还请指出)

Objects(对象) package data with related behavior;

 

class(类) describes the behavior and properties common to any particular type of object.  

 

You make an object by creating an instance(对象实例) of a particular class.

 

When you allocate(分配) an object, you set aside enough memory for the object and set all instance variables to zero

 

Initialization(初始化) sets an object’s initial state—that is, its instance variables and properties—to reasonable values and then returns the object.  

 

class inheritance(类的继承), the idea that a class inherits behaviors from a parent class

 

When one class inherits from another, the child—or subclass(子类)—inherits all the behavior and properties defined by the parent.

 

Objects interact by sending each other messages at runtime. In Objective-C terms, one object sends a message to another object by calling a method(调用方法) on that object. 

If you have an object somePerson of class XYZPerson, you can send it the sayHello message like this: 

[somePerson sayHello];  (个人理解左边是对象,右边是调用的对象方法) 

 

protocol(协议) defines a set of behaviors that are expected of an object in a given situation.  

 

Automatic Reference Counting (ARC) makes memory management straightforward by getting the compiler to keep track of who owns an object;

 

An instance of the UIApplication class, called the application object  (应用对象)

An instance of the AppDelegate class, called the app delegate (应用委托).

The app delegate creates the window where your app’s content is drawn and provides a place to respond to state transitions within the app.

As your app starts up, the application object calls predefined methods on the app delegate to give your custom code a chance to do its job

The app delegate interface contains a single property: window. With this property the app delegate keeps track of the window in which all of your app content is drawn.

 

storyboard is a visual representation of the app’s user interface, showing screens of content and the transitions between them. You use storyboards to lay out the flow—or story—that drives your app. 

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。