Add Picker project to repo
This commit is contained in:
parent
3cdef70c87
commit
c77be6616e
12 changed files with 890 additions and 0 deletions
33
Picker/ViewController.swift
Normal file
33
Picker/ViewController.swift
Normal file
|
@ -0,0 +1,33 @@
|
|||
//
|
||||
// ViewController.swift
|
||||
// Picker
|
||||
//
|
||||
// Created by Eryn Wells on 2015-07-22.
|
||||
// Copyright © 2015 Eryn Wells. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
|
||||
class ViewController: UIViewController {
|
||||
@IBOutlet weak var stackView: UIStackView!
|
||||
|
||||
let alphabets: [String] = ["EKMFLGDQVZNTOWYHXUSPAIBRCJ",
|
||||
"AJDKSIRUXBLHWTMCQGZNPYFVOE",
|
||||
"BDFHJLCPRTXVZNYEIWGAKMUSQO"]
|
||||
|
||||
var pickerViewControllers: [PickerViewController] = []
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
for al in alphabets {
|
||||
let picker = PickerViewController()
|
||||
picker.alphabet = Array(al.characters)
|
||||
|
||||
self.addChildViewController(picker)
|
||||
pickerViewControllers.append(picker)
|
||||
stackView.addArrangedSubview(picker.view)
|
||||
picker.didMoveToParentViewController(self)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue