|
28 | 28 |
|
29 | 29 | @interface TOWebViewController : UIViewController
|
30 | 30 |
|
| 31 | +/** |
| 32 | + Initializes a new `TOWebViewController` object with the specified URL. |
| 33 | + |
| 34 | + @param url The URL to the web page that the controller will initially display. |
| 35 | + |
| 36 | + @return The newly initialized `TOWebViewController` object. |
| 37 | + */ |
31 | 38 | - (instancetype)initWithURL:(NSURL *)url;
|
| 39 | + |
| 40 | +/** |
| 41 | + Initializes a new `TOWebViewController` object with the specified URL string. |
| 42 | + |
| 43 | + @param url The URL as a string, of the web page that the controller will initially display. |
| 44 | + |
| 45 | + @return The newly initialized `TOWebViewController` object. |
| 46 | + */ |
32 | 47 | - (instancetype)initWithURLString:(NSString *)urlString;
|
33 | 48 |
|
34 |
| -/* Get/set the current URL being displayed. (Will automatically start loading) */ |
| 49 | +/** |
| 50 | + Get/set the current URL being displayed. (Will automatically start loading) |
| 51 | + */ |
35 | 52 | @property (nonatomic,strong) NSURL *url;
|
36 | 53 |
|
37 |
| -/* The web view used to display the web content. */ |
| 54 | +/** |
| 55 | + The web view used to display the HTML content. You can access it through this |
| 56 | + read-only property if you need to anything specific, such as having it execute arbitrary JS code. |
| 57 | + |
| 58 | + @warning Usage of the web view's delegate property is reserved by this view controller. Do not set it to another object. |
| 59 | + */ |
38 | 60 | @property (nonatomic,readonly) UIWebView *webView;
|
39 | 61 |
|
40 |
| -/* Show the loading progress bar (default YES) */ |
| 62 | +/** |
| 63 | + Shows a loading progress bar underneath the top navigation bar. |
| 64 | + |
| 65 | + Default value is YES. |
| 66 | + */ |
41 | 67 | @property (nonatomic,assign) BOOL showLoadingBar;
|
42 | 68 |
|
43 |
| -/* Show the URL while loading the page, i.e. before the page's <title> tag is available (default YES) */ |
| 69 | +/** |
| 70 | + Shows the URL of the web request currently being loaded, before the page's <title> attribute becomes available. |
| 71 | + |
| 72 | + Default value is YES. |
| 73 | + */ |
44 | 74 | @property (nonatomic,assign) BOOL showUrlWhileLoading;
|
45 | 75 |
|
46 |
| -/* Tint colour for the loading progress bar. Default colour is iOS system blue. */ |
| 76 | +/** |
| 77 | + The tint colour of the page loading progress bar. |
| 78 | + If not set on iOS 7 and above, the loading bar will defer to the app's global UIView tint color. |
| 79 | + If not set on iOS 6 or below, it will default to the standard system blue tint color. |
| 80 | + |
| 81 | + Default value is nil. |
| 82 | + */ |
47 | 83 | @property (nonatomic,copy) UIColor *loadingBarTintColor;
|
48 | 84 |
|
49 |
| -/* Show all of the navigation/action buttons (ON by default) */ |
| 85 | +/** |
| 86 | + Hides all of the page navigation buttons, and on iPhone, hides the bottom toolbar. |
| 87 | + |
| 88 | + Default value is NO. |
| 89 | + */ |
50 | 90 | @property (nonatomic,assign) BOOL navigationButtonsHidden;
|
51 | 91 |
|
52 |
| -/* Show the 'Action' button instead of the stop/refresh button (YES by default)*/ |
| 92 | +/** |
| 93 | + Shows the iOS 'Activty' button, which when tapped, presents a series of actions the user may |
| 94 | + take, including copying the page URL, tweeting the URL, or switching to Safari or Chrome. |
| 95 | + |
| 96 | + Default value is YES. |
| 97 | + */ |
53 | 98 | @property (nonatomic,assign) BOOL showActionButton;
|
54 | 99 |
|
55 |
| -/* Disable the contextual popup that appears if the user taps and holds on a link. */ |
| 100 | +/** |
| 101 | + Disables the contextual popups that can appear when the user taps and holds on a page link. |
| 102 | + |
| 103 | + Default value is NO. |
| 104 | + */ |
56 | 105 | @property (nonatomic,assign) BOOL disableContextualPopupMenu;
|
57 | 106 |
|
58 |
| -/* Hide the gray/linin background and all shadows and use the same colour as the current page */ |
| 107 | +/** |
| 108 | + Hides the default system background behind the outer bounds of the webview, and replaces it with |
| 109 | + a background color derived from the the page content currently being displayed by the web view. |
| 110 | + |
| 111 | + Default value is NO. |
| 112 | + */ |
59 | 113 | @property (nonatomic,assign) BOOL hideWebViewBoundaries;
|
60 | 114 |
|
61 |
| -/* When being presented as modal, this optional block can be performed after the users dismisses the controller. */ |
| 115 | +/** |
| 116 | + When the view controller is being presented as a modal popup, this block will be automatically performed |
| 117 | + right after the view controller is dismissed. |
| 118 | + */ |
62 | 119 | @property (nonatomic,copy) void (^modalCompletionHandler)(void);
|
63 | 120 |
|
64 |
| -/* On iOS 6 or below, this can be used to override the default fill color of the navigation button icons */ |
| 121 | +/** |
| 122 | + On iOS 6 or below, this can be used to override the default fill color of the navigation button icons. |
| 123 | + */ |
65 | 124 | @property (nonatomic,strong) UIColor *buttonTintColor UI_APPEARANCE_SELECTOR;
|
66 | 125 |
|
67 |
| -/* On iOS 6 or below, this overrides the default opacity level of the bevel around the navigation buttons */ |
| 126 | +/** |
| 127 | + On iOS 6 or below, this overrides the default opacity level of the bevel around the navigation buttons. |
| 128 | + */ |
68 | 129 | @property (nonatomic,assign) CGFloat buttonBevelOpacity UI_APPEARANCE_SELECTOR;
|
69 | 130 |
|
70 | 131 | @end
|
0 commit comments