调用loadView显式 - 好/坏? [英] Calling loadView explicitly -- good/bad?

查看:136
本文介绍了调用loadView显式 - 好/坏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显式调用loadView有什么危害吗?

Is there any harm in calling loadView explicitly?

我必须打开服务器并获取显示数据,并且此数据将根据此视图上的某些用户操作而更改。我在我的loadView方法中调用服务器并传递相应的参数。现在当用户条件更改时,我调用[self loadView]修改的参数。您在这里看到一些问题吗?

I have to hit the server and get the data for display and this data will be changed based on some user action on this view. I am making the server call in my loadView method and passing the appropriate parameters. Now when user condition changes, I call [self loadView] with modified parameters. Do you see some issue here?

推荐答案

我认为应用程式文件说明一切:


loadView创建
控制器管理的视图。

loadView Creates the view that the controller manages.

- (void)loadView >

-(void)loadView You should never call this method directly.

这篇关于调用loadView显式 - 好/坏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆