public class UIWebView extends UIView
NoIntrinsicMetric
Constructor and Description |
---|
UIWebView()
Constructs a default UIWebView object located at (0,0) with 0 weight and
0 height.
|
UIWebView(CGRect rect)
Constructs a UIWebView object initialized with the dimensions and
position specified in the rect parameter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canGoBack()
Informs if this Web View could go back in history
|
boolean |
canGoForward()
Informs if this Web View could go forward in history
|
long |
dataDetectorTypes()
Returns the types of data that are viewed as clickable URLs in the web
view content.
|
UIWebViewDelegate |
delegate()
Returns the delegate.
|
void |
drawRect(CGRect rect)
This method is implicitly called when a view is first displayed or when
an event occurs that invalidates a visible part of the view and the view
needs to be redrawn.
|
void |
goBack()
Takes the previous location of the back-forward list and loads it to the
widget.
|
void |
goForward()
Takes the next location of the back-forward list and loads it to the
widget.
|
boolean |
isLoading() |
void |
loadData(NSData data,
String MIMEType,
String encodingName,
NSURL baseURL)
Loads the content of the main page as defined by the parameters.
|
void |
loadHTMLString(String data,
NSURL baseURL)
Sets the content of the main page as defined by the parameter data and
the base URL for the content.
|
void |
loadRequest(NSURLRequest request)
Loads the URL parameter asynchronously.
|
boolean |
mediaPlaybackRequiresUserAction() |
void |
reload()
Reloads the page.
|
boolean |
scalesPageToFit()
Returns a Boolean value that defines whether the webpage adapts
proportionally in order to fit the view.
|
UIScrollView |
scrollView()
Returns the scroll view of the web view.
|
void |
setDataDetectorTypes(long dataDetectorTypes)
Sets the types of data that will be viewed as clickable URLs in the web
view content.
|
void |
setDelegate(UIWebViewDelegate delegate)
Sets as delegate the one defined as parameter.
|
void |
setMediaPlaybackRequiresUserAction(boolean ua) |
void |
setScalesPageToFit(boolean scalesPageToFit)
Sets a Boolean value that defines whether the webpage adapts
proportionally in order to fit the view.
|
String |
stringByEvaluatingJavaScriptFromString(String script)
Returns the result of running a script.
|
void |
touchesBegan(Set<UITouch> touches,
UIEvent event)
Sent to this responder when one or more fingers touched the screen.
|
void |
touchesCancelled(Set<UITouch> touches,
UIEvent event)
Sent to this responder when touch event has been canceled.
|
void |
touchesEnded(Set<UITouch> touches,
UIEvent event)
Sent to this responder when one or more fingers were lifted from the
screen.
|
void |
touchesMoved(Set<UITouch> touches,
UIEvent event)
Sent to this responder when one or more fingers move on the screen.
|
accessibilityIdentifier, addConstraint, addConstraints, addGestureRecognizer, addLayoutGuide, addSubview, alpha, animateWithDuration, animateWithDuration, animateWithDuration, areAnimationsEnabled, autoresizesSubviews, autoresizingMask, backgroundColor, bottomAnchor, bounds, bringSubviewToFront, center, centerXAnchor, centerYAnchor, clipsToBounds, constraints, contentCompressionResistancePriorityForAxis, contentHuggingPriorityForAxis, contentMode, convertPointFromView, convertPointToView, convertRectFromView, convertRectToView, didAddSubview, didMoveToSuperview, didMoveToWindow, frame, gestureRecognizers, heightAnchor, hitTest, insertSubview, insetsLayoutMarginsFromSafeArea, intrinsicContentSize, invalidateIntrinsicContentSize, isHidden, isMultipleTouchEnabled, isOpaque, isUserInteractionEnabled, layer, layoutIfNeeded, layoutMargins, layoutMarginsDidChange, layoutMarginsGuide, layoutSubviews, leadingAnchor, leftAnchor, maskView, needsUpdateConstraints, nextResponder, overrideUserInterfaceStyle, pointInside, preservesSuperviewLayoutMargins, removeConstraint, removeConstraints, removeFromSuperview, removeGestureRecognizer, removeLayoutGuide, requiresConstraintBasedLayout, restorationIdentifier, rightAnchor, safeAreaInsets, safeAreaLayoutGuide, sendSubviewToBack, setAccessibilityIdentifier, setAlpha, setAnimationBeginsFromCurrentState, setAnimationCurve, setAnimationDelay, setAnimationDuration, setAnimationRepeatAutoreverses, setAnimationRepeatCount, setAnimationsEnabled, setAnimationStartDate, setAutoresizesSubviews, setAutoresizingMask, setBackgroundColor, setBounds, setCenter, setClearsContextBeforeDrawing, setClipsToBounds, setContentCompressionResistancePriority, setContentHuggingPriority, setContentMode, setFrame, setGestureRecognizers, setHidden, setInsetsLayoutMarginsFromSafeArea, setLayoutMargins, setMaskView, setMultipleTouchEnabled, setNeedsDisplay, setNeedsLayout, setNeedsUpdateConstraints, setOpaque, setOverrideUserInterfaceStyle, setPreservesSuperviewLayoutMargins, setRestorationIdentifier, setTag, setTintAdjustmentMode, setTintColor, setTransform, setTranslatesAutoresizingMaskIntoConstraints, setUserInteractionEnabled, sizeThatFits, sizeToFit, subviews, superview, tag, tintAdjustmentMode, tintColor, tintColorDidChange, topAnchor, toString, trailingAnchor, transform, transitionWithView, translatesAutoresizingMaskIntoConstraints, updateConstraints, updateConstraintsIfNeeded, userInterfaceLayoutDirection, viewForFirstBaselineLayout, viewForLastBaselineLayout, widthAnchor, willMoveToSuperview, willMoveToWindow, willRemoveSubview, window
becomeFirstResponder, isFirstResponder, resignFirstResponder
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public UIWebView()
public UIWebView(CGRect rect)
rect
- The frame rectangle for the viewpublic void loadRequest(NSURLRequest request)
request
- The URL of the content to be loaded.public void loadHTMLString(String data, NSURL baseURL)
data
- The content of the main page.baseURL
- The base URL of the content.public void loadData(NSData data, String MIMEType, String encodingName, NSURL baseURL)
data
- The content of the main page.MIMEType
- The MIME type of the content.encodingName
- The encoding type.baseURL
- The base URL of the content.public String stringByEvaluatingJavaScriptFromString(String script)
script
- The script to run.public UIWebViewDelegate delegate()
public void setDelegate(UIWebViewDelegate delegate)
delegate
- The receiver's delegate.public void reload()
public boolean canGoBack()
public void goBack()
public boolean canGoForward()
public void goForward()
public long dataDetectorTypes()
public void setDataDetectorTypes(long dataDetectorTypes)
dataDetectorTypes
- The types of data that will be viewed as
clickable URLs.public boolean scalesPageToFit()
public void setScalesPageToFit(boolean scalesPageToFit)
scalesPageToFit
- Sets a Boolean value that defines whether the
webpage adapts proportionally to the view.public boolean isLoading()
public void touchesBegan(Set<UITouch> touches, UIEvent event)
UIResponder
touchesBegan
in class UIResponder
touches
- The set touches to which the touch or touches belongs.event
- The event to which the touches belong.public void touchesMoved(Set<UITouch> touches, UIEvent event)
UIResponder
touchesMoved
in class UIResponder
touches
- The set touches to which the touch or touches belongs.event
- The event to which the touches belong.public void touchesEnded(Set<UITouch> touches, UIEvent event)
UIResponder
touchesEnded
in class UIResponder
touches
- The set touches to which the touch or touches belongs.event
- The event to which the touches belong.public void touchesCancelled(Set<UITouch> touches, UIEvent event)
UIResponder
touchesCancelled
in class UIResponder
touches
- The set touches to which the touch belongs.event
- The event to which the touches belong.public final void drawRect(CGRect rect)
UIView
public void setMediaPlaybackRequiresUserAction(boolean ua)
public boolean mediaPlaybackRequiresUserAction()
public UIScrollView scrollView()
Copyright © 2020. All rights reserved.