Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPAssetManager: getImages: magic section: refactor array appending with appropriate array constructor #27

Closed
pavelpantus opened this issue Nov 22, 2016 · 0 comments · Fixed by #28

Comments

@pavelpantus
Copy link
Owner

pavelpantus commented Nov 22, 2016

Replace

let assets: [UIImage] = []
for _ in 0..<result.count {
  let placeholderImage = UIImage(named: "checked", in: Bundle(for: PPAssetsActionController.classForCoder()), compatibleWith: nil)!
  assets.append(placeholderImage)
}

with

let assets = Array(repeating: UIImage(...), result.count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant