Skip to content

williamyiu/titanium-module-extended-webview

 
 

Repository files navigation

ExtendedWebView Module 0.2

Description

This module extends the original Ti.UI.WebView by adding several new features.

Installation

Extract the *.zip file in the root of this package.
Copy the module to your Titanium module folder, typically

~/Library/Application Support/Titanium/modules

Accessing the Module

To access this module from JavaScript, you would do the following:

var extendedWebView = require("de.mwfire.extwebview");

The extendedWebView variable is a reference to the Module object.

Reference

setZoomScale(float, { animated: BOOL })
Sets the zoom level of a WebView.
float optional, defaults to 0
animated optional, defaults to TRUE

scrollTo({ x:float, y:float, animated: BOOL })
Sets the zoom level of a WebView.
x optional, defaults to 0
y optional, defaults to 0
animated optional, defaults to TRUE

scrollToTop({ animated: BOOL })
Scrolls to the top of a WebView.
animated optional, defaults to TRUE

scrollToBottom({ animated: BOOL })
Scrolls to the bottom of a WebView.
animated optional, defaults to TRUE

Usage

Create an extended webview like in this example and add it to your window

var extendedWebView = require("de.mwfire.extwebview");
var webView = extendedWebView.createWebView({
    left            : 0,
    right           : 0,
    top             : 0,
    bottom          : 140,
    url             : "http://www.mwfire.de",
    scalesPageToFit : true
});
win.add(webView);

For method usage, see the example app.js.

Platform

Up to now, only iPhone is supported.
Minimum Titanium SDK is 3.1.0.GA
Supports iOS6 and later

Author

© 2013 Martin Wildfeuer
mwfire web development
www.mwfire.de

License

Licensed under the Apache License, Version 2.0 (the "License")

About

Extended Webview Module for Titanium (iOS)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published