Upgrade to Pro — share decks privately, control downloads, hide ads and more …

IOSアプリ開発の超概要 #TechLunch

IOSアプリ開発の超概要 #TechLunch

2011/11/09(水) @ Livesense TechLunch
発表者:松坂 高嗣

E60aa4f80303f3f386898546ddb3686a?s=128

Livesense Inc.
PRO

April 23, 2014
Tweet

Transcript

  1. IOSΞϓϦ։ൃͷ௒֓ཁ দࡔߴ࢚ 11೥11݄30೔ਫ༵೔

  2. ࠓճ͸ ࠷ॳ͔Β༻ҙ͞Ε͍ͯΔ ςϯϓϨʔτͷத਎Λݟ͍͖ͯ·͢ ͦΕʹΑΓɺօ͞Μ͕ҎԼͷೋ఺ΛͳΜͱͳ͘ Θ͔ͬͨؾʹͳΓɺ ɾ։ൃͷྲྀΕͱงғؾ ɾIOSΞϓϦέʔγϣϯͷߏ੒ ͳΜͩ؆୯͡ΌΜͱࢥ͍͚ͬͯͨͩΕ͹ΰʔϧͰ͢ 11೥11݄30೔ਫ༵೔

  3. ४උ͢Δͷ͸MAC͚ͩʂ 11೥11݄30೔ਫ༵೔

  4. 11೥11݄30೔ਫ༵೔

  5. 11೥11݄30೔ਫ༵೔

  6. 11೥11݄30೔ਫ༵೔

  7. 11೥11݄30೔ਫ༵೔

  8. ϓϩδΣΫτը໘ 11೥11݄30೔ਫ༵೔

  9. ΞΠίϯ΍ىಈ࣌ը૾ͳͲ͸ ղ૾౓ͷҧ͏σόΠε༻ʹෳ਺ొ࿥ՄೳͰ͢ 11೥11݄30೔ਫ༵೔

  10. ΞϓϦέʔγϣϯىಈ࣌ʹ։͘ϏϡʔΛ ࢦఆ͢ΔΑ͏ʹͳ͍ͬͯ·͢ 11೥11݄30೔ਫ༵೔

  11. MainWindowͱ͔ MainViewͱ͔ FlipsideViewͱ͔͸ ͜ͷ͋ͨΓʹ͍Δͷ͕Θ͔Γ·͢ 11೥11݄30೔ਫ༵೔

  12. .xib ͸ʮnibϑΝΠϧʯͱݺ͹Ε·͢ ͍ΘΏΔϏϡʔͰ͢ ͳΜͰ xib ͳͷʹ nib ϑΝΠϧ΍ͶΜͬͯ࿩͸ ྺ࢙తܦҢͰ͢ 11೥11݄30೔ਫ༵೔

  13. Main Window File’s Owner First Responder Sample01AppDelegate MainViewController 11೥11݄30೔ਫ༵೔

  14. Main View File’s Owner First Responder 11೥11݄30೔ਫ༵೔

  15. Flipside View File’s Owner First Responder 11೥11݄30೔ਫ༵೔

  16. Main Windowʹ͸ Main View Controller͕ ؚ·Ε͍ͯ·͢ MainViewController 11೥11݄30೔ਫ༵೔

  17. ֤Ϗϡʔʹ͸ File’s Ownerͱ First Responder ͕ ඞͣ͋Γ·͢ MainWindow͚ͩʹApp Delegate͕͋Γ·͢ 11೥11݄30೔ਫ༵೔

  18. File’s Owner →͜ͷϏϡʔͷΦʔφʔΦϒδΣΫτʢͷϓϩΩγʣ Ϗϡʔͷ֎͔Β༩͑ΒΕΔ ී௨͸ੜ੒࣌ʹ ϏϡʔΛΠϯελϯεԽͨ͠ΦϒδΣΫτ͕ ౉͞Ε·͢ 11೥11݄30೔ਫ༵೔

  19. First Responder →͜ͷϏϡʔͷΠϕϯτΛ࠷ॳʹड͚औΔ ΦϒδΣΫτʢͷϓϩΩγʣ ʮͦͷ࣌ϑΥʔΧε͕͋Δը໘ཁૉʯ ͷ͜ͱ͕ଟ͍ɻ 11೥11݄30೔ਫ༵೔

  20. File’s Ownerͱ First Responder ͸ ੩తʹܾఆͰ͖ͳ͍͕ ࣮ߦதʹ࣮֬ʹଘࡏ͢Δ֓೦ͷ ϓϩΩγͱͯ͠σβΠϯ࣌ʹ ଘࡏ͍ͯ͠Δ 11೥11݄30೔ਫ༵೔

  21. Main Windowͷ Sample01AppDelegate͸ ΞϓϦέʔγϣϯશମʹ͔͔ΘΔॲཧ͕ ؚ·Ε·͢ UIApplicationDelegate ΠϯλʔϑΣΠεΛ ࣮૷͍ͯͯ͠ɺΞϓϦέʔγϣϯશମͷΠϕϯτ͕ γεςϜ͔Β௨஌͞Ε·͢ 11೥11݄30೔ਫ༵೔

  22. Main Windowͷ File’s Owner͸ “UIApplication” Ϋϥε 11೥11݄30೔ਫ༵೔

  23. Main Viewͷ File’s Owner͸ “MainViewController” Ϋϥε 11೥11݄30೔ਫ༵೔

  24. “UIApplication” ͸͍ͳ͍͚Ͳɺ “MainViewController” ͸͍Δ 11೥11݄30೔ਫ༵೔

  25. ॳظىಈ༻ͷϏϡʔʹ MainWindowΛࢦఆ͍ͯ͠Δ ΄͔ͷϏϡʔͱҧͬͯ ΞϓϦέʔγϣϯࣗମ͕Φʔφʔ 11೥11݄30೔ਫ༵೔

  26. File’s Owner͸Ϗϡʔͷੜ੒ऀͰ͋Δͱ͢Δͱɺ MainWindow UIApplication MainViewController MainView FlipsideViewController FlipsideView ͜Μͳ෩ͳؔ܎ͷ͸ͣ Sample01AppDelegate

    11೥11݄30೔ਫ༵೔
  27. MainWindowͱMainViewControllerɺSample01AppDelegate͕ॏͳͬͯΔͷ ͸ʁ MainWindow MainViewController Sample01AppDelegate 11೥11݄30೔ਫ༵೔

  28. ࣮͸xcodeͰ͍ͬͯ͡Δը໘σβΠϯϑΝΠϧ͸ ʮఆٛʯͱ͍͏ΑΓΦϒδΣΫτͦͷ΋ͷͰ͢ ԿΛݴͬͯΔ͔Θ͔ΒͶʔͱࢥ͏͕(ུ) 11೥11݄30೔ਫ༵೔

  29. ͜Μͳ MainWindow.xib Λ࣮ߦ࣌ʹಡΈࠐΉͱ MainViewController Sample01AppDelegate 11೥11݄30೔ਫ༵೔

  30. ಡΈࠐ·ΕͨϏϡʔΦϒδΣΫτ͸͢Ͱʹ MainViewController ͷΠϯελϯεͱ Sample01AppDelegate ͷΠϯελϯεΛؚΜͰ͍·͢ 11೥11݄30೔ਫ༵೔

  31. MainWindow UIApplication MainViewController MainView ͔ͩΒ͜͏ͳΔ Sample01AppDelegate 11೥11݄30೔ਫ༵೔

  32. FlipsideView͸Ͳ͏࢖ΘΕΔΜͩʁ 11೥11݄30೔ਫ༵೔

  33. ؾʹ࣮ͤͣߦͯ͠Έ·͢ 11೥11݄30೔ਫ༵೔

  34. ࠶ੜϘλϯΛΫϦοΫ͢Δͱ… 11೥11݄30೔ਫ༵೔

  35. iPhoneγϛϡϨʔλ͕ىಈ 11೥11݄30೔ਫ༵೔

  36. ԣʹ΋ஔ͚·͢ 11೥11݄30೔ਫ༵೔

  37. ӈԼͷϘλϯΛԡ͢ͱ͘Δͬͱճͬͯ FlipsideViewͷ಺༰͕දࣔ͞Ε·ͨ͠ 11೥11݄30೔ਫ༵೔

  38. ౰વɺӈԼͷϘλϯʹؔ࿈͢Δͱ͜Ζʹ FlipsideViewΛ࢖͏ίʔυ͸ ͋Δ͸ͣͰ͢ 11೥11݄30೔ਫ༵೔

  39. σβΠϯϏϡʔ্ͰӈԼϘλϯΛ ӈΫϦοΫ͢Δͱɺ͍Ζ͍Ζग़͖ͯ·ͨ͠ 11೥11݄30೔ਫ༵೔

  40. ͜ͷϘλϯͷ Touch Up InsideΠϕϯτ͸ File’s Ownerͷ ShowInfo: ϝιουʹ ઀ଓ͞Ε͍ͯ·͢ 11೥11݄30೔ਫ༵೔

  41. MainViewControllerͷ࣮૷Ͱ showInfo: ΛݟͯΈ·͢ ͍Δ͍ͥΔͥ FlipsideViewController͕ɾɾɾ 11೥11݄30೔ਫ༵೔

  42. ୹͍ίʔυͰ͕͢ɺงғؾ͸Θ͔Γ·͢ alloc ͱ release Ͱ໌ࣔతʹϝϞϦ؅ཧͯ͠Δͱ͔ Ϗϡʔ͸ViewControllerΛ௨ͯؒ͠઀తʹ࢖͏ͱ͔ ϝιου໊͕௕͍ͱ͔ ׅ֯ހ͕ଟ͍ͱ͔ 11೥11݄30೔ਫ༵೔

  43. ໊લ͕௕͍ͷ͸໊લۭ͕ؒͳ͍͔ΒͰ͢Ͷ 11೥11݄30೔ਫ༵೔

  44. ໌ࣔతͳϝϞϦ؅ཧ͸ΨϕίϨ͕ͳ͍͔ΒͰ͢ ※Mac OSͰ͸࢖͑·͕͢iOSσόΠεͰ͸ඇରԠͰ͢ ࢀরΧ΢ϯλࣜͷ؅ཧػߏ͕͋ΔͷͰ ن໿Λ͔ͬ͠ΓकΓ·͠ΐ͏ 11೥11݄30೔ਫ༵೔

  45. ׅ֯ހ͕ଟ͍ͷ͸ Objective-C ͷ ΦϒδΣΫτ΁ͷΞΫηε͕ ׅ֯ހͰදݱ͞Ε͍ͯΔ͔ΒͰ͢ PHPͷ ->ԋࢉࢠͷΑ͏ͳ΋ͷ ʮྲྀΕΔΑ͏ͳϝιουݺͼग़͠ʯతͳ΋ͷ͸ ͱͯ΋ಡΈͮΒ͘ͳΔͷͰېࢭͰ͢ 11೥11݄30೔ਫ༵೔

  46. ͱ͍͏͜ͱͰɺ ͍͍ͩͨςϯϓϨʔτͷ಺༰͸೺ѲͰ͖·ͨ͠ 11೥11݄30೔ਫ༵೔

  47. ຊ౰͸͜͜Ͱ࣮ػసૹ͢Δͱ͜ΖͰ͕͢ 11೥11݄30೔ਫ༵೔

  48. ূ໌ॻͷΠϯετʔϧͱ͔ Apple΁ͷ୺຤ʢMacɺ࣮ػ྆ํʣͷొ࿥ͱ͔ ͍Ζ͍Ζ໘౗͍͘͞ͷͰ ·ͨผ్ 11೥11݄30೔ਫ༵೔

  49. ͪͳΈʹAPIɺϥΠϒϥϦͷυΩϡϝϯτ͸ ͚ͬ͜͏ॆ࣮ͯ͠·͢ 11೥11݄30೔ਫ༵೔

  50. ࠷ޙʹʮ઀ଓʯʹ͍ͭͯ؆୯ʹ;Εɺ Hello WorldػೳΛ௥Ճ͠·͢ 11೥11݄30೔ਫ༵೔

  51. ը໘ʹϘλϯͱϥϕϧΛ഑ஔ͠·͢ 11೥11݄30೔ਫ༵೔

  52. ͜ͷϘλϯΛԡͨ͠Β ϥϕϧʹHello Worldͱද͍ࣔͤͨ͞ͱ͠·͢ ʮϥϕϧͷςΩετΛมߋ͢ΔʯॲཧΛ ʮϘλϯԡԼʯͰݺͼग़͢ײ͡Ͱ 11೥11݄30೔ਫ༵೔

  53. ͔ͤͬ͘ͳͷͰ xcode ͷػೳΛͰ͖Δ͚ͩ࢖͍·͢ 11೥11݄30೔ਫ༵೔

  54. Ctrlԡ͠ͳ͕ΒϥϕϧΛ MainViewControllerͷఆٛ΁ҾͬுΔͱɺ ϥϕϧ͕ࢀরͰ͖ΔϓϩύςΟ͕௥ՃͰ͖·͢ Ϗϡʔཁૉͱ઀ଓ͢ΔϓϩύςΟΛ ʮΞ΢τϨοτʯͱݺͼ·͢ 11೥11݄30೔ਫ༵೔

  55. ίʔυʹ௥Ճ͞Ε͍ͯΔͷͱಉ࣌ʹ ϏϡʔଆͰ΋઀ଓ͕ఆٛ͞Ε͍ͯ·͢ 11೥11݄30೔ਫ༵೔

  56. ίϯτϩʔϥΫϥεͰ͸ ʮ֎෦͔ΒϏϡʔཁૉΛ௥ՃՄೳͳΞ΢τϨοτΛఆٛ͢Δʯ ϏϡʔͰ͸ ʮϏϡʔཁૉͱͦͷΞ΢τϨοτͱͷ઀ଓΛఆٛ͢Δʯ ͱ͍͏ΠϝʔδͰ͢ 11೥11݄30೔ਫ༵೔

  57. ಉ͡Α͏ʹɺࠓ౓͸ϘλϯͷӈΫϦοΫϝχϡʔ͔Β Touch Up Inside ΠϕϯτΛબΜͰҾͬுͬͯ MainViewControllerʹΞΫγϣϯΛ௥Ճ͠·͢ 11೥11݄30೔ਫ༵೔

  58. ௥Ճ͞Εͨঢ়ଶ changeLabel໊ͬͯલʹ͠·ͨ͠ 11೥11݄30೔ਫ༵೔

  59. ࣮૷ʹۭϝιου͕௥Ճ͞Εͯ·͢ 2ߦ௥Ճ͠·ͨ͠ Objective-Cͷจࣈྻ͸ @ Λ͚ͭ·͢ NSLog͸ϩάग़ྗؔ਺Ͱ͢ printfࣜʹϑΥʔϚοτػೳ͕͋Γ·͢ 11೥11݄30೔ਫ༵೔

  60. ࣮ߦ 11೥11݄30೔ਫ༵೔

  61. ϘλϯΛԡ͢ͱ ϩά͕ग़ྗ͞Ε͍ͯΔ͜ͱ͕֬ೝͰ͖·ͨ͠ ͜ͷϩά͸࣮ػͰಈ͔ͯ͠Δͱ͖΋ ฼؋͔Βࢀর͢Δ͜ͱ͕Ͱ͖·͢ 11೥11݄30೔ਫ༵೔

  62. ࠓ࣌Ͱ͸౰ͨΓલͰ͕͢ όʔδϣϯίϯτϩʔϧ΋GUIʹ౷߹͞Εͯ·͢ 11೥11݄30೔ਫ༵೔

  63. ͜͜·Ͱ ௒ಛٸͰ ׂ͔͠͠ͱࡉ͔͘ xcode্͔Β ϓϩδΣΫτςϯϓϨʔτͷத਎Λ ݟͯΈ·ͨ͠ 11೥11݄30೔ਫ༵೔

  64. ͚ͬ͜͏໘ന͍࡞Γʹͳ͍ͬͯΔͳʔ ͱڵຯΛ͍͚࣋ͬͯͨͩΕ͹޾͍Ͱ͢ ͳ͓ɺMacωΠςΟϒͷΞϓϦ։ൃ΋ ಉ͡Α͏ͳײ͡Ͱ͢ 11೥11݄30೔ਫ༵೔

  65. ࣍ճ͸ҎԼͷ͏ͪͷ͍ͣΕ͔Ͱ͢ ɾ։ൃػͱͯ͠ͷMacͷεεϝ ɾforeach͔ΒC#3.0Ҏ߱ΛோΊΔ ɾiOSͰࣾ಺޲͚ΞϓϦέʔγϣϯΛ࡞ͬͯ഑෍ ɾCocoa Touch Framework ʹ΋ͬͱજΔ 11೥11݄30೔ਫ༵೔