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

あなたのアプリ、✨リブランディング✨できますか? / iosdc2020

monoqlo
September 20, 2020

あなたのアプリ、✨リブランディング✨できますか? / iosdc2020

iOSDC 2020 2020/09/20 LT

monoqlo

September 20, 2020
Tweet

More Decks by monoqlo

Other Decks in Technology

Transcript

  1. ॲํᝦ ໋໊نଇࡦఆ ex. ΞΠίϯͳΒ ic_xxx_yyy , ΠϥετͳΒ illust_xxx_yyy ͱ͔ Zeplin͔ΒͷҰׅΤΫεϙʔτͰߋ৽

    టष͘৽چը૾໊ରԠද.csvͭͬͯ͘ɺεΫϦϓτॻ͍ͯஔ͖׵͑ͨΓ΋͚ͨ͠Ͳɺ͕࣌ؒͳ͍ͷͰͦͷ࿩͸লུ
  2. "images" : [ { - "idiom" : "universal", - "filename"

    : "company_noimage_outlined.pdf" + "filename" : "company_noimage_outlined.pdf", + "idiom" : "universal" } "images" : [ { - "filename" : "radio_unselected.pdf", - "idiom" : "universal" + "idiom" : "universal", + "filename" : "radio_unselected.pdf" } ΤΫεϙʔτͰ༨ܭͳdiff͕ൃੜ
  3. public enum TextStyle { case mouse(FontWeight = .regular) // 12

    case rabbit(FontWeight = .regular) // 13 case dog(FontWeight = .regular) // 14 case monkey(FontWeight = .regular) // 17 case sheep(FontWeight = .regular) // 19 case bear(FontWeight = .regular) // 23 case elephant(FontWeight = .regular) // 33 internal var font: UIFont { // ֤caseͷϑΥϯτΛฦ͢ return .systemFont(ofSize: size, weight: weight) } } ίʔυ্ͷϑΥϯτఆٛʢεϥΠυ༻ʹ؆ུԽͯ͠·͢ʣ public enum FontWeight { case regular case heavy fileprivate var value: UIFont.Weight { switch self { case .regular: return .regular case .heavy: return .heavy } } }
  4. #if DEBUG extension UIImage { @available(iOS, deprecated, message: "temporary() is

    temporary image. it needs to be fixed") func temporary() -> UIImage { return self } } #endif UIImage+Temporary
  5. require "csv" if ARGV.count != 2 then puts "Ҿ਺ͷ਺͕ਖ਼͋͘͠Γ·ͤΜɻ" puts

    "ୈ1Ҿ਺ʹ ஔ׵͍ͨ͠ը૾໊ҰཡcsvϑΝΠϧ ͷpathΛɺୈ2Ҿ਺ʹ Storyboard/xib ؚ͕·ΕΔσΟϨΫτϦͷpathΛ༩͍͑ͯͩ͘͞ɻ" exit end image_names_path = ARGV[0] if File.extname(image_names_path) != ".csv" then puts "ୈ1Ҿ਺ʹࢦఆ͞ΕͨϑΝΠϧ͸csvϑΝΠϧͰ͸͋Γ·ͤΜɻਖ਼͍͠ϑΝΠϧΛࢦఆ͍ͯͩ͘͠͞ɻ" exit end root_path = ARGV[1] image_names = CSV.read(image_names_path) image_names.each { |names| old_name = names[0] new_name = names[1] next if new_name.nil? || old_name.nil? puts "#{old_name} => #{new_name}" [ ["<image name=\"#{old_name}\"", "<image name=\"#{new_name}\""], ["value=\"#{old_name}\"", "value=\"#{new_name}\""], ["image=\"#{old_name}\"", "image=\"#{new_name}\""], ["R.image.#{old_name}()", "R.image.#{new_name}()"] ].each { |texts| command = "grep -lr '#{texts.first}' #{root_path} | xargs sed -i '' -e 's/#{texts.first}/#{texts.last}/g'" system(command) } } puts "Completed!" ը૾໊ ৽چ ஔ׵εΫϦϓτ.rb