开发者

Reload webview from another class

开发者 https://www.devze.com 2023-03-30 14:12 出处:网络
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

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

精彩评论

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