Post

Replies

Boosts

Views

Activity

Comment on What is the difference between func (to view: UIView) and not using the 'to'?
There is a third case: ignoring completely label. func anchorSizePercent(_ view: UIView, sFactor: CGSize) { } that you would call as myHeader.anchorSizePercent(myView, sFactor: CGSize(width: 0.8, height: 0.2)).    So it is a question of preference and that often depends on the name of the function itself to see if you need label or not and if label is the same name as parameter or not.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’22