0

[New to swift] I am currently displaying a qr code as outlined in https://www.hackingwithswift.com/example-code/media/how-to-create-a-qr-code. I am setting the size using .resizable().frame(width:500,height:500) This is being run on swift playgrounds on ipad 10.

  • The size ( ex: 500 ) doesnt appear to be the size in pixels of the Image. What is the size number indicate ?
  • My goal is to know the size of the qr code in pixel units that was displayed on the screen.
  • Trying GeometryReader() out at the moment, does it return size in pixel units ?

currently trying out https://stackoverflow.com/a/66399037/3654791 , but am running into Cannot find "Just" in scope error

centOpt
  • 1
  • 1
  • You should show some code. You likely want `scaledToFit` before the frame. The frame is in points (not pixels). Pixels will depend on the density of the screen. – jnpdx Jul 03 '23 at 19:20

0 Answers0