6

My iOS Widget is crashing as soon I add the cornerRadius modifier to a view in my SwiftUI layout or a clipShape to clip a view.

Did anybody experience the same behaviour and found a solution?

I tried it with Xcode 12.1 and iOS 14.1 Simulator and also with Xcode 12.2 and iOS 14.2 Simulator which gave the same result.

Example code that's crashing the widget:

Image("sampleimage")
.background(Color.blue)
.cornerRadius(20)
suneel
  • 57
  • 8
fruechtemuesli
  • 2,809
  • 3
  • 17
  • 15
  • 2
    I am also facing same type of issue – suneel Apr 03 '21 at 12:46
  • I have used cornerRadius at a lot of places in my widgets. I am not facing this issue. Can you be specific where are you facing that? – Tul Dec 23 '21 at 12:00
  • 1
    Same thing was happening to me but only for the "clipShape". I had to remove it for stability. Funny thing is that it only happened to me when reordering the views that used "clipShape". – Rob Barber May 22 '22 at 23:05

0 Answers0