投稿

2月, 2024の投稿を表示しています

[iOS15] String catalog リンク

下記あたりの先駆者の記事が参考になりそうです。 String catalogsの使い方サイト  iOS15のローカライズ           https://rightcode.co.jp/blog/information-technology/ios-string-catalogs-xcode-15-syain           https://qiita.com/shimoto/items/99d52a12ed3a2323bae3 複数のテーブルに分けて管理が可能 If your string catalog gets too big, you can create multiple string catalog files within a single Xcode project, and give each a unique name. Then choose which string catalog to use for each translation by passing the string catalog name to the  table Name  or  table  parameter to the respective localization API as follows:    ドキュメント参照 https://developer.apple.com/documentation/xcode/localizing-and-varying-text-with-a-string-catalog   String catalogへの移行 [iOS] Localizable.strings からString catarogsに移行する           https://qiita.com/yoshitaka/items/1c15b590d063b20ccb64          https://dev.classmethod.jp/articles/localizable-strings-to-string-catalog/ パッケージでの利用 パッケージ内でString Catalogを管理する方法 https://qiita.com/k_lzrd/items/6de490ec22b980f4cf39 考え方としては、下記のリンクの方

[SwiftUI](iOS15復習) AsyncImageの特徴から利用シーンを考えてみる

アプリで、サポートOSが15になっている昨今、iOS15回りで、利用できるようになった機能についてフォーカスしてみる 今回は、AsyncImageを利用機会について取り上げてみよう。 AsyncImageの使い方は、 CodeCandy さんの記事がわかりやすいです。 AsyncImageの下記の[特徴]から[利用シーン]が想定されるのではないでしょうか [特徴] ・URLから画像の取得から、PlaceHolderの設定、画像の表示のアニメーション制御ができます。 ・ドキュメントの記載や他サイトの記事をみているとキャッシュ機構がないようです。 [利用シーン] iOS15をMinimum TargetOSとした場合のアプリは画像表示での利用は、 1)キャッシュ不要 AsyncImageを利用する ※キャッシュ機構が不要な箇所は、AsyncImageを利用して、実装の簡素化ができる 2)キャッシュが必要 2-1) 案件でライブラリの利用ができる場合は、「Kingfisher」、「Nuke」あたりを利用するのが良いさそう 理由:メモリキャッシュ、ディスクキャッシュ、プリフェッチ機能があるため 参考: Rettyさんの記事 https://engineer.retty.me/entry/2022/08/18/161226 ※KingFisherはWebPもサポートしているようです。 https://github.com/onevcat/Kingfisher/wiki/FAQ#can-i-load-some-special-image-format-like-webp 2-2) ライブラリが利用が難しい案件のプロジェクトについて 下記のようなURLSessionのコードで記載