Skip to content

Commit bcc7827

Browse files
Copilotppaulojr
andcommitted
Address code review: make WKWebView a private ivar, fix direct scrollView access
Co-authored-by: ppaulojr <1206478+ppaulojr@users.noreply.github.com>
1 parent 85eb103 commit bcc7827

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

PopulationClock/CountryInfoWebView.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
@interface CountryInfoWebView : UIView
1212

13-
@property (nonatomic, readonly) WKWebView *webView;
1413
@property (nonatomic, readonly) UIScrollView *scrollView;
1514

1615
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL;

PopulationClock/CountryInfoWebView.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#import "StatsBuilder.h"
1515

1616
@implementation CountryInfoWebView {
17+
WKWebView *_webView;
1718
NSString *_selectedCountry;
1819
CALayer *_shadowLayer;
1920

@@ -46,7 +47,7 @@ - (void)awakeFromNib {
4647
dispatch_set_target_queue(_backgroundQueue, lowPriorityQueue);
4748

4849
// Disable bouncing
49-
self.scrollView.bounces = NO;
50+
_webView.scrollView.bounces = NO;
5051

5152
// Observe changes to the country selection
5253
[[NSNotificationCenter defaultCenter] addObserver:self

0 commit comments

Comments
 (0)