title: How to create a getter setter method for a dictionary inside a class in Swift
body: <p>I have a class that has a dictionary called users. I want to add and get data from this dictionary from other classes in Swift program. How should I do it? </p>
  
  <pre><code>class Database {
  
      class func addUsers(){
       // i need to know how to create function like such. 
      }
  
      var userIDName: [String:String] = [
          "A000123" : "AA",
          "A000345" : "BB",
          "A000343" : "CC"
      ]
  
  }
  </code></pre>