iAd Class
The iAd class encapsulated the Apple iAd banner advertisements. This class is available only on iOS. On iPhone, a portrait banner is 320 points by 50 points in size. On iPad, a portrait banner is 768 points by 66 points in size. On iPhone, a landscape banner is 480 points by 32 points in size. On iPad, a landscape banner is 1024 points by 66 points in size.
Item Index
Methods
Events
Methods
this
()
Constructs new instance of iAd object.
call
thisObj
[p]
Invokes the function in context of this set to thisObj.
Parameters:
-
thisObj
Object -
[p]
Object optional
Returns:
clone
() Object
Makes copy of the object and returns it.
Returns:
debugShow
out=console
[p]
Reports class name and list of property name/values of the object. Intended to use for debugging purposes.
Parameters:
-
out=console
StreamStream for output, the default is console.
-
[p]
Object optional
Returns:
eval
what
[namespace]
Evaluates (interprets) what with context of this equal to the object. If namespace object is given then it is used as global namespace for evaluated code.
Parameters:
Example:
var obj = new Object();
obj.number = 3;
obj.eval("number = number*number", obj);
obj.number; // 9
exists
tag
[deep=false]
Checks property by its tag for existence.
Parameters:
-
tag
SymbolSymbol of the property.
-
[deep=false]
Boolean optionalIf deep == true then does deep lookup - in function itself and its chain of classes.
Returns:
hide
()
This method hides ad banner.
propertyAt
tag
Does lookup in the object for member/property by its tag. This is a direct equivalent of obj.tag construction. Be patient when using propertyAt in "property undefined handler". It can leads to "Stack overflow" exception, because propertyAt can call "property undefined handler". See also exists functions.
Parameters:
-
tag
Symbol
remove
tag
Removes property of the function by its tag (a.k.a. name).
Parameters:
-
tag
SymbolSymbol of the property.
Returns:
show
x
y
This method creates and shows ad banner at specified position on screen.
Parameters:
Example:
var iAd = new iAd();
adMob.show(0, 0);
toString
()
Returns string "[object Object]".
valueOf
() Object
Returns object itself.
Returns:
Properties
className
String
Name of the class if object was created as instance of user defined class.
Example:
class Clazz
{
}
var instance = new Clazz();
var obj = { };
// obj has "undefined" className
assert obj.className == undefined;
// instance has "Clazz" className
assert instance.className == "Clazz";