Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c788b4d

Browse files
Added nullability
1 parent a884b28 commit c788b4d

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

‎TOWebViewController/TOWebViewController.h‎

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#import <UIKit/UIKit.h>
2424

25+
NS_ASSUME_NONNULL_BEGIN
26+
2527
@interface TOWebViewController : UIViewController <UIWebViewDelegate>
2628

2729
/**
@@ -45,34 +47,34 @@
4547
/**
4648
Get/set the current URL being displayed. (Will automatically start loading)
4749
*/
48-
@property (nonatomic,strong) NSURL *url;
50+
@property (nonatomic,strong) NSURL *url;
4951

5052
/**
5153
Get/set the request
5254
*/
53-
@property (nonatomic,strong) NSMutableURLRequest *urlRequest;
55+
@property (nonatomic,strong) NSMutableURLRequest *urlRequest;
5456

5557
/**
5658
The web view used to display the HTML content. You can access it through this
5759
read-only property if you need to anything specific, such as having it execute arbitrary JS code.
5860
5961
@warning Usage of the web view's delegate property is reserved by this view controller. Do not set it to another object.
6062
*/
61-
@property (nonatomic,readonly) UIWebView *webView;
63+
@property (nonatomic,readonly) UIWebView *webView;
6264

6365
/**
6466
Shows a loading progress bar underneath the top navigation bar.
6567
6668
Default value is YES.
6769
*/
68-
@property (nonatomic,assign) BOOL showLoadingBar;
70+
@property (nonatomic,assign) BOOL showLoadingBar;
6971

7072
/**
7173
Shows the URL of the web request currently being loaded, before the page's title attribute becomes available.
7274
7375
Default value is YES.
7476
*/
75-
@property (nonatomic,assign) BOOL showUrlWhileLoading;
77+
@property (nonatomic,assign) BOOL showUrlWhileLoading;
7678

7779
/**
7880
The tint colour of the page loading progress bar.
@@ -81,14 +83,14 @@
8183
8284
Default value is nil.
8385
*/
84-
@property (nonatomic,copy) UIColor *loadingBarTintColor;
86+
@property (nonatomic,copy, nullable) UIColor *loadingBarTintColor;
8587

8688
/**
8789
Hides all of the page navigation buttons, and on iPhone, hides the bottom toolbar.
8890
8991
Default value is NO.
9092
*/
91-
@property (nonatomic,assign) BOOL navigationButtonsHidden;
93+
@property (nonatomic,assign) BOOL navigationButtonsHidden;
9294

9395
/**
9496
An array of `UIBarButtonItem` objects that will be inserted alongside the default navigation
@@ -97,104 +99,106 @@
9799
These buttons will remain visible, even if `navigationButtonsHidden` is set to YES.
98100
99101
*/
100-
@property (nonatomic,copy) NSArray *applicationBarButtonItems;
102+
@property (nonatomic,copy, nullable) NSArray *applicationBarButtonItems;
101103

102104
/**
103105
Unlike `applicationBarButtonItems`, `UIBarButtonItem` objects placed set here
104106
will ALWAYS remain on the left hand side of this controller's `UINavigationController`.
105107
*/
106-
@property (nonatomic, copy) NSArray *applicationLeftBarButtonItems;
108+
@property (nonatomic, copy, nullable) NSArray *applicationLeftBarButtonItems;
107109

108110
/**
109111
An array of `UIBarButtonItem` objects from `applicationBarButtonitems` that will
110112
disabled until pages are completely loaded.
111113
*/
112-
@property (nonatomic,copy) NSArray *loadCompletedApplicationBarButtonItems;
114+
@property (nonatomic,copy, nullable) NSArray *loadCompletedApplicationBarButtonItems;
113115

114116
/**
115117
Shows the iOS 'Activty' button, which when tapped, presents a series of actions the user may
116118
take, including copying the page URL, tweeting the URL, or switching to Safari or Chrome.
117119
118120
Default value is YES.
119121
*/
120-
@property (nonatomic,assign) BOOL showActionButton;
122+
@property (nonatomic,assign) BOOL showActionButton;
121123

122124
/**
123125
Shows the Done button when presented modally. When tapped, it dismisses the view controller.
124126
125127
Default value is YES.
126128
*/
127-
@property (nonatomic,assign) BOOL showDoneButton;
129+
@property (nonatomic,assign) BOOL showDoneButton;
128130

129131
/**
130132
If desired, override the title of the system 'Done' button to this string.
131133
132134
Default value is nil.
133135
*/
134-
@property (nonatomic,copy) NSString *doneButtonTitle;
136+
@property (nonatomic,copy, nullable) NSString *doneButtonTitle;
135137

136138
/**
137139
When web pages are loaded, the view controller's title property will be set to the page's
138140
HTML title attribute.
139141
140142
Default value is YES.
141143
*/
142-
@property (nonatomic,assign) BOOL showPageTitles;
144+
@property (nonatomic,assign) BOOL showPageTitles;
143145

144146
/**
145147
View controller's title property will be set to the page's host. www prefix will be stripped
146148
147149
Default value is NO.
148150
*/
149-
@property (nonatomic,assign) BOOL showPageHost;
151+
@property (nonatomic,assign) BOOL showPageHost;
150152

151153
/**
152154
Disables the contextual popups that can appear when the user taps and holds on a page link.
153155
154156
Default value is NO.
155157
*/
156-
@property (nonatomic,assign) BOOL disableContextualPopupMenu;
158+
@property (nonatomic,assign) BOOL disableContextualPopupMenu;
157159

158160
/**
159161
Hides the default system background behind the outer bounds of the webview, and replaces it with
160162
a background color derived from the the page content currently being displayed by the web view.
161163
162164
Default value is NO.
163165
*/
164-
@property (nonatomic,assign) BOOL hideWebViewBoundaries;
166+
@property (nonatomic,assign) BOOL hideWebViewBoundaries;
165167

166168
/**
167169
When the view controller is being presented as a modal popup, this block will be automatically performed
168170
right after the view controller is dismissed.
169171
*/
170-
@property (nonatomic,copy) void (^modalCompletionHandler)(void);
172+
@property (nonatomic,copy, nullable) void (^modalCompletionHandler)(void);
171173

172174
/**
173175
An optional block that when set, will have each incoming web load request forwarded to it, and can
174176
determine whether to let them proceed or not.
175177
*/
176-
@property (nonatomic,copy) BOOL (^shouldStartLoadRequestHandler)(NSURLRequest *request, UIWebViewNavigationType navigationType);
178+
@property (nonatomic,copy, nullable) BOOL (^shouldStartLoadRequestHandler)(NSURLRequest *request, UIWebViewNavigationType navigationType);
177179

178180
/**
179181
An optional block that when set, will be triggered if the web view failed to load a frame.
180182
*/
181-
@property (nonatomic,copy) void (^didFailLoadWithErrorRequestHandler)(NSError *error);
183+
@property (nonatomic,copy, nullable) void (^didFailLoadWithErrorRequestHandler)(NSError *error);
182184

183185
/**
184186
An optional block that when set, will be triggered each time the web view has finished a load operation.
185187
*/
186-
@property (nonatomic,copy) void (^didFinishLoadHandler)(UIWebView *webView);
188+
@property (nonatomic,copy, nullable) void (^didFinishLoadHandler)(UIWebView *webView);
187189

188190
/**
189191
This can be used to override the default tint color of the navigation button icons.
190192
This property is mainly for iOS 6 and lower. Where possible, you should use iOS 7's proper color styling
191193
system instead.
192194
*/
193-
@property (nonatomic,strong) UIColor *buttonTintColor;
195+
@property (nonatomic,strong, nullable) UIColor *buttonTintColor;
194196

195197
/**
196198
On iOS 6 or below, this overrides the default opacity level of the bevel around the navigation buttons.
197199
*/
198-
@property (nonatomic,assign) CGFloat buttonBevelOpacity;
200+
@property (nonatomic,assign) CGFloat buttonBevelOpacity;
199201

200202
@end
203+
204+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /