UIWebView頁面的控制(二)

2021-09-08 12:38:47 字數 1137 閱讀 4074

1.uiwebview的內容控制的屬性/方法列表

loading屬性              確認當前頁面是否在讀入中

cangoforward屬性   確認goforward  方法是否可執行,可執行為yes;

cangoback屬性        確認goback  方法是否可執行,可執行為yes。

goback方法               返回前乙個頁面

goforword方法          進入下乙個頁面

reload方法                 又一次讀入當前頁

stoploading方法       中止當前頁的讀入

2.webviewcontroller.h

@inte***ce webviewcontroller : uiviewcontroller

@property(nonatomic,strong)uibarbuttonitem *reloadbutton;

@property(nonatomic,strong)uibarbuttonitem *stopbutton;

@property(nonatomic,strong)uibarbuttonitem *backbutton;

@property(nonatomic,strong)uibarbuttonitem *forwardbutton;

@end

webviewcontroller.m

- (void)viewdidload

-(void)reloaddidpush

-(void)stopdidpush

}-(void)backdidpush

}-(void)forwarddidpush

}-(void)updatecontrolenabled

-(void)webviewdidstartload:(uiwebview *)webview

-(void)webviewdidfinishload:(uiwebview *)webview

-(void)webview:(uiwebview *)webview didfailloadwitherror:(nserror *)error

CSS控制頁面的方法

1.行內樣式 p style color ff000 font size 20px text decoration underline 正文內容1 p 2.內嵌樣式 style type text css p style 3.連線式css樣式 link href type text css rel ...

控制頁面的滾動條

1.控制頁面滾動條,跳到頁面底部 click me jump to bottom outout outout outout outout outout outout outout outout 2.在iframe內部控制父頁面滾動條滾到底部。2.1 parent.html outout outout...

js 控制父子頁面的載入順序

案例情況 在父網頁中存在iframe 如下 id divhome title 首頁 frameborder 0 id divhomeiframe style width 100 height 100 name sysmain src first.html 父網頁中存在載入事件函式,iframe網頁中...