• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
I phone 12
 

I phone 12

on

  • 726 views

 

Statistics

Views

Total Views
726
Views on SlideShare
726
Embed Views
0

Actions

Likes
1
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • UIApplication : a singleton object, initial routing of incoming user events UIResponder : Event Handler, touch/motion (shaking) events AppDelegate : respond to application launch and termination UIWindow : provide an area for displaying its view, distribute events to the views
  • Application 몸통 Interface Builder 에서 Window 의 Visual 속성 변화 하거나 , Control 추가해도 변화 없다 .
  • UIApplication : a singleton object, initial routing of incoming user events UIResponder : Event Handler, touch/motion (shaking) events AppDelegate : respond to application launch and termination UIWindow : provide an area for displaying its view, distribute events to the views

I phone 12 I phone 12 Presentation Transcript

  • iPhone 어플리케이션 제작 워크숍
    • team Gurunun
    • 오재혁
    • [email_address]
  • 1 강
  • 개발자 등록 및 SDK 설치 SDK 설치
  • Window-based Application
  •  
  •  
  • View-based Application
  •  
  • OpenGL ES Application
  •  
  •  
  • 2 강
    • Cocoa
    • Objective-C
    • Window + View
  • Cocoa 동작 구조 Window Server Cocoa Applications event reaction
  • 어플리케이션 동작 어플리케이션 시작 nib 파일 불러오기 Main Event Loop 시작 어플리케이션 종료 이벤트 대기열에서 이벤트 수집 View 의 이벤트 코드 실행 Custom 객체 코드 실행 (delegate) 필요하면 뷰 다시 그리기
  • 어플리케이션 동작 W i n d o w S e r v e r Application 화면 터치 센서 pixel event value event drawing
  • Class Names
    • capitalized
    • NS... (NeXTSTEP)
    • prefix ~ namespace
  • Variable Names
    • Correct
    • Incorrect
    NSString *hostName; NSNumber *ipAddress; NSArray *accounts; NSString *HST_NM; NSNumber *theip; NSArray *nsma; NSString *_name;
  • Method Names [fileWrapper writeToFile: path atomically: YES updateFilenames: YES]; [finder openFile: mailing withApplication: @”MailDrop” and Deactivate: YES];
  • Preprocessor constants/Macros
    • all capitalized
    #define MAX_ENTRIES 20 #ifdef ENABLE_BINDINGS_SUPPORT
  • Delegation
    • The Delegating object : a framework object
    • The Delegate : a custom controller object, typically
    • Delegating Object:Delegate = 1:1
  • Objective-C
    • id (4) : pointer to Object
    • nil : a null Object instance
    • BOOL (char, 1) : YES 1, NO 0
    • char (1), int (4), short (2), long (4), long long (8), double (8)
    Types
  • Operators
    • +, -, /, *, %
    • >, >=, ==, !=, <=, <
    • &&, ||, !
  • Conditions
    • if
    if (test) do_something else if (test) do_something_else else ...
  • Loops
    • while (test) {statement;}
    • do {} while (test);
    • for (...;...;...) {}
  • Defining a class
    • @interface ... @end
    • @implementation
    @interface ClassName : ItsSuperClass { instance variable declarations } method declarations @end #import “ClassName.h” @implementation ClassName method definitions @end
  • Method Declaration
    • MethodType (ReturnType) MethodName: (argumentType) argumentName ...;
    • MethodType + : class method
    • MethodType - : instance method
  • Object Instantiation
    • id anObject = [[SomeClass alloc] init];
    • [anObject release];
  • Object Method Call
    • [receiver message];
    • [aRect setOriginX:30 y:50];
    • [aRect setColor:[otherRect color]];
    • self, super
  • 메모리 관리 con’t
    • dealloc method : 모든 instance 에 release
    • 블록 내에서 alloc : release = 1:1
  • References
    • #import
    • #include
  • Property
    • @property (attributes [,attribute2, ...]) type name;
    • readwrite / readonly
    • assign / retain / copy
    • / nonatomic
    [self setATable:nil]; == [aTable release]; aTable = nil;
  • Property con’t
    • @synthesize : setter, getter
    • Interface Builder outlet
    @property float value; == - (float) value; - (void) setValue: (float) newValue; @property (nonatomic, retain) IBOutlet NSButton *myButton;
  • Interface Builder Constants
    • IBOutlet
    • IBAction
    - (IBAction) respondToButtonClick : (id)sender; @interface MyClass : NSObject { NSView * aViewOutlet; } @property (nonatomic, retain) IBOutlet NSView * aViewOutlet; ... @synthesize aViewOutlet;
  • Window-based Application
  • Window?
  •  
  •  
  • Add a View
  • + ‘Hello World’
  • 3 강
    • Def. Class
    • OpenGL ES template project
    • View to OpenGLES
    • Primitive drawing
    • Def. Creature
  • Def. Class
  •  
  •  
  • OpenGLES template Project Project
  •  
  •  
  • View to OpenGLES
  •  
  •  
  • 4 강
    • OpenGL ES Practice
    • Define and Implement a creature class
  • Viewport
  • Model Matrix Projection Matrix
  • Orthographic projection Perspective projection
  • Translate Translate Translate Rotate Scale Scale
  • Vertex & Color
  •  
  • 5 강
  • Depth
  •  
  • Perspective projection
  • Perspective projection
  •  
  • State Machine
  • 6 강
    • Vertex
    • Sprite Animation
    • State
    • State Machine
  •  
  •  
  •  
  •  
  •  
  •  
  • 7 강
    • Accelerometer
    • Touch
    • Gesture
  • (0, -1, 0)
    • Touches
  •  
  •  
    • Gesture
  •  
  •  
  •  
  • 8 강
    • Media Player framework
    • AV Foundation framework
    • Media Player
  •  
    • AV Foundation
  •  
    • Play sounds of any duration
    • Loop sounds
    • Play multiple sounds simultaneously
    • Control playback level and stereo position
    • Seek to a particular point in a sound file
    • Obtain audio power data
    • MediaPlayer / AVAudioPlayer
  • Sound Pressure Level dB = 10 log (Prms / Pref ) dB = 20 log (Prms / Pref) dB = 20 log (Amplitude) ... Amp = 10 2 (dB/20) 2
  • dB spl (con’t)
    • -160 dB ~ 0 dB (logarithmic scale)
    • 10 ~ 1 (linear scale Amp)
    -8
  • 9 강
    • OpenAL
  •  
  • distance = max(distance,AL_REFERENCE_DISTANCE); distance = min(distance,AL_MAX_DISTANCE); gain = AL_REFERENCE_DISTANCE / (AL_REFERENCE_DISTANCE + AL_ROLLOFF_FACTOR * (distance – AL_REFERENCE_DISTANCE));
  • View Renderer Bob SoundObject Touch Gesture Accelerometer Heartbeat Cat, Dog WaterSound sharedAccelerometerHandler Timer, Animation
  • 10, 11 강
  •  
  • SpeakHere
  •  
  •  
  • AQRecorder
  •  
  • AQPlayer
  •  
  • Signed
    • -32768 ~ +32767
  • LPCM (Linear Pulse Code Modulation) (Linear Pulse Code Modulation) Linear Sample Rate
  •  
  • Endian Gulliver’s Travels little end big end
  •  
  •  
    • Channel
    • Frame
    • Packet
    Packet 0 Frame 0 Channel 0 Channel 1 Frame 1 ... Packet 1 Frame 0 Channel 0 Channel 1 Frame 1 ... ...