50 self.title =
@"Capture Web Snippet";
53 + self.navigationController.navigationBar.frame.size.height;
56 UIImage *backgrdImage = [UIImage imageNamed:@"blueHydrangea.png"];
57 CGSize photoSize = [backgrdImage size];
58 CGRect totalFrame =
self.view.frame;
60 float resizeRatio = photoSize.height / totalFrame.size.height;
61 UIImage *resizedImage = [UIImage imageWithCGImage:[backgrdImage CGImage]
62 scale:backgrdImage.scale * resizeRatio
63 orientation:(backgrdImage.imageOrientation) ];
64 UIImageView *backgrd = [[UIImageView alloc] initWithImage:resizedImage];
65 [
self.view addSubview:backgrd];
68 float toDriveuttonWidth = 72.0;
69 CGRect toDriveFrame = CGRectMake(
overallSize.width - (toDriveuttonWidth+ 6.0),
navbarBottomEdge + 10.0, toDriveuttonWidth, toDriveuttonWidth);
70 UIButton *toDriveButton = [[UIButton alloc] initWithFrame:toDriveFrame];
71 [toDriveButton setTitle:@"Drive" forState:UIControlStateNormal];
72 [toDriveButton addTarget:self action:@selector(pushToCreateEntryOnDrive) forControlEvents:UIControlEventTouchUpInside];
73 [toDriveButton addGradientFace];
74 [
self.view addSubview:toDriveButton];
78 float snippetTitleFrameHeight = 48.0;
79 CGRect snippetTitleFrame = CGRectMake(8.0,
82 snippetTitleFrameHeight);
83 webTitleView = [
self viewDidLoadSnippet:_showHtmlTitle inFrame:snippetTitleFrame];
85 float snippetIngredientsFrameTop = snippetTitleFrameTop + snippetTitleFrameHeight + 4.0;
86 float remainingHeight =
overallSize.height - snippetIngredientsFrameTop;
87 float snippetIngredientsFrameHeight = remainingHeight/2 - 4.0;
88 CGRect snippetIngredientsFrame = CGRectMake(8.0,
89 snippetIngredientsFrameTop,
91 snippetIngredientsFrameHeight);
92 webIngredientsView = [
self viewDidLoadSnippet:_showHtmlIngredients inFrame:snippetIngredientsFrame];
94 float snippetInstructionFrameTop = snippetIngredientsFrameTop + snippetIngredientsFrameHeight + 4.0;
95 float snippetInstructionFrameHeight =
overallSize.height - snippetInstructionFrameTop - 4.0;
96 CGRect snippetInstructionFrame = CGRectMake(8.0,
97 snippetInstructionFrameTop,
99 snippetInstructionFrameHeight);
100 webInstructionView = [
self viewDidLoadSnippet:_showHtmlInstruction inFrame:snippetInstructionFrame];
103 [
self.view addSubview:webTitleView];
104 [
self.view addSubview:webIngredientsView];
105 [
self.view addSubview:webInstructionView];
WKWebView * webInstructionView
WKWebView * webIngredientsView