Как создать собственный значок документа в приложениях iOS 14+ ⇐ IOS
-
Anonymous
Как создать собственный значок документа в приложениях iOS 14+
I am trying to create a custom document icon for my multi-platform (iOS 14 - macOS Big Sur) app.
So, for macOS, it's pretty easy, I can either attach a legacy icon, or better, supply a combination of background, image and text, to composite a document icon, as described in macOS Document Icon Human Interface Guidelines.
So, in Info.plist, the UTExportedTypeDeclarations would contain a UTTypeIcons key like the following:
UTTypeIcons UTTypeIconBackgroundName Icon Fill UTTypeIconBadgeName Icon Image UTTypeIconText Dapka Now, the real challenge is in the iOS document icon. First, there are no updated documentation. Second, I couldn't do it like I did with macOS. Here, I should only supply one image, so I uploaded it as PNG in Resources folder, and then modified the UTExportedTypeDeclarations in Info.plist as following:
UTTypeIconFiles Document Icon But, the icon didn't appear correctly, it appeared as a centered image with white background, and no text.
Any ideas?
Источник: https://stackoverflow.com/questions/693 ... os-14-apps
I am trying to create a custom document icon for my multi-platform (iOS 14 - macOS Big Sur) app.
So, for macOS, it's pretty easy, I can either attach a legacy icon, or better, supply a combination of background, image and text, to composite a document icon, as described in macOS Document Icon Human Interface Guidelines.
So, in Info.plist, the UTExportedTypeDeclarations would contain a UTTypeIcons key like the following:
UTTypeIcons UTTypeIconBackgroundName Icon Fill UTTypeIconBadgeName Icon Image UTTypeIconText Dapka Now, the real challenge is in the iOS document icon. First, there are no updated documentation. Second, I couldn't do it like I did with macOS. Here, I should only supply one image, so I uploaded it as PNG in Resources folder, and then modified the UTExportedTypeDeclarations in Info.plist as following:
UTTypeIconFiles Document Icon But, the icon didn't appear correctly, it appeared as a centered image with white background, and no text.
Any ideas?
Источник: https://stackoverflow.com/questions/693 ... os-14-apps
Мобильная версия