(1/18) Re-learning STANDFORD_IOS7 Development _ios Overview _ Course Notes

Source: Internet
Author: User

Written in front: Last learning course for iOS or smattering, because of lack of practice, watching the video of the public class sometimes does not understand the knowledge well. Learning with problems is always the best way to get in touch with the iOS development after a while to see the Stanford iOS Open class, there will be many new discoveries, the existing concepts have a new understanding. This course note is mainly used to summarize the knowledge points, organize the learning ideas, and discuss after-school exercises, exchanges and so on.

  First lesson: iOS overview

    1. iOS tiering : ①core OS: Core OS layer, UNIX-based kernel (socket, file system, power management, keychain, Bonjour, etc.). The API is a C function, the actual application uses less.

②core Servers: Core service Layer (array, dictionary, string, object-oriented file system, multi-threading, GPS, database, etc.), use more.

③media: Media layer (video, image, audio editing, etc.), use more.

④cocoatouch: Touch Application layer (controls such as buttons, text boxes, interactive animations, localization, cameras, web browsing views, etc.), use more.

    2. Development Related:① tools: Xcode

② Language: Objective-c

③ FRAME (framework): foundation,coredata,mapkit,uikit,coremotion, etc.

④ design pattern: MVC (recommended), other patterns will also be used in subsequent courses, MVC throughout.

    3. MVC design Pattern: Model,view,controller: A strategy for organizing classes in your app, and all classes will be split into one of these three blocks.

Model = What your application was ( but isn't how it's displayed)

             Controller = How your Model was presented to the user (UI logic)

             View = Your Controller ' s minions

As shown in the following:

Communication mode: ① Controller direct operation model, you can use its API directly

The ② controller directly operates the view, and through the export (outlet), it can use its API directly.

The ③ model is prohibited from communicating with views (view). (The model is completely independent of the UI)

The ④ view cannot communicate directly with the controller, but through the following indirect means: target-action (such as buttons, sliders, etc.), the Protocol (delegate) or Data source (DataSource)): protocol (such as TableView, etc.).

The ⑤ model cannot communicate directly with the controller, but through the notification mechanism (Notification) or the key-value observation mechanism (KVO).

The multi-MVC scenario looks like this:

    4, Objective-c

①strong&weak:strong: As long as a strong pointer is directed to the object, the object is persisted in the heap, and the object is freed when there is no longer a strong pointer to the object (nil).

Weak: Disposes the object when there is no strong pointer to the object (there may be a weak pointer to the object).

②nonatomic: Non-atomic, which means that this object is not thread-safe, and if atomicity is locked in the setter and getter methods of the property, it affects performance.

    5. Source code

Card.h

 1   #import  <foundation/ Foundation.h>2   @interface   Card:nsobject  4  @ Property (strong,nonatomic) nsstring *contents;  5  @property (nonatomic,getter=ischosen) BOOL chosen;  6  @property (nonatomic,getter=ismacthed) BOOL matched;  7  8 -( int ) match: (Nsarray *) othercards;  9   @end  
Card.h

Card.m

1 #import "Card.h"2 3 @interfaceCard ()4 5 @end6 7 @implementationCard8 9- (int) Match: (Nsarray *) OthercardsTen { One     intScore =0; A      -      for(Card *cardinchothercards) -     { the         if([card.contents isEqualToString:self.contents]) -         { -Score =1; -         } +     } -      +     returnscore; A } at  - @end
CARD.M

    6. Homework: No

Course Video Address: NetEase Open class: Http://open.163.com/movie/2014/1/M/7/M9H7S9F1H_M9H7TMJM7.html

or itunes U search Standford Course

(1/18) Re-learning STANDFORD_IOS7 Development _ios Overview _ Course Notes

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.