title: Reinitialize static variables
body: <p>I have a simple tableview within my Settings VC. There are two different cases, either the logged in user is an employee or the admin. The Admin is able to add Users to the organization, so he sees two sections with one row each (add user and log out) while a normal employee only sees one section with one row (log out). To manage the indexPaths I have these structs:</p>
  
  <pre><code>struct Indexes {
      struct AddEmployee {
          static let row = 0
          static let section = isEmployee() ? -1 : 0
          static func indexPath() -&gt; IndexPath {
              return IndexPath(row: row, section: section)
          }
      }
  
      struct SignOut {
          static let row = 0
          static let section = isEmployee() ? 0 : 1
          static func indexPath() -&gt; IndexPath {
              return IndexPath(row: row, section: section)
          }
      }
  }
  </code></pre>
  
  <p>Within my TableView delegate I got these Methods:</p>
  
  <pre><code>func numberOfSections(in tableView: UITableView) -&gt; Int {
      return isEmployee() ? 1 : 2
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: "SettingsTableViewCell", for: indexPath)
          if (indexPath == Indexes.AddEmployee.indexPath()) {
              cell.textLabel?.text = "Add Employee"
          } else if (indexPath == Indexes.SignOut.indexPath()) {
              cell.textLabel?.text = "Log out"
          }
          return cell
      }
  </code></pre>
  
  <p>The problem now is, when I sign out as Admin and Sign in as Employee (or vice versa), the <code>static</code> variables of the structs are still initialized and the fact, that the <code>isEmployee()</code> return value has changed doesn't matter because the variables aren't reloaded, so I have wrong amounts of cells. Is there a possibility to force the structs to reload their static variables?</p>