Section.swift 638 B

12345678910111213141516171819202122232425262728
  1. //
  2. // Section.swift
  3. // app
  4. //
  5. // Created by Iñigo Valentin on 21/11/16.
  6. // Copyright © 2016 Margolariak. All rights reserved.
  7. //
  8. import Foundation
  9. import UIKit
  10. class Section: UIView {
  11. @IBOutlet weak var container: UIView!
  12. @IBOutlet weak var title: UITextView!
  13. @IBOutlet weak var content: UIView!
  14. required init?(coder aDecoder: NSCoder) {
  15. super.init(coder: aDecoder)
  16. Bundle.main.loadNibNamed("Section", owner: self, options: nil)
  17. self.addSubview(container)
  18. container.frame = self.bounds
  19. }
  20. func setTitle(text: String){
  21. title.text = text
  22. }
  23. }