Skip to main content
removed tag from title
Link
Quill
  • 11.9k
  • 5
  • 40
  • 93

Swift: For Loop with Index to Functional

Source Link

Swift: For Loop with Index to Functional

Trying to simply my code below:

for (index, point) in enumerate(self.points){
        let pointButton = UIButton()
        pointButton.frame = point.bounds
        self.view.addSubview(pointButton)
    }

Is there a better way to accomplish this through .map .filter or .reduce ?