15 @property (strong, nonatomic)
MenuItem *focusMenuItem;
33 CGRect totalFrame =
self.view.frame;
34 [
self.view setBackgroundColor:[UIColor greenColor]];
36 CGRect recipeViewFrame = CGRectMake(totalFrame.size.width*0.05,
37 totalFrame.origin.y+totalFrame.size.height*0.180,
38 totalFrame.size.width*0.9,
41 [recipeViewTextView setBackgroundColor:[UIColor whiteColor]];
42 [
self.view addSubview:recipeViewTextView];
44 CGRect usdaDataViewFrame = CGRectMake(totalFrame.size.width*0.05,
45 totalFrame.origin.y+totalFrame.size.height*0.180 + 240,
46 totalFrame.size.width*0.9,
49 [usdaDataViewTextView setBackgroundColor:[UIColor yellowColor]];
50 [
self.view addSubview:usdaDataViewTextView];
52 UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Entry" style:UIBarButtonItemStylePlain target:self action:@selector(fireParameterEntry)];
53 self.navigationItem.rightBarButtonItem = anotherButton;
56 - (void)viewWillAppear:(BOOL)animated
58 [recipeViewTextView setText:[
self.focusMenuItem recipe]];
59 [usdaDataViewTextView setText:[
self.focusMenuItem usdaNumbers]];
62 - (void)viewWillDisappear:(BOOL)animated
64 [
super viewWillDisappear:animated];
70 NSLog(
@"RecipeCheckController.viewWillDisappear: usdaNumbers: %@", [
self.
focusMenuItem usdaNumbers]);
73 NSData *data = [[
self.focusMenuItem usdaNumbers] dataUsingEncoding:NSUTF8StringEncoding];
75 NSDictionary *jsonResponse = [NSJSONSerialization JSONObjectWithData:data
79 NSLog(
@"RecipeCheckController.viewWillDisappear: error: %@", error);
81 NSLog(
@"RecipeCheckController.viewWillDisappear: jsonResponse: %@", jsonResponse);
92 NSLog(
@"CollectionView.fireParameterEntry: focusMenuItem: %@",
self.
focusMenuItem);
96 [
self.navigationController pushViewController:parameterView animated:YES];
98 NSLog(
@"CollectionView.fireParameterEntry: nil focusMenuItem");
103 [
super didReceiveMemoryWarning];
void fireParameterEntry()
void didReceiveMemoryWarning()
instancetype sharedInstance()
UITextView * usdaDataViewTextView
Singleton interface to both core and remote data sources.
UITextView * recipeViewTextView