菜鸟教程小白 发表于 2022-12-12 15:26:22

ios - presentViewController 不存在


                                            <p><p>我用 Storyboard制作了一个单 View 项目,添加了几个 ViewController 。
初始 ViewController 有一个简单的按钮来显示另一个 ViewController </p>

<pre><code>- (IBAction)doPhotoAlbumBtn:(id)sender {
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@&#34;Main.storyboard&#34;
                                                         bundle:nil];
    VCDecorations *ieVC =
   ;
    ;
}
</code></pre>

<p>我导入了类,将 ib 中的 biecontroller 连接到正确的类,在 viewcontroller 上具有正确的标识符并选中“使用 Storyboard ID”复选框
我觉得我错过了一些非常基本的东西。
帮帮我,伙计们。
谢谢。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>如果您只想切换到与当前 <code>UIViewController</code> 相同的 Storyboard 内的 <code>UIViewController</code>,您可以这样做:</p>

<pre><code>UIViewController *vc = ;
;
</code></pre>

<p><strong>编辑</strong></p>

<p>要传递数据,请在 <code>completion:block</code> 中使用 block ,为要传递的对象添加一个属性。该 block 在动画完成后执行。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - presentViewController 不存在,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/19318046/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/19318046/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - presentViewController 不存在