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

デザイナー × エンジニアの共同UIづくり

デザイナー × エンジニアの共同UIづくり

#yjbonfire

Bonfire iOS #4
https://yj-meetup.connpass.com/event/86651/

乗換案内アプリのCI/CDの取り組みについてのご紹介
https://techblog.yahoo.co.jp/advent-calendar-2017/transit_ci_cd/

Tatsuya Tanaka

May 16, 2018
Tweet

More Decks by Tatsuya Tanaka

Other Decks in Technology

Transcript

  1. • Yahoo!৐׵Ҋ಺ • iOSΞϓϦΤϯδχΞ • GitHub: @tattn • Qiita: @tattn

    • Twitter: @tanakasan2525 ాத ୡ໵ ՖҪ ෣ • Yahoo!৐׵Ҋ಺ • Web/iOSσβΠφʔ
  2. ࢓༷FIX ࢓༷FIX→ϦϦʔε·ͰͷྲྀΕ Designer Engineer UI࣮૷ ϩδοΫ࣮૷ ςετ मਖ਼ ਃ੥ Xib/Storyboardड͚औΓ

    ϩδοΫ࣮૷ ϦϑΝΫλϦϯά UIͷ૊ΈํΛݕ౼ UI࣮૷ʴϞοΫίʔυ࣮૷
 ʢStoryboard/Xib/SwiftͳͲʣ اը/੍࡞/ٕज़શһͰ֬ೝ fastlaneͰਃ੥
  3. StoryboardʹԾͷ஋ΛೖΕͯίʔυͰॳظԽ @IBOutlet private var firstStartTimeLabel: WKInterfaceLabel! @IBOutlet private var firstTimeDotImage:

    WKInterfaceImage! override func awake(withContext context: Any?) { super.awake(withContext: context) firstStartTimeLabel.setText(nil) secondStartTimeLabel.setText(nil) thirdStartTimeLabel.setText(nil) firstTimeDotImage.setImage(nil) secondTimeDotImage.setImage(nil) thirdTimeDotImage.setImage(nil) ... 1. σβΠϯ͕Ұ໨ͰΘ͔Δ஋Λ
 Xib΍StoryboardͰઃఆ 2. ௨৴தͳͲʹԾͷ஋͕දࣔ͞ Εͳ͍Α͏ʹදࣔલʹίʔυ ͰॳظԽ/ඇදࣔ
 (awakeFromNib, viewDidLoad౳)
  4. ্ख͘ಈ͔ͳ͍έʔε ✖ override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() imageView.image = UIImage(named:

    "image") } ✖ override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() imageView.image = #imageLiteral(resourceName: "image") }
  5. Bundleͷύε͕มΘΔ ΞϓϦ࣮ߦ࣌ (Simulator) ~/Library/Developer/Xcode/DerivedData/ΞϓϦ໊-xxx/Build/Intermediates.noindex/ IBDesignables/Products/Debug-iphonesimulator/ΞϓϦ໊.app 3. Bundle(for: type(of: self)).bundleURLͷ஋ 1.

    Bundle.main.bundleURLͷ஋ ~/Library/Developer/CoreSimulator/Devices/xxx-xxx-xxx-xxx-xxx/data/ Containers/Bundle/Application/xxx-xxx-xxx-xxx-xxx/ΞϓϦ໊.app/ Interface BuilderͰͷ࣮ߦ࣌ /Applications/Xcode.app/Contents/Developer/Platforms/ iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/ 2. Bundle.main.bundleURLͷ஋
  6. BundleΛࢦఆͯ͠ը૾Λઃఆ override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() let bundle = Bundle(for:

    type(of: self)) imageView.image = UIImage(named: "image", in: bundle, compatibleWith: nil) } ✖ override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() imageView.image = UIImage(named: "image") } ✖ override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() imageView.image = #imageLiteral(resourceName: "image") } ը૾औಘΛந৅Խ͢Δ৔߹͸Bundle͸DIͰ͖ΔΑ͏ʹ͠Α͏