Post

Replies

Boosts

Views

Activity

Reply to Crashes in PHPickerViewController PFAssertionPolicyAbort
Thank you @Engineer! We were able to resolve the issue (in SwiftUI). The error was caused by presenting the PHPickerViewControllerRepresentable on an adaptiveSheetPresentationController that sometimes lead to the issue. We just had to remove the adaptiveSheetPresentationController and use a fullScreenCover instead. This fixed the issue.
Topic: UI Frameworks SubTopic: General Tags:
Oct ’24
Reply to Contrast for texts in widgets with image backgrounds transparent mode
Thanks for your quick reply! However, this doesn't resolve the issue. In transparent mode all texts and also background colors (even when they are black) gets converted to white or a very light color, so there is no more contrast between the background (image) and text because it's not possible to add e.g. a black background behind the text to have it better readable. The only workarounds I have found is to darken the images, so that there is more contrast, what I want to avoid. Another option is to save the images with the rendered black texts as a single image object, then the contrast between texts and background images remain. However, I would prefer to have some native solutions within WidgetKit. ZStack { Image(...) // light coloured or white image VStack { Text("Normal") // text gets white or light coloured .foregroundStyle(Color.black) // gets white or very light coloured .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottomLeading) // .background(.black) // gets white or light coloured } }
3w
Reply to Contrast for texts in widgets with image backgrounds transparent mode
With the posted code I just wanted to show the simplified principal structure of the views to get a better picture. Additionally, I have added an image to better illustrate the issue. No setting of widgetAccentedRenderingMode or widgetAccentable with considering widgetRenderingMode makes the contrast between the text and the image better. (When user has transparent mode enabled). And I have really played around a lot! You have mentioned the photos widget, this is the most similar to the one I have. They typically doesn't show any text. Very seldom there is a text but on a dark image. So I guess, they check if the image is dark and only in this case show a white text. What would you do in my case?
3w