Relative Content

Tag Archive for swiftswiftuiuikit

UIKit in SwiftUI memory leak while displaying images

I’m using UIKit to display a long list of large images inside a SwiftUI ScrollView and LazyHStack using UIViewControllerRepresentable. When an image is loaded, I’m using SDWebImage to load the image from the disk.

UIKit in SwiftUI memory leak while displaying images

I’m using UIKit to display a long list of large images inside a SwiftUI ScrollView and LazyHStack using UIViewControllerRepresentable. When an image is loaded, I’m using SDWebImage to load the image from the disk.

SwiftUI/UIKit – Make Navigation Bar Buttons and Text Stand Out

In the app I’m currently working on I have a view that displays an associated image at the top. I currently have the image set to ignore the safe area at the top of the screen because I think it gives the app a more modern look. The problem is that all of the buttons or text that are in the navigation bar are unreadable depending on which image is being displayed. Is there a way to give the text shadow or a semitransparent background to make it stand out from the image? Or perhaps is there another design I could be pursuing that also looks very modern and avoids these problems?

Custom dismissable view with scroll view

I’m looking to create a custom SwiftUI view that is overlayed on top of the current view (full screen) and contains a scroll view that allows the user to scroll vertically. When the scroll view is at the top and the user swipes down, the view should slide down & get dismissed (like a normal sheet).