我有一個概率,當我試圖在uiviewcontroller上設置webview屬性。 這裏的代碼:請求會員不是結構或工會
的UIWebView:
@interface mainView : UIWebView {
int currentPage;
}
@property int currentPage;
,我對合成實施
的UIViewController
(void)loadView {
webview = [[mainView alloc]init];
webview.currentPage = 2; // error -> Request for member "currentPage' in something not a structure or union
self.view=webview;
[webview release];
}
爲什麼我不能設置當前頁的財產?
任何人都知道解決方案,所以我可以在UIViewController上設置currentPage?
謝謝。
你的網頁瀏覽聲明是什麼樣的? – tarmes
我在頭文件上的webview聲明是mainView * webview; 。 currentPage屬於mainView類。 mainView是UIWebView的子類。 – dejoong