What is Object

C58d9fc209cfdc0b822f851911110fa6?s=47 coe
August 20, 2019

What is Object

What is Object

C58d9fc209cfdc0b822f851911110fa6?s=128

coe

August 20, 2019
Tweet

Transcript

  1. 0CKFDUࢦ޲Ͱ 'BU7JFX$POUSPMMFSΛͳ͘͢ גࣜձࣾ"NB[JB೔޲ڧ

  2. ࣗݾ঺հ w ೔޲ڧʢ5TVZPTIJ)ZVHBʣ w J1IPOF04ʙ w "OESPJE%POVUʙ w UW04ʙ

  3. None
  4. None
  5. גࣜձࣾ"NB[JBͰ͸ ΤϯδχΞΛืू͍ͯ͠·͢ IUUQTBNB[JBDPKQDBSFFS

  6. ໰୊

  7. ࣍ͷཁ݅Λຬͨ͢ΞϓϦΛ࡞੒ ͢Δ࣌ɺ7JFX$POUSPMMFS͸Ͳͷ ͘Β͍ͷߦ਺ʹͳΔͰ͠ΐ͏͔

  8. ϐΞϊΞϓϦ

  9. ϐΞϊΞϓϦཁ݅ w ը໘͸Ұը໘ͷΈ w υʙγ·ͰͷԻ͕ଘࡏ͢Δ w ௕ԡ͠ͰԻ͕௕͘ͳΓɺࢦΛ཭ͨ͠ΒԻ͕ࢭ·Δ w ͦΕͧΕಠཱͯ͠Ի͕໐Δ w

    ಉ࣌ԡ͠΋Մೳ w ಉ࣌ԡ͠ˠҰຊࢦ཭ͨ͠Βɺࢦ཭ͨ͠ͱ͜Ζ͚ͩԻࢭ·Δ
  10. ϐΞϊΞϓϦཁ݅ w ϙΠϯτ w ԻΛ໐Β͢ʹ͸ɺ"7"VEJP1MBZFSΛ࢖͏ w ͦΕͧΕͷԻ੠ϑΝΠϧΛಡΈࠐ·ͤͨ "7"VEJP1MBZFSΛ༻ҙͯ͠ɺTUBSUɺTUPQ͠ͳ͍ͱ͍͚ ͳ͍

  11. 7JFX$POUSPMMFS͸Ͳͷ͘Β ͍ͷߦ਺ʹͳΔͰ͠ΐ͏ γϯΩϯάλΠϜʂ

  12. ϘλϯΫϦοΫΛҰݸҰݸॻ͘ʁ import UIKit import AVFoundation class ViewController: UIViewController { var

    doPlayer:AVAudioPlayer! var rePlayer:AVAudioPlayer! var miPlayer:AVAudioPlayer! var faPlayer:AVAudioPlayer! var soPlayer:AVAudioPlayer! var raPlayer:AVAudioPlayer! var siPlayer:AVAudioPlayer! func onDoClick() { } func onReClick() { } func onMiClick() { } …
  13. ϘλϯʹUBHΛׂΓ౰ͯΔʁ import UIKit import AVFoundation class ViewController: UIViewController { var

    doPlayer:AVAudioPlayer! var rePlayer:AVAudioPlayer! var miPlayer:AVAudioPlayer! var faPlayer:AVAudioPlayer! var soPlayer:AVAudioPlayer! var raPlayer:AVAudioPlayer! var siPlayer:AVAudioPlayer! func onClick(_ sender: UIButton) { switch sender.tag { case 1: … } } … ͬͪ͜ͷํ͕ߦ਺গͳ͘ͳΔͶʂ
  14. ਖ਼ղ

  15. 7JFX$POUSPMMFS͸ߦͰ͢

  16. 7JFX$POUSPMMFS͸ଘࡏ͠·ͤΜ

  17. .BJOTUPSZCPBSE

  18. None
  19. ͳʹ͜Εʁ

  20. 0CKFDU

  21. None
  22. 1MBZFS

  23. import UIKit import AVFoundation class Player: NSObject { private var

    player:AVAudioPlayer! @IBInspectable var path:String! override func awakeFromNib() { player = try! AVAudioPlayer(contentsOf: Bundle.main.url(forResource: path, withExtension: nil)!) } @IBAction func start(_ sender: Any) { player.play() } @IBAction func stop(_ sender: Any) { player.stop() player.currentTime = 0 } }
  24. ϑΝΠϧύεΛ*#͔ΒઃఆͰ͖ΔΑ͏ʹ͢Δ import UIKit import AVFoundation class Player: NSObject { private

    var player:AVAudioPlayer! @IBInspectable var path:String! override func awakeFromNib() { player = try! AVAudioPlayer(contentsOf: Bundle.main.url(forResource: path, withExtension: nil)!) } @IBAction func start(_ sender: Any) { player.play() } @IBAction func stop(_ sender: Any) { player.stop() player.currentTime = 0 } }
  25. *# OJC ͔Βઃఆ͞ΕͨύϥϝʔλͰ "7"VEJP1MBZFSॳظԽ import UIKit import AVFoundation class Player:

    NSObject { private var player:AVAudioPlayer! @IBInspectable var path:String! override func awakeFromNib() { player = try! AVAudioPlayer(contentsOf: Bundle.main.url(forResource: path, withExtension: nil)!) } @IBAction func start(_ sender: Any) { player.play() } @IBAction func stop(_ sender: Any) { player.stop() player.currentTime = 0 } }
  26. *#͔Β"DUJPOΛड͚औΕΔΑ͏ʹ͢Δ import UIKit import AVFoundation class Player: NSObject { private

    var player:AVAudioPlayer! @IBInspectable var path:String! override func awakeFromNib() { player = try! AVAudioPlayer(contentsOf: Bundle.main.url(forResource: path, withExtension: nil)!) } @IBAction func start(_ sender: Any) { player.play() } @IBAction func stop(_ sender: Any) { player.stop() player.currentTime = 0 } }
  27. ֤ϘλϯͷΠϕϯτΛ0CKFDUʹͭͳ͙͚ͩͰ 7JFX$POUSPMMFSΛ࡞੒ͤͣϐΞϊ͕׬੒

  28. ͦ΋ͦ΋

  29. 7JFX$POUSPMMFSͷओͳ໾ׂ

  30. 7JFX$POUSPMMFSͷओͳ໾ׂ w ϥΠϑαΠΫϧ؅ཧ w 6*ͷมߋ w ؅ཧԼΦϒδΣΫτಉ࢜ͷίϛϡχέʔγϣϯ w ը໘ભҠ

  31. 7JFX$POUSPMMFSͷओͳ໾ׂ w ϥΠϑαΠΫϧ؅ཧ w ˠϥΠϑαΠΫϧʹ߹Θͤͨॲཧ͸ແ͍ w 6*ͷมߋ w ˠͳ͠ w

    ؅ཧԼΦϒδΣΫτಉ࢜ͷίϛϡχέʔγϣϯ w ˠͳ͠ w ը໘ભҠ w ˠͳ͠
  32. 7JFX$POUSPMMFSͰ΍Δඞཁ ͷ͋Δ͜ͱͬͯ গͳ͍ͷͰ͸ʁ

  33. Ԡ༻ฤ

  34. 7JFX$POUSPMMFS্ͷ5BCMF7JFXͷ%BUB4PVSDFʹ 6*5BCMF7JFX%BUB4PVSDFೖΓ0CKFDUΛ࢖͏

  35. $PMMFDUJPO7JFXͷ%BUB4PVSDFʹ΋ 6*$PMMFDUJPO7JFX%BUB4PVSDFೖΓ0CKFDUΛ࢖͏

  36. 0CKFDUࢦ޲·ͱΊ w 7JFX$POUSPMMFS w ༨ܭͳσʔλ؅ཧΛͤͣɺϥΠϑαΠΫϧ΍ը໘ભҠͳ Ͳɺ7JFX$POUSPMMFSͷ໾ׂ͚ͩʹूதͰ͖Δ w 0CKFDU w 7JFX$POUSPMMFS͔Β੾Γ཭ͯ͠ॲཧΛ࣮૷Ͱ͖Δ

    w ςετ΋͠΍͍͢ʂ
  37. ϐΞϊΞϓϦ IUUQTHJUIVCDPNDPFEPSFNJHJU