title: Swift Issue with a Delegate among Two methods
body: <p>I have a strange issue with same delegate(s) in among some methods in ViewController.swift. For example:</p>
  
  <p>We have ViewController class with ToDoItemsDelegate such as this:</p>
  
  <p><strong>ViewController.swift</strong></p>
  
  <pre><code>class ViewController: UIViewController, ToDoItemsDelegate {
  
       override func viewDidLoad() {
           super.viewDidLoad()
  
           let todoitemsDelegate = ToDoItems(delegate: self)
  
           print("Part 1: How many to do items?: \(todoitemsDelegate.items.count)")
  
           secondPart()
       } 
  
       func secondPart() {
  
           let todoitemsDelegate = ToDoItems(delegate: self)
  
           print("Part 2: How many to do items?: \(todoitemsDelegate.items.count)")
       }
  }
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>Part 1: How many to do items?:   5
  Part 2: How many to do items?:   0
  </code></pre>
  
  <p>I don't understand why the secondPart() method doesn't give the right number like the first method "First Part: 5". No clue... It supposed to be work if you have a delegate to work among methods in ViewController. I tried to create a extra delegate and it behaved the same thing. Any idea what is wrong with it? Any suggestion appreciated. Thanks!</p>
  
  <p><strong>Edited (I added more details)</strong></p>
  
  <p><strong>ToDoItems.swift</strong></p>
  
  <pre><code>protocol ToDoItemsDelegate {
  
  }
  
  struct Item {
  
       var title: String!
       var description: Int!
  
  }
  
  class ToDoItems {
  
       let delegate: ToDoItemsDelegate
  
       init(delegate: ToDoItemsDelegate) {
            self.delegate = delegate
       }
  
       var items = [Item]()
  
  }
  </code></pre>