Events table
Properties table
Properties name |
Properties description |
bool
FullScreen;
|
Full-screen mode status parameter. When using the SetTargetRect() or setSize()
method,
it automatically becomes false. If the parameter is set to true, SetTargetRect() is ignored.
|
float
Alpha;
|
Parameter that returns the alpha channel of the web view.You
can
specify numbers in the range from 0.0 to 1.0
|
Methods table
Method name |
Method description |
void
SetTargetRect (RectTransform
targetRect);
|
Sets the target frame for the current web view. The web view
will
match the position and size of the target frame.
|
void
Init (bool
SwipeToRefresh);
|
Initializing the web view.
|
void
LoadUrl (string
url);
|
Loads a url in current web view.
|
void
LoadHTMLString (string
Html, string BaseUrl);
|
Loads a HTML in current web view.
|
void
Destroy ();
|
Destroying the current web view.
|
void
StopLoading ();
|
Stop loading the current page.
|
void
Reload ();
|
Reloading the current page.
|
string
GetUrl ();
|
Return the url of the loaded page in the current web
view.
|
void
Show (bool fade,
float duration, AnimationType
animation, Action
<ResultCallback> Callback);
|
Sets visible the current web view.
|
void
Hide (bool fade,
float duration, AnimationType
animation, Action
<ResultCallback> Callback);
|
Sets invisible the current web view.
|
void
EvaluateJavaScript (string
jsCode, Action
<ResultCallback> Callback);
|
Evaluate JavaScript in current page.
|
void
AddJavaScript (string
jsCode, Action
<ResultCallback> Callback);
|
Adds JavaScript in current page.
|
void
GetHTMLCode (bool
unescape, Action
<ResultCallback> Callback);
|
Get the html code loaded in the current webview.
|
void
SetSize (int x,
int y, int
width, int height);
|
Sets the size and position of the current web view.
|
void
ScrollTo (int x,
int y, bool
animate);
|
Scroll to the specified coordinates in the current web
view.
|
int
GetMaxScrolledPage ();
|
Return the page height in the current web view.
|
bool
IsInitialized ();
|
Returns whether the web view is initialized.
|
void
AddUrlCustomScheme (string
scheme);
|
Adding a schema to manually process it in
OnReceivedData.
|
void
RemoveUrlCustomScheme (string
scheme);
|
Remove the schema for manual processing.
|
void
SetUserAgent (string
UserAgent);
|
Sets the user agent in the current web view.
|
string
GetUserAgent ();
|
Return the user agent from the current web view.
|
void
Print ();
|
Print the loaded page in the current web view.
|
void
ShowProgressBar (string
HexColor);
|
Show the progress bar while loading pages.
|
void
HideProgressBar ();
|
Hide the progress bar.
|
static void
SetAllowAutoPlay (bool
AutoPlay);
|
Allow autoplay media playback in the current web view (call
before
initializing the web view, otherwise the option will not work).
|
static void
SetAllowJavaScript (bool
EnableJavaScript);
|
Allow JavaScript in the web view (call before initializing the
web
view, otherwise the option will not work).
|
void
SetZoomEnabled (bool
EnableZoom);
|
Allow zoom content in the current web view.
|
void
SetHorizontalScrollBarEnabled (
bool Enable);
|
Enabling the horizontal scroll bar in the current web
view.
|
void
SetVerticalScrollBarEnabled (bool
Enable);
|
Enabling the vertical scroll bar in the current web
view.
|
void
SetAllowContextMenu (bool
Enable);
|
Allow the context menu in the current web view.
|
void
SetUserInteraction (bool
Interaction);
|
User interaction with the current web view.
|
void
SetSupportMultipleWindows (bool
support);
|
Enable support for multiple windows in the current web
view.
|
static void
SetJavaScriptCanOpenWindowsAutomatically
(bool Enable);
|
Allow windows to open automatically (call before initializing
the web
view, otherwise the option will not work).
|
bool
CanGoBack ();
|
Returns whether it is possible to return to the previous
page.
|
bool
CanGoForward ();
|
Returns whether it is possible to return to the forward
page.
|
void
GoBack ();
|
Go back to the previous page in the current web view.
|
void
GoForward ();
|
Go forward page in the current web view.
|
void
AllowShowSslDialog (bool
Allow);
|
Allow to show the ssl error dialog box,to prohibit or allow
page
loading (Android only).
|
void
UpdateCookie ();
|
Force call to save cookies.
|
void
ClearCookies ();
|
Clears all cookies from web view.
|
void
AddCookie (string
url,
string Cookies);
|
Adding a cookie to the current web view.
|
string
GetCookie (string
url,
string Key);
|
Returns the value of the cookie under the URL and key.
|
void
ShowSpinner (bool
Enable);
|
Show the loading spinner while loading pages.
|
void
SetSpinnerText (string
text);
|
Add text to loading spinner.
|
void
AddHTTPHeader (string key,
string value);
|
Adding custom headers to queries in the current web
view.
|
void
RemoveHTTPHeader (string
key);
|
Removing custom request headers in the current web
view.
|
Methods for Android only
Methods for IOS only
Events
event OnFinishedInit (WellWebView
webview)
An event that is raised when the initialization of the web view is completed.
After
this event, you can call the web view methods (except those that are called before creating the
web
view).
Parameters:
WellWebView webview
The web view that raised the event.
Example:
webView.OnFinishedInit += (RaisedWebView) =>
{
webView.LoadUrl("https://example.com");
};
event OnPageStarted (WellWebView
webview, string Url)
An event that raised when a page starts loading in the web view.
Parameters:
WellWebView webview
The web view that raised the event.
string Url
The url that is being loaded.
Example:
webView.OnPageStarted += (RaisedWebView, Url)
=>
{
print(Url);
};
webView.LoadUrl("https://example.com");
event OnPageFinished (WellWebView
webview, string Url)
Event that raised when a page is finished loading in the web view.
Parameters:
WellWebView webview
The web view that raised the event.
string Url
The url that completed loading.
Example:
webView.OnPageFinished += (RaisedWebView, Url)
=>
{
print(Url);
};
webView.LoadUrl("https://example.com");
event OnReceivedData (WellWebView
webview, WellReceivedData message)
It is raised when the web view receives a custom schema added for
manual processing,
takes all the parameters of the string passed to it, and returns it to Unity.
Parameters:
WellWebView webview
The web view that raised the event.
WellReceivedData message
A message that contains
information such as host, scheme.
Example:
webView.OnReceivedData += (RaisedWebView,
Message) =>
{
print("RawData:" +
Message.RawData);
print("Scheme:
" + Message.Scheme);
print("Host:
" + Message.Host);
List <string>
ArgsName =
Message.Args.GetValues("name");
if (ArgsName.Count > 0)
{
foreach(string
name in ArgsName){
print("name:
" + name);
}
}
};
webView.LoadUrl("wellwebview://host?name=Alex&age=25");
webView.AddUrlCustomScheme("testScheme");
webView.LoadUrl("testScheme://host?name=Alex&age=25&name=Elena");
event OnPageProgressLoad (WellWebView
webview, int progress)
The event is raised when the page loads, and displays the page loading
progress from
0 to 100 in the current web view.
Parameters:
WellWebView webview
The web view that raised the event.
int progress
Progress loading pages.
Example:
webView.OnPageProgressLoad += (RaisedWebView, progress)
=>
{
print(progress);
};
webView.LoadUrl("https://example.com");
event OnMultipleWindowOpened (WellWebView
webview)
The event is raised when a new window opens in the web view. This event is
only registered if multiple windows are supported.
Parameters:
WellWebView webview
The web view that raised the event.
Example:
webView.OnMultipleWindowOpened += (RaisedWebView) =>
{
};
event OnMultipleWindowClosed (WellWebView
webview)
The event is raised when a new window closed in the web view. This event is
only registered if multiple windows are supported.
Parameters:
WellWebView webview
The web view that raised the event.
Example:
webView.OnMultipleWindowClosed += (RaisedWebView) =>
{
};
event OnReceivedError (WellWebView
webview, string Url, int
ErrorCode)
The event is raised when an error raised when loading a page or the web view
itself.
Parameters:
WellWebView webview
The web view that raised the event.
string Url
The URL that caused the error.
int ErrorCode
Error code.
Example:
webView.OnReceivedError += (RaisedWebView, url, errorCode)
=>
{
print("Error url:
" + url);
print("Error code:
" + errorCode);
};
webView.LoadUrl("https://example-with-error404.com");
event OnDoneButtonClicked (WellWebView webview)
Event that raised when you click the Done button on the toolbar (IOS only).
Parameters:
WellWebView webview
The web view that raised the event.
Example:
webView.OnDoneButtonClicked += (RaisedWebView) =>
{
};
Methods
void Init
(bool SwipeToRefresh)
Initializing the web view. Important:The
SwipeToRefresh parameter only works on Android.
Parameters:
bool SwipeToRefresh
Enables the ability to reload by swiping
across the top of the site in the current web view (Only Android). Default value: false
Example:
webView.Init();
void SetTargetRect
(RectTransform targetRect)
Sets the target frame for the current web view. The web view will match the
position
and size of the target frame. Important:This disables
FullScreen mode.
Parameters:
RectTransform targetRect
Sets the target frame.
Example:
webView.SetTargetRect(targetRect);
void LoadUrl
(string url)
Loads a url in current web view.
Parameters:
string url
The url to be loaded. This url should start
with http:// or https:// scheme.
If the site is local (stored in StreamingAssets Folder in Unity). Use the GetStreamingAssetURL() method to convert the path to the correct
url
Example:
webView.LoadUrl("https://example.com");
webView.LoadUrl(WellWebView.GetStreamingAssetURL("sites/site_1.html"));
void LoadHTMLString
(string Html, string
BaseUrl)
Loads a HTML code in current web view.
Parameters:
string Html
Html to be used as the page content
string BaseUrl
The url to use as the page's base url
Example:
webView.LoadHTMLString("<html><body>You scored
<b>192</b> points.</body></html>","https://example.com");
void Destroy()
Destroying the current web view.
Example:
webView.Destroy();
void StopLoading()
Stop loading the current page in the current web view.
Example:
webView.StopLoading();
void Reload()
Reloading the current page in the current web view.
Example:
webView.Reload();
void GetUrl()
Get the currently loaded URL.
Example:
webView.LoadUrl("https://example.com");
string Url =
webView.GetUrl();
print(Url);
void Show
(bool fade, float
duration, AnimationType animation,
Action <ResultCallback> Callback)
Sets the web view that is visible on the screen.
If the parameter fade ==
false and animation ==
None, then the parameter "duration"
will not be taken into account, since there will be no
animation. Regardless of whether there was an animation or not, the Callback will be called at the very end method.
Parameters:
bool fade
Show with fade-in animation. Default value: false
float duration
Animation duration. Default value: 0f
AnimationType animation
Selecting the animation type. Default value: None
Action <ResultCallback> Callback
Callback at the end of the
animation. Default value: null
Example:
webView.Show();
webView.Show(true);
webView.Show(true, 5f, AnimationType.Slide_Up,(result) => {
print("web view animation
is finished!");
});
webView.Show(true, 5f, AnimationType.Slide_Up);
void Hide
(bool fade, float
duration, AnimationType animation,
Action <ResultCallback> Callback)
Sets the web view that is invisible on the screen.
If the parameter fade ==
false and animation ==
None, then the parameter "duration"
will not be taken into account, since there will be no
animation. Regardless of whether there was an animation or not, the Callback will be called at the very end method.
Parameters:
bool fade
Hide with fade-in animation. Default value: false
float duration
Animation duration. Default value: 0f
AnimationType animation
Selecting the animation type. Default value: None
Action <ResultCallback> Callback
Callback at the end of the
animation. Default value: null
Example:
webView.Hide();
webView.Hide(true);
webView.Hide(true, 5f, AnimationType.Slide_Up,(result) => {
print("web view animation
is finished!");
});
webView.Hide(true, 5f, AnimationType.Slide_Up);
void EvaluateJavaScript
(string jsCode, Action
<ResultCallback> Callback)
Evaluate JavaScript on the current page. The current method adds JavaScript
code to the page and executes the specified code.Important:
JavaScript must be enabled, otherwise the method will not work
Parameters:
string jsCode
The javascript string.
Action <ResultCallback> Callback
The callback is called when the
JavaScript operation completes .The result is in "ResultCallback.result" in string. Default value: null
Example:
webView.EvaluateJavaScript("document.body.style.backgroundColor =
'#212121';");
webView.EvaluateJavaScript("(function() {
return 'this'; })();", (result) => {
print(result.Result);
});
void AddJavaScript
(string jsCode, Action
<ResultCallback> Callback)
Adds JavaScript on the current page. The current method adds JavaScript code
to
the page and executes the specified code.Important:
JavaScript must be enabled, otherwise the method will not work
Parameters:
string jsCode
The javascript string.
Action <ResultCallback> Callback
The callback is called when the
JavaScript operation completes .The result is in "ResultCallback.result" in string. Default value: null
Example:
webView.AddJavaScript("document.body.style.backgroundColor =
'#212121';");
webView.AddJavaScript("(function() {
return 'this'; })();", (result) => {
print(result.Result);
});
void GetHTMLCode
(bool unescape, Action
<ResultCallback> Callback)
Get the html code loaded into the current webview.Important:
JavaScript must be enabled, otherwise the method will not work
Parameters:
bool unescape
Do I need to replace escape unicode
characters with ascii or delete them if conversion is not possible (Example: "\u0442" is
converted to "T")
Action <ResultCallback> Callback
Returns the loaded HTML code in
the current web view.The result is in "ResultCallback.result" in string.
Example:
webView.LoadUrl("https://example.com");
webView.GetHTMLCode(false,(result) => {
print(result.Result);
});
webView.GetHTMLCode(true,(result) => {
print(result.Result);
});
void SetSize
(int x, int
y, int width,
int height)
Sets the size and position of the current web view. Important: When calling this method, sets fullscreen == false and
TargetFrame == null
for the current web view. (After that, you need to manually handle the device orientation
changes).
Parameters:
int x
Position by X
int y
Position by Y
int width
Width of the current web view
int height
Height of the current web view
Example:
webView.SetSize(0,0,1080,1920);
void ScrollTo
(int x, int
y, bool animate)
Scroll to the specified coordinates in the current web view.
Parameters:
int x
Position by X
int y
Position by Y
bool animate
Smooth scrolling to the specified
coordinates. Default value: false
Example:
webView.ScrollTo(0,500);
webView.ScrollTo(0,500,true);
int GetMaxScrolledPage()
Getting the page height with content in the current web view.
Example:
webView.LoadUrl("https://example.com");
int HeightPage =
webView.GetMaxScrolledPage();
print(HeightPage);
bool IsInitialized()
Is the webview initialized.
void AddUrlCustomScheme
(string scheme)
Adding a schema to manually process it in OnReceivedData in the current web
webView.Scheme "wellwebview" is added by default.
Parameters:
string scheme
scheme without ://
Example:
webView.AddUrlCustomScheme("customscheme");
void RemoveUrlCustomScheme
(string scheme)
Remove the schema for manual process it in OnReceivedData in the current web
webView.
Parameters:
string scheme
scheme without ://
Example:
webView.RemoveUrlCustomScheme("customscheme");
void SetUserAgent
(string UserAgent)
Sets the user agent in the current web view.
Parameters:
string UserAgent
new user agent in current web view
Example:
webView.SetUserAgent("Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B)
AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile
Safari/535.19");
string GetUserAgent()
Getting the user agent in the current web view.
Example:
webView.GetUserAgent();
webView.SetUserAgent("Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B)
AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile
Safari/535.19");
webView.GetUserAgent();
void Print()
Print the loaded page in the current web view.
Example:
webView.Print();
void ShowProgressBar
(string HexColor)
Show the progress bar while loading pages.
Parameters:
string HexColor
Progress fill color in Hex-color. Default
value: #87cefa
Example:
webView.ShowProgressBar("#ff9966");
void HideProgressBar()
Hide the progress bar.
Example:
webView.HideProgressBar();
static void SetAllowAutoPlay
(bool AutoPlay)
Allow autoplay media playback in web views that you create.The default value
is:false. Important:called
before initializing the web view, otherwise
the method will not work on already created web views.
Parameters:
bool AutoPlay
Autoplay media playback.
Example:
webView.LoadUrl("https://example.com");
WellWebView.SetAllowAutoPlay(true);
WellWebView.SetAllowAutoPlay(true);
WellWebView WebView = WellWebView.CreateWebView();
WebView.Init();
WebView.OnFinishedInit += (webView) => {
webView.LoadUrl("https://example.com");
};
static void SetAllowJavaScript
(bool EnableJavaScript)
Allow JavaScript in web views that you create.The default value is:false. Important:called
before initializing the web view, otherwise
the method will not work on already created web views.
Parameters:
bool EnableJavaScript
Allow JavaScript execution.
Example:
webView.EvaluateJavaScript("document.body.style.backgroundColor = '#212121';");
WellWebView.SetAllowJavaScript(true);
WellWebView WebView = WellWebView.CreateWebView();
WebView.Init();
WebView.OnFinishedInit += (webView) => {
webView.EvaluateJavaScript("document.body.style.backgroundColor = '#212121';");
};
WebView.EvaluateJavaScript("(function(){ return 'this'; })();", (result) =>
{
print(result.Result);
});
void SetZoomEnabled
(bool EnableZoom)
Allow zoom content in the current web view.The default value is: false
Parameters:
bool EnableZoom
Allow zoom content.
Example:
webView.SetZoomEnabled(true);
void SetHorizontalScrollBarEnabled
(bool Enable)
Enabling the horizontal scroll bar in the current web view.The default value
is: false
Parameters:
bool Enable
Enabling the horizontal scroll bar.
Example:
webView.SetHorizontalScrollBarEnabled(true);
void SetVerticalScrollBarEnabled
(bool Enable)
Enabling the vertical scroll bar in the current web view.The default value
is: false
Parameters:
bool Enable
Enabling the vertical scroll bar.
Example:
webView.SetVerticalScrollBarEnabled(true);
void SetUserInteraction
(bool Interaction)
User interaction with the current web view. The default value is: true
Parameters:
bool Interaction
User interaction.
Example:
webView.SetUserInteraction(false);
void SetSupportMultipleWindows
(bool support)
Sets whether the web view should support pop-up web views launched by the
user on a new tab.In browsers (such as Google Chrome, Safari, etc.), these tabs open on new
pages. But in
the context of a web view, it is not possible to manage different tabs.So by default, the web
view
tries to load this link in the current web view. But there are sites that can not properly
handle this
option and for them it is acceptable only to open a new window(Enable support multiple windows)
(we will
open a new instance of the web view that repeats the size of the original web view on top of it,
and when
you close the tab, this instance will be deleted and the user will return to the original web
view). The
default value is: false
Parameters:
bool support
Support for multiple windows.
Example:
webView.SetSupportMultipleWindows(true);
static void SetJavaScriptCanOpenWindowsAutomatically
(bool Enable)
Tells JavaScript to open windows automatically. This applies to the
JavaScript
function window.open().The default value is: false. Important:Must be enabled support multiple windows. Called
before initializing the web view, otherwise the method will not work on already created web
views.
Parameters:
bool Enable
Tells JavaScript to open windows automatically.
Example:
webView.EvaluateJavaScript("window.open("https://example.com");");
WellWebView.SetJavaScriptCanOpenWindowsAutomatically(true);
WellWebView WebView = WellWebView.CreateWebView();
WebView.Init();
WebView.OnFinishedInit += (webView) =>
{
webView.SetSupportMultipleWindows(true);
webView.EvaluateJavaScript("window.open("https://example.com");");
};
bool CanGoBack()
Is it possible to go back to the previous page in the current web view.
bool CanGoForward()
Is it possible to return to the forward page in the current web view.
void GoBack()
Go back to the previous page in the current web view.
Example:
webView.GoBack();
void GoForward()
Go forward page in the current web view.
Example:
webView.GoForward();
void AllowShowSslDialog(bool Allow)
Allow to show the ssl error dialog box to prohibit or allow page loading
(Android
only). The default value is: false
Parameters:
bool Allow
Allow to show the ssl error dialog box.
Example:
webView.AllowShowSslDialog(true);
void UpdateCookie()
Force call to save cookies in the current web view.The web view automatically
adjusts the saving of cookies, but to trigger the saving manually, you can use this method.
Example:
webView.UpdateCookie();
void ClearCookies()
Clears all cookies from web view.
Example:
webView.ClearCookies();
void AddCookie(string url,string Cookies)
Sets a cookie for a specific address. By default, the web view uses
server-side
cookies. However, if you need to manually pass a cookie, use this method.
Parameters:
string url
The URL for which the cookie will be set
string Cookies
The cookie string to set
Example:
webView.AddCookie("https://example.com
","name=23frfjkiji;");
webView.AddCookie("https://example.com
","version=2; name=Test;
value=1234;expiresDate=Wed, 30-Nov-2001 01:01:01 GMT; domain=example.com;");
string GetCookie(string url,string Key)
Returns the value of the cookie by url and key.
Parameters:
string url
The URL where the cookie is located
string Key
Key for finding the value in the cookie
Example:
webView.GetCookie("example.com","TestKey");
void ShowSpinner(bool Enable)
Show the loading spinner while loading pages in the current web view. The
default
value is: false
Parameters:
bool Enable
Show the loading spinner.
Example:
webView.ShowSpinner(true);
void SetSpinnerText(string text)
Sets text for the loading spinner in the current web view.
Parameters:
string text
text for the loading spinner.
Example:
webView.SetSpinnerText("LoadingText");
static void AllowInlinePlay(bool allow)
Sets how HTML5 videos will be played inline or using the built-in fullscreen
controller (IOS only).The default value is: false (videos
play using the built-in fullscreen controller). Important:Called before initializing the web view, otherwise
the method will not work on already created web views.
Parameters:
bool allow
Allow Inline Play.
Example:
WellWebView.AllowInlinePlay(true);
WellWebView WebView = WellWebView.CreateWebView();
WebView.Init();
void SetLoadWithOverviewMode(bool
overview)
Sets whether the WebView loads pages in overview mode, that is, zooms out the
content to fit on screen by width. This setting is taken into account when the content width is
greater
than the width of the WebView control, for example, when SetUseWideViewPort() is enabled
(Android only).
The default value is: false
Parameters:
bool overview
overview
Example:
WebView.Android.SetLoadWithOverviewMode(true);
void SetUseWideViewPort(bool
use)
Sets whether the WebView should enable support for the "viewport" HTML meta
tag or should use a wide viewport. When the value of the setting is false, the layout width is
always
set to the width of the WebView control in device-independent (CSS) pixels. When the value is
true and
the page contains the viewport meta tag, the value of the width specified in the tag is used. If
the page
does not contain the tag or does not provide a width, then a wide viewport will be used (Android
only). The default value is: false
Parameters:
bool use
Enable support for the "viewport" HTML meta tag
Example:
WebView.Android.SetUseWideViewPort(true);
void SetDefaultFontSize(int
fontSize)
Sets the default font size in current web view (Android only). The default
value is: 16
Parameters:
int fontSize
a non-negative integer between 1 and 72.
Any number outside the specified range will be pinned.
Example:
WebView.Android.SetDefaultFontSize(24);
void ShowNavigationBar(bool
show)
Unity for Android , sets the default fullscreen theme, which does not provide
for the
display of the navigation bar.But if you need a navigation bar, then use this method (Android
only). The
default value is: false Important:Activating the navigation bar without specifying
the appropriate theme in the manifest may work unpredictably on some devices.
Parameters:
bool show
Is the navigation bar shown
Example:
WebView.Android.ShowNavigationBar(true);
void AllowBackForwardNavigationGestures(bool
allow)
Sets whether horizontal swipe gestures trigger backward and forward page
navigation in the current web view (IOS only). The default value is: false
Parameters:
bool allow
Allow navigation gestures
Example:
WebView.IOS.AllowBackForwardNavigationGestures(true);
void ShowToolBar(bool
OnTop, bool
Animate, bool AdjustInset)
Sets the toolbar display in the current web view. You can select the position
of the
toolbar at the bottom or top of the screen. Show with animation or not. So should there be an
offset of the web view to show the toolbar, or will it overlap some of the content of the web
view. There
are 3 buttons on the toolbar, 2 buttons on the left are: back and forward buttons, on the right
is the Done
button (you can get the Ondonebuttoncliked callback in Unity by clicking on it).Their text can
also be changed using the appropriate methods:
SetBackButtonText(), SetForwardButtonText(), SetDoneButtonText() (IOS Only).
Parameters:
bool OnTop
The position of the toolbar. Default value: true
bool Animate
Animated show. Default value: false
bool AdjustInset
Slide the web view from the top to
avoid overlapping the web view. Default value: false
Example:
WebView.IOS.ShowToolBar(true,true,true);
void HideToolBar(bool
Animate)
Hide the toolbar in the current web view (IOS only).
Parameters:
bool Animate
Hide smooth. Default value: false
Example:
WebView.IOS.HideToolBar(true);
void SetBackButtonText(string
Title)
Sets the text for the Back button in the toolbar in the current web view (IOS
only).
Parameters:
string Title
Text for the Back button.
Example:
WebView.IOS.SetBackButtonText("Back");
void SetForwardButtonText(string
Title)
Sets the text for the Forward button in the toolbar in the current web view
(IOS
only).
Parameters:
string Title
Text for the Forward button.
Example:
WebView.IOS.SetForwardButtonText("Forward");
void SetDoneButtonText(string
Title)
Sets the text for the Done button in the toolbar in the current web view (IOS
only).
Parameters:
string Title
Text for the Done button.
Example:
WebView.IOS.SetDoneButtonText("Done");
void SetToolbarTextSize(int
TextSize)
Sets the size of the button text in the toolbar (IOS only).
Parameters:
int TextSize
Text size.
Example:
WebView.IOS.SetToolbarTextSize(24);
void AddDownloadMimeType(string
MimeType, string
FileExtension)
Adds the MIME type to the download files checklist.Only the added mimetypes
will be
checked for download capability. (IOS only).
Parameters:
string MimeType
MIME type.
string FileExtension
The default file extension for this
type is MIME type (if it is not specified in the file download request itself)
Example:
WebView.IOS.AddDownloadMimeType("application/pdf","pdf");
WebView.IOS.AddDownloadMimeType("audio/aac","aac");
void RemoveDownloadMimeType(string
MimeType)
Remove the MIME type in the download files checklist. (IOS only).
Parameters:
string MimeType
MIME type.
Example:
WebView.IOS.RemoveDownloadMimeType("application/pdf");
void SetToolbarTintColor(string
HexColor)
Sets the toolbar color. (IOS only).
Parameters:
string HexColor
Sets color in Hex-color.
Example:
WebView.IOS.SetToolbarTintColor("#87cefa");
void SetToolbarTextColor(string
HexColor)
Sets the toolbar text color. (IOS only).
Parameters:
string HexColor
Sets color in Hex-color.
Example:
WebView.IOS.SetToolbarTextColor("#87cefa");