Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Small fixes after testing on device.

  • Loading branch information...
commit fc24fa01807d9b1fcc528275cc371a76aa456d50 1 parent 4636568
Sam Vermette samvermette authored
2  Demo/Classes/ViewController.m
View
@@ -22,7 +22,7 @@ - (void)pushWebViewController {
- (void)presentWebViewController {
- SVWebViewController *webViewController = [[SVWebViewController alloc] initWithAddress:@"http://wikipedia.org"];
+ SVWebViewController *webViewController = [[SVWebViewController alloc] initWithAddress:@"http://en.wikipedia.org/wiki/Friday_(Rebecca_Black_song)"];
webViewController.modalPresentationStyle = UIModalPresentationPageSheet;
[self presentModalViewController:webViewController animated:YES];
[webViewController release];
2  Demo/SVWeb.xcodeproj/project.pbxproj
View
@@ -225,6 +225,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SVWeb_Prefix.pch;
INFOPLIST_FILE = "SVWeb-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
PRODUCT_NAME = SVWeb;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -240,6 +241,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SVWeb_Prefix.pch;
INFOPLIST_FILE = "SVWeb-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
PRODUCT_NAME = SVWeb;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
14 SVWebViewController/SVWebViewController.m
View
@@ -246,6 +246,11 @@ - (void)viewDidDisappear:(BOOL)animated {
- (void)layoutSubviews {
CGRect deviceBounds = self.view.bounds;
+ if(UIInterfaceOrientationIsLandscape(self.interfaceOrientation) && !deviceIsTablet && !self.navigationController)
+ navBar.frame = CGRectMake(0, 0, CGRectGetWidth(deviceBounds), 32);
+ else if(UIInterfaceOrientationIsPortrait(self.interfaceOrientation) && !deviceIsTablet && !self.navigationController)
+ navBar.frame = CGRectMake(0, 0, CGRectGetWidth(deviceBounds), 44);
+
if(self.navigationController && deviceIsTablet)
self.webView.frame = CGRectMake(0, 0, CGRectGetWidth(deviceBounds), CGRectGetHeight(deviceBounds));
else if(deviceIsTablet)
@@ -254,11 +259,6 @@ - (void)layoutSubviews {
self.webView.frame = CGRectMake(0, 0, CGRectGetWidth(deviceBounds), CGRectGetMaxY(self.view.bounds));
else if(!deviceIsTablet)
self.webView.frame = CGRectMake(0, CGRectGetMaxY(navBar.frame), CGRectGetWidth(deviceBounds), CGRectGetMinY(toolbar.frame)-CGRectGetMaxY(navBar.frame));
-
- if(UIInterfaceOrientationIsLandscape(self.interfaceOrientation) && !deviceIsTablet && !self.navigationController)
- navBar.frame = CGRectMake(0, 0, CGRectGetWidth(deviceBounds), 32);
- else if(UIInterfaceOrientationIsPortrait(self.interfaceOrientation) && !deviceIsTablet && !self.navigationController)
- navBar.frame = CGRectMake(0, 0, CGRectGetWidth(deviceBounds), 44);
backButton.frame = CGRectMake(CGRectGetWidth(deviceBounds)-180, 0, 44, 44);
forwardButton.frame = CGRectMake(CGRectGetWidth(deviceBounds)-120, 0, 44, 44);
@@ -438,7 +438,7 @@ - (void)showActions {
if([MFMailComposeViewController canSendMail])
- [actionSheet addButtonWithTitle:NSLocalizedString(@"Email", @"SVWebViewController")];
+ [actionSheet addButtonWithTitle:NSLocalizedString(@"Mail Link to this Page", @"SVWebViewController")];
[actionSheet addButtonWithTitle:NSLocalizedString(@"Cancel",@"SVWebViewController")];
actionSheet.cancelButtonIndex = [actionSheet numberOfButtons]-1;
@@ -466,7 +466,7 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger
if([[actionSheet buttonTitleAtIndex:buttonIndex] isEqualToString:NSLocalizedString(@"Open in Safari", @"SVWebViewController")])
[[UIApplication sharedApplication] openURL:self.webView.request.URL];
- else if([[actionSheet buttonTitleAtIndex:buttonIndex] isEqualToString:NSLocalizedString(@"Email", @"SVWebViewController")]) {
+ else if([[actionSheet buttonTitleAtIndex:buttonIndex] isEqualToString:NSLocalizedString(@"Mail Link to this Page", @"SVWebViewController")]) {
MFMailComposeViewController *emailComposer = [[MFMailComposeViewController alloc] init];
Please sign in to comment.
Something went wrong with that request. Please try again.