I phone 12

596
-1

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
596
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • 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

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

    ×