title: how can i call return array from Swift class to swiftui view file
body: <p><strong>My function in class page;
  soru an object and [soru] an array list.</strong></p>
  <pre><code>func GetSorular()-&gt;[Soru] {
      NetworkManager.instance.fetch(HTTPMethod.get, url: &quot;https://app.kivacrm.com/api/v1/data/osym/sorular&quot; , requestModel: nil, model: SorularResponse.self ) { response in
          switch(response)
          {
              case .success(let model):
                  let sorularModel = model as! SorularResponse
                  for soru in sorularModel.records {
                      self.sorularArray.append(soru)
                  }
              
          case .failure(_):
              print(&quot;Failure e girdi!&quot;)
          }
      }
      print(&quot;results:\(sorularArray)&quot;)
      return sorularArray
  }
  </code></pre>
  <p>return result empty..</p>
  <p>the printing and viewpage getting result is unfortunately blank;</p>
  <pre><code>results:[]
  count Sorular :0
  </code></pre>
  <p>in View code:</p>
  <pre><code>var sorular=DerslerController().GetSorular();
  </code></pre>
  <p>Please Help!</p>