菜鸟教程小白 发表于 2022-12-13 09:06:34

ios - ios mvc模式中的http请求


                                            <p><div>
            <aside class="s-notice s-notice__info post-notice js-post-notice mb16"role="status">
      <div class="d-flex fd-column fw-nowrap">
            <div class="d-flex fw-nowrap">
                <div class="flex--item wmn0 fl1 lh-lg">
                  <div class="flex--item fl1 lh-lg">
                        <b>关闭</b>。这个问题需要<a href="https://stackoverflow.com/help/closed-questions" rel="noreferrer noopener nofollow">details or clarity</a> .它目前不接受答案。
                        
                  <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>从 ViewController 发出请求。如果成功,请使用响应数据创建模型。模型本质上只是保存数据的对象的一个​​实例。如果要从模型中进行调用,则必须在获得数据之前对其进行初始化。这并不是说 <em>技术上</em> 不可能做到这一点,但最好使用 Controller 。 </p>

<p>从 ViewController 发出请求 --> 使用响应获取模型对象 --> 使用模型更新 View </p>

<p>有大量关于 MVC 的信息可用,Apple 也有大量文档。你可以从这里开始<a href="https://developer.apple.com/library/ios/documentation/General/Conceptual/DevPedia-CocoaCore/MVC.html" rel="noreferrer noopener nofollow">https://developer.apple.com/library/ios/documentation/General/Conceptual/DevPedia-CocoaCore/MVC.html</a> .</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - ios mvc模式中的http请求,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/31497685/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/31497685/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - ios mvc模式中的http请求