1 Lesson IOS Overview

Source: Internet
Author: User

Important note

Purple explanation

Blue Category

New content

cs193p this lesson old version 2010 Winter http://open.163.com/movie/2010/6/C/7/M6RU83DCT_M6RU957C7.html

IOS5 http://v.163.com/special/opencourse/ipadandiphoneapplication.html

CS06A (Java)

Programming methodology

cs106b

Abstract programming (c + +, memory)

cs106x

CS107

Programming Paradigm (C,c++,python)

CS108

CS110

Start learning Terminology

After reading this episode, I decided not to look at the previous course.

decided to go straight to see, do not understand the re-check because it is also nice to understand

Version 2015 https://itunes.apple.com/us/course/developing-ios-8-apps-swift/id961180099

http://itunes.stanford.edu/can see all of the Stanford courses on itunes

Well, it's got iOS9 http://www.howzhi.com/course/11377/lesson/72730.

Terms

Messages Message

Instance variable instance variable

Parent class Superclass

Sub-class subclass

What ' s in IOS?

1 Core OS kernel operating system layer close to the hardware

Unix kernel,bsd-based Mock (BSD-based UNIX version), UNIX has it all, sockets (nested word), file system, permissions + power management, key CH Ain access to kind of manage the security of things (secure managed keychain access), 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

I. Language

Two. Frameworks Foundation UiKit, core data, core motion, Map Kit

Three. Design Strategies MVC (Model View Controller)

1.Mvc:is essentially a strategy for what organise all the classes in your app. Camps.

Model-> what (independent of UI)

Controller-> how the model was presented on screen (Htake the model data and put it in, and using it to view Minions, PU T on screen)

View-> UI

Controller Model View

13.30~29.52 MVC

2.How they communicate?

Controller with View

1.target Action

2. Will+should+did Delegate Protocols

Protocaol

is a blind a-another object. Blind communication.

View should not own the data they ' re displaying

(eg, a player, song in the model, surface in the view, and 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 the 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;

Too handsome, you can change the getter's method name, self-good

BOOL primitive data type, not in the stack, like int or floate does not need to manage memory, does not involve pointers

@property [Nonatomic, getter=ismatched] BOOL matched;

strong mean reference counting (reference count)

OC would track every a strong pointer to a object in the heap, as long as at least one strong pointer exists, it g Oing to keep this thing in the heap. Keep as long as there is. Free up memory immediately when there is no strong pointer.

weak means OC keep it in memory as long as someone else have a strong pointer to it. No strong pointer to it, it gets freed from the memory, and this pointer gets set to nil. With strong pointers, point to memory, free memory when no strong pointer is pointed, nil for weak pointer. Weak not only frees up memory, it also causes the pointer to be empty.

nonatomic Calling this setter and getter so go along with the This property was 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 is created automatically but you can ' t see, they is 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'll get warning

Self is the instance in which the code is working, this instance, which is operating on.

= = Compare pointers, not contents they pointing

return score;

}

@end

Summarize

New content

The. m file does not seem to be the same, but it is automatically generated by Xcode, it should only be a version issue, the problem is not very

The new grammar is decorated with strong and weak in the @property.

And the Getter method name can be renamed by itself OH

Then, I think the course note is best or elephant convenience, put on the word to send to blog it

1 Lesson IOS Overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.