how to use values returned by Swift function

前端 未结 5 416
不思量自难忘°
不思量自难忘° 2021-01-26 01:36

I am trying to use a Swift function to place a circle in the centre of a view so it is always on centre regardless of screen size. I can draw the circle at a point defined by a

5条回答
  •  爱一瞬间的悲伤
    2021-01-26 02:07

    One thing you can do is use the _ to discard the return value from the function if you have no need for the value being return.

    let _ = screenCentre()
    

提交回复
热议问题