开发者

Reload webview from another class

I want to reload a webview from another class, i've set the property and synthesized it.

When i import the webview's class in the class i want to reload from,开发者_运维百科 and create the webview's class and do [class.property reload], it doesn't reload.

Update with code:

    CustomerDetailViewController *custDetail = [[CustomerDetailViewController alloc] init];
    [custDetail.webView reload];


Is your webview being created programmatically?

If so, it looks like you might be trying to reload the webview before it even exists?

If you are using a nib...

If your viewcontroller's view is the webview then:

 [custDetail.view reload];

If your webview is a subview of the viewcontroller's view then:

 [custDetail.view.webView reload];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜