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

日本語でもいい感じに改行したい!! / Split Japanese sentence for UILabel and SwiftUI Text

Trickart
September 18, 2021

日本語でもいい感じに改行したい!! / Split Japanese sentence for UILabel and SwiftUI Text

iOSDC2021発表資料

Trickart

September 18, 2021
Tweet

More Decks by Trickart

Other Decks in Technology

Transcript

  1. 補足4 muscat CLIの実装について - 引数やオプションの処理はswift-argument-parserを使用 - Property Wrapperでスッキリしてるのでおすすめ - Localizable.stringsはPropertyListDecoderで読み込める

    - ただ普通に[String:String]でデコードするとDictionaryは 順番を保証しないので順番が不定になってしまう - swift-collectionsのOrderedDictionaryを使えば…?
  2. 補足6 MeCab C APIとSwift C Interop - MeCabはC++製だがC言語向けのAPIがある - SwiftはC言語の関数を使用できる

    - Objective-C++使わなくてもいいのでは…? - 試したところXcodeでデバッグ実行したらメモリリーク警告 が発生 - 実装が悪いかもしれないが、原因が特定できなかった 為断念した - 将来追加されるであろうSwift C++ Interopに期待
  3. ご清聴ありがとうございました 参考資料 MeCab: Yet Another Part-of-Speech and Morphological Analyzer Bundling

    Resources with a Swift Package | Apple Developer Documentation C++ライブラリをiOSプロジェクトに追加する方法について - Zenn