mvc

Similar documents
Microsoft Word - Learn Objective-C.doc

epub83-1

obj-c_4.key

Microsoft Word - Chap17.doc

RUN_PC連載_12_.doc

untitled

<ADB6ADB1C25EA8FAA6DB2D4D56432E706466>

Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE "Project Properties" IDE makefile 1.

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc

<4D F736F F F696E74202D20C8EDBCFEBCDCB9B9CAA6D1D0D0DEBDB2D7F92E707074>

EJB-Programming-3.PDF

ICD ICD ICD ICD ICD

ebook140-9

Windows XP

epub 61-2

untitled

RunPC2_.doc

D C 93 2

51 C 51 isp 10 C PCB C C C C KEIL

中 文 摘 要 智 慧 型 手 機 由 於 有 強 大 的 功 能, 以 及 優 渥 的 便 利 性, 還 能 與 網 路 保 持 隨 時 的 鏈 結 與 同 步 更 新, 因 此 深 受 廣 大 消 費 者 喜 愛, 當 然, 手 機 遊 戲 也 成 為 現 代 人 不 可 或 缺 的 娛 樂 之

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

Oracle Oracle Solaris Studio IDE makefile C C++ Fortran makefile IDE Solaris Linux C/C++/Fortran Oracle IDE "P

ARM JTAG实时仿真器安装使用指南

2/14 Buffer I12, /* x=2, buffer = I 1 2 */ Buffer I243, /* x=34, buffer = I 2 43 */ x=56, buffer = I243 Buffer I243I265 code_int(int x, char *buffer)

2/80 2

C 1

概述

A Simple ios Application

EJB-Programming-4-cn.doc

untitled

ebook140-8

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

基于ECO的UML模型驱动的数据库应用开发1.doc

untitled

第7章-并行计算.ppt

Microsoft PowerPoint - Aqua-Sim.pptx

目 录

59 1 CSpace 2 CSpace CSpace URL CSpace 1 CSpace URL 2 Lucene 3 ID 4 ID Web 1. 2 CSpace LireSolr 3 LireSolr 3 Web LireSolr ID

号 Objective-C 基 础 OS X 系 统 简 介 Xcode 简 介 Objective-C 概 述 HelloWorld 基 础 数 据 类 型 2 Objective-C 面 向 对 象 编 程 Objective-C 类 的 定 义 Objective-C 对 象 的 创 建 Ob

1 Internet [1]P Web Service Web Service Web XML HTTP URL 1..NET Framework.NET Framework Web Service HTTP 80.NET Framework 2

视图控制器 (View Controllers)

C++ 程式設計

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

ansoft_setup21.doc

1. 2. Flex Adobe 3.

CLP-585/575/545/535/565GP

NEXT SDT2.51 C:\ARM251 SDT2.51 ARM SDT 2.51 ARM PROJECT MANAGER SDT 2


提问袁小兵:

RUN_PC連載_10_.doc

INTRODUCTION TO COM.DOC

Microsoft Word - template.doc

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F

Microsoft Word - 3D手册2.doc

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF

CC213

05 01 X Window X Window Linux Linux X Window X Window Webmin Web Linux Linux X Window X Window Notebook PC X Window X Window module Linux Linux kernel

自动化接口

BlackBerry Classic Smartphone-用户指南

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

GoFlex Home UG Book.book

untitled

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.07.doc

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6

書 籍 導 讀 遊 戲 活 動 第 五 項 修 練 啤 酒 遊 戲 經 歷 過 一 系 列 的 電 影 欣 賞 後, 透 過 書 中 對 常 見 9 個 系 統 基 模 做 討 論 以 期 在 未 來 工 作 上 遇 到 問 題 時, 可 以 透 過 團 隊 的 系 統 思 考, 找 出 根 本 解

C6_ppt.PDF

投影片 1

2 黑 色 皇 后 兵 向 前 移 動 兩 格 3 白 色 主 教 兵 4 黑 色 皇 后 對 角 移 動 到 對 吃 掉 白 色 國 王 的 位 置 在 這 個 章 節 中 你 會 學 到 1 打 開 設 定 關 鍵 (Set Key) 模 式 2 使 用 在 檢 視 軌 跡 中 的 可 設 定

言1.PDF

FY.DOC

SDS 1.3

AL-M200 Series

第3章.doc

Microsoft Word - 01.DOC

f2.eps

邀請大陸專業人士來臺從事文教相關活動參考手冊(修訂二版)

P4V88+_BIOS_CN.p65

epub 94-3

CH01.indd

BYOD Http Redirect convergence Client (1) 2008R2 NLB( ) (2) NLB Unicast mode switch flooding (arp ) NLB DNS Redirect 1. Round-Robin DNS DNS IP/DNS Cli

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

Microsoft Word - A _ doc

untitled

Chapter 9: Objects and Classes

151225_154448

PPBSalesDB.doc

untitled

BYOD IP+Optical (IP NGN) API 4. End-to-End (Service Aware) 5. IP NGN (IP Next Generation Network) ( ) Prime Carrier Management Access Edge Co

LK110_ck

Chapter 9: Objects and Classes

典型自编教材

P4VM800_BIOS_CN.p65

Paratune用户手册

A Preliminary Implementation of Linux Kernel Virus and Process Hiding

Basic System Administration

untitled

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

1 目 錄 1. 簡 介 一 般 甄 試 程 序 第 一 階 段 的 準 備 第 二 階 段 的 準 備 每 間 學 校 的 面 試 方 式 各 程 序 我 的 做 法 心 得 及 筆 記 結 論..

Bus Hound 5

Transcription:

Build an application Tutor : Michael Pan

Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist -

UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication sharedapplication]

Delegation - ( ) <UIApplicationDelegate>

Delegation - Animation A B Work for awhile A B

Delegation - Code A B @interface A{ B* delegate; } -(void) passtob; @end @implementation A -(void) passtob{ [delegate atctionofb]; } @end A * a = [A new] ; B * b = [B new]; a.delegate = b; [a passtob]

UIApplicationDelegate - (void)applicationdidreceivememorywarning: (UIApplication *)application; - (void)applicationwillresignactive: (UIApplication *)application; - (BOOL)application:(UIApplication *)application handleopenurl:(nsurl *)url; - (BOOL)application:(UIApplication *)application didfinishlaunchingwithoptions: (NSDictionary *)launchoptions - (void)applicationwillterminate: (UIApplication *)application;

or

Window-based

Save

Xcode

<UIApplicationDelegate> UIApplication Project Navigator

Main XIB

main.m #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retval = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retval; }

UIApplicationMain int UIApplicationMain ( int argc, char *argv[], NSString *principalclassname, NSString *delegateclassname ); argc argv main argv main principalclassname UIApplication Class name nil UIApplication delegateclassname application Class name principalclassname UIApplication application-delegate nil main nib ( ios xib MainWindow.xib )

MainWindow.xib UIWindow

IB - AppDelegate

- UIWindow

Model, View, Controller

MVC Design Pattern Controller Model View

View

Model View

Controller Model View View Model View

Controller CPU Model View Memory, DISK Monitor

Interface Builder

Xib or Nib files V in MVC model Controller

Load nib or xib file Object value / setting IBAction IBOutlet

xib Loading controller -awakefromnib -awakefromnib xib connection xib

Demo - awakefromnib

Target, Action & Event

Event-Event Handler View Event target - event handler target action Event Touch Value change Editing

Event, Target/Action Event occurs target : myobject action : @selector(print) event : TouchUpInside @interface MyController { } -(void) print; @end Event Handler

Action methods (void)actionmethod; // event event - (void)actionmethod:(id)sender; // event event - (void)actionmethod:(id)sender withevent:(uievent *)event // event

Example -(void) valuechanged:(id) sender { value = [sender value]; }

Multiple target-action Event target action Desktop Cocoa target-action IB

@interface UIControl - (void)addtarget:(id)target action:(sel)action forcontrolevents: (UIControlEvents)controlEvents; - (void)removetarget:(id)target action:(sel)action forcontrolevents: (UIControlEvents)controlEvents; @end

UI - Components UIView UIControl UIButton UISlider

Target, Action & Event

Review - Xcode & Interface Builder

Oh! Xcode

Xcode Control +

Project

Xcode

Simulator

Xib

Oh! Interface Builder

Inspector & Library Inspector Library

Document Window

File s Owner

Command + S : Command

Xcode

Hello iphone App

Templates for game 3D Model Basic With Controller and View

View-Based Project Project name Source Codes Project Configuration

Entry Point ProjectName+AppDelegate.m

UI Layout

Interface Builder

View

Build and Go - XCode

Console Console

Recap

String in Objective-C @ this is a string not string in c or c++

NSLog() printf() %d : %f : %@ : objectiv-c string NSLog(@ My name is %@, i am %d years old, @ Michael, 5);

Set Break Point enable disable

Demo Break Point

Recap

Simulator Simulate Single Finger Tap Drag Two Fingers Zoom in/out (click + alt) Move (click + alt + shift)

Simulator - Support 1 command + command + control + command + Z command + L shift + command + H Tap( ) Touch and Hold ( ) Double Tap ( ) Swipe ( ) Flick ( ) click Double Click

Simulator - Support 2 Drag Pinch Option Touch shift Pinch Option Core Location Xcode Simulator icon icon icon Home Button Reset Content and Setting 122.0307 37.3317 Apple 100 System Sound Service AvAudioPlayer MPMoviePlayerController

Demo Simulator

Questions?