Skip to content

Instantly share code, notes, and snippets.

@aheze
Last active February 26, 2020 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aheze/fb850708e0d70f935f2da531df954f2e to your computer and use it in GitHub Desktop.
Save aheze/fb850708e0d70f935f2da531df954f2e to your computer and use it in GitHub Desktop.
class MyViewController : UIViewController, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, UICollectionViewDataSource {
///.......
override func loadView() {
let view = UIView()
view.backgroundColor = .white
///ADD this stuff:
for (index, singleLetter) in baseCollectionViewArray.enumerated() {
let newComponent = AlphabetComponent()
newComponent.labelName = singleLetter
newComponent.orderIdentifier = index
newBaseCollectionViewArray.append(newComponent)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment