Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions HeaderWebView/EmailView.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ - (void)awakeFromNib
}

#pragma mark -
#pragma mark - NSKeyObserving
#pragma mark - Interface layout

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
- (void)updateLayout
{
// Update the frame of the header view so that it scrolls with the webview content
CGRect newFrame = self.headerView.frame;
Expand All @@ -70,6 +70,14 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
[self.fullScreenDelegate emailView:self showFullScreen:fullScreen];
}

#pragma mark -
#pragma mark - NSKeyObserving

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
[self updateLayout];
}

#pragma mark -
#pragma mark - UIScrollViewDelegate

Expand Down Expand Up @@ -142,6 +150,8 @@ - (void)layoutSubviews
newFrame.origin.y = CGRectGetHeight(self.headerView.frame);
[subview setFrame:newFrame];
}

[self updateLayout];
}

#pragma mark -
Expand Down
5 changes: 5 additions & 0 deletions HeaderWebView/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,10 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>