Timeline for SwiftUI .cornerRadius on Image not showing up
Current License: CC BY-SA 4.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 4, 2021 at 22:27 | review | Close votes | |||
Apr 8, 2021 at 0:07 | |||||
Apr 4, 2021 at 21:34 | comment | added | Saurav Kumar | imgur.com/a/YIRsgW2 | |
Apr 4, 2021 at 21:32 | comment | added | aheze | @SauravKumar can you upload your image? I ran your above code and it worked fine. | |
Apr 4, 2021 at 21:20 | history | edited | Saurav Kumar | CC BY-SA 4.0 |
added 1750 characters in body
|
Apr 4, 2021 at 21:18 | comment | added | Saurav Kumar |
That's weird, I suppose the issue is with my UIImage , right? I just updated the post with the full view
|
|
Apr 4, 2021 at 21:16 | comment | added | aheze | @SauravKumar works fine... screenshot. We probably need some more code. | |
Apr 4, 2021 at 21:14 | comment | added | Saurav Kumar | I just edited the code, it should contain the full container – do you see any issues with that? | |
Apr 4, 2021 at 21:14 | history | edited | Saurav Kumar | CC BY-SA 4.0 |
added 585 characters in body
|
Apr 4, 2021 at 21:12 | comment | added | aheze | @SauravKumar I'm pretty sure the problem is the container in which the image is placed. The loading image function looks fine. | |
Apr 4, 2021 at 21:10 | comment | added | Saurav Kumar | Does this help? This is the function, called on onAppear(), which loads the remote URL: @State private var imageFromFirebase: UIImage? func imageLoadFromURL(){ HTTPRequest.fetchImage(self.contentMessage) { (image) in if image != nil { imageFromFirebase = image! } } } | |
Apr 4, 2021 at 21:10 | answer | added | swiftPunk | timeline score: 2 | |
Apr 4, 2021 at 21:05 | comment | added | aheze |
@SauravKumar yes, Image(uiImage: UIImage(named: "TestImage")!) works fine.
|
|
Apr 4, 2021 at 21:04 | comment | added | Saurav Kumar | I believe the issue is that I am loading the Image from a UI Image. Does it work for you when you do that? | |
Apr 4, 2021 at 21:02 | comment | added | aheze | It's working for me. Can you show what code is surrounding this? | |
Apr 4, 2021 at 21:00 | comment | added | Владимир Ковальчук | .cornerRadius(10) .clipped() ? | |
Apr 4, 2021 at 20:52 | history | asked | Saurav Kumar | CC BY-SA 4.0 |