Skip to content

Commit 82939f4

Browse files
committed
Raised the 'Action' icon button to appear more inline with the other navigation buttons, and also added appledoc formatting to the header
1 parent 00ad923 commit 82939f4

File tree

3 files changed

+77
-16
lines changed

3 files changed

+77
-16
lines changed

TOWebViewController.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Pod::Spec.new do |s|
22
s.name = 'TOWebViewController'
3-
s.version = '2.0.7'
3+
s.version = '2.0.8'
44
s.license = { :type => 'MIT', :file => 'LICENSE' }
5-
s.summary = 'A view controller for iOS that allows users to browse web pages from within an app.'
5+
s.summary = 'An inline browser view controller that allows users to view and navigate web pages from within an app.'
66
s.homepage = 'https://github.com/TimOliver/TOWebViewController'
77
s.author = 'Tim Oliver'
8-
s.source = { :git => 'https://github.com/TimOliver/TOWebViewController.git', :tag => '2.0.7' }
8+
s.source = { :git => 'https://github.com/TimOliver/TOWebViewController.git', :tag => '2.0.8' }
99
s.platform = :ios, '5.0'
1010

1111
s.source_files = 'TOWebViewController/**/*.{h,m}'

TOWebViewController/TOWebViewController.h

Lines changed: 73 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,43 +28,104 @@
2828

2929
@interface TOWebViewController : UIViewController
3030

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+
*/
3138
- (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+
*/
3247
- (instancetype)initWithURLString:(NSString *)urlString;
3348

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+
*/
3552
@property (nonatomic,strong) NSURL *url;
3653

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+
*/
3860
@property (nonatomic,readonly) UIWebView *webView;
3961

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+
*/
4167
@property (nonatomic,assign) BOOL showLoadingBar;
4268

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+
*/
4474
@property (nonatomic,assign) BOOL showUrlWhileLoading;
4575

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+
*/
4783
@property (nonatomic,copy) UIColor *loadingBarTintColor;
4884

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+
*/
5090
@property (nonatomic,assign) BOOL navigationButtonsHidden;
5191

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+
*/
5398
@property (nonatomic,assign) BOOL showActionButton;
5499

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+
*/
56105
@property (nonatomic,assign) BOOL disableContextualPopupMenu;
57106

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+
*/
59113
@property (nonatomic,assign) BOOL hideWebViewBoundaries;
60114

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+
*/
62119
@property (nonatomic,copy) void (^modalCompletionHandler)(void);
63120

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+
*/
65124
@property (nonatomic,strong) UIColor *buttonTintColor UI_APPEARANCE_SELECTOR;
66125

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+
*/
68129
@property (nonatomic,assign) CGFloat buttonBevelOpacity UI_APPEARANCE_SELECTOR;
69130

70131
@end

TOWebViewController/UIImage+TOWebViewControllerIcons.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ + (instancetype)TOWebViewControllerIcon_actionButtonWithAttributes:(NSDictionary
363363
{
364364
UIImage *actionButtonImage = nil;
365365
if (MINIMAL_UI) {
366-
UIGraphicsBeginImageContextWithOptions((CGSize){19,27}, NO, [[UIScreen mainScreen] scale]);
366+
UIGraphicsBeginImageContextWithOptions((CGSize){19,30}, NO, [[UIScreen mainScreen] scale]);
367367
{
368368
//// Color Declarations
369369
UIColor* actionColor = [UIColor blackColor];

0 commit comments

Comments
 (0)