title: How to set and get data in model class?
body: <p>I want to set data in model class and get the data from model class. I don't know much of MVC, but want to learn it. When I getting data that time it shows empty.
  how I can access the data?
  Please give me any solution to do this.</p>
  
  <p>Below is my Model:</p>
  
  <pre><code>  class Model: NSObject {
          var RTC_minute:String!
          var RTC_hour:String!
          var RTC_day:String!
          var RTC_year:String!
          var Flag:String!
  
          init(RTC_minute:String, RTC_hour:String, RTC_day:String, RTC_year:String, Flag:String) {
              self.RTC_minute = RTC_minute
              self.RTC_hour = RTC_hour
              self.RTC_day = RTC_day
              self.RTC_year = RTC_year
              self.Flag = Flag
          }
      }
  </code></pre>
  
  <p>Below is my set data viewController:</p>
  
  <pre><code>    class viewController:UIViewControoler {
      var holidayData: Model = Model(RTC_minute:"", RTC_hour:"", RTC_day:"", RTC_year:"", Flag:"")          
      override func viewDidLoad() {
                  super.viewDidLoad()
                  holidayData?.RTC_minute = "0x55"
                  holidayData?.RTC_hour = "0x21"
                  holidayData?.RTC_day = "0x13"
                  holidayData?.RTC_year = "0x20"
                  print(holidayData?.RTC_minute as Any)
              }
          }
  </code></pre>
  
  <p>Below is my get data View Controller.</p>
  
  <pre><code>       class ViewController:UIViewController {
             var holidayData: Model = Model(RTC_minute:"", RTC_hour:"", RTC_day:"", RTC_year:"", Flag:"")
         override func viewDidLoad() {
              super.viewDidLoad()
              print(holidayData?.RTC_minute)
              print(holidayData?.RTC_hour)
              print(holidayData?.RTC_day)
              print(holidayData?.RTC_year)
          }
      }
  </code></pre>