83 self.title =
@"Meal Memory Lane";
87 [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
88 [[NSNotificationCenter defaultCenter] addObserver:self
89 selector:@selector(deviceOrientationDidChange:)
90 name: UIDeviceOrientationDidChangeNotification
94 - (void) viewWillAppear:(BOOL)animated
99 - (void)deviceOrientationDidChange:(NSNotification *)notification {
100 NSLog(
@"P2SnapMealGalleryViewController.deviceOrientationDidChange: %@", notification);
105 NSLog(
@"P2SnapMealGalleryViewController.orientLoadUI");
106 UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
109 case UIDeviceOrientationPortrait:
110 case UIDeviceOrientationFaceUp:
115 case UIDeviceOrientationLandscapeLeft:
116 case UIDeviceOrientationLandscapeRight:
123 NSLog(
@"P2SnapMealGalleryViewController.orientLoadUI: unk orrientation");
132 +
self.navigationController.navigationBar.frame.size.height;
136 float tableWidth =
self.view.bounds.size.width;
138 CGRect headFrame = CGRectMake(4.0,
navbarBottomEdge+4.0, tableWidth-8.0, tableHeight-8.0);
142 NSLog(
@"P2SnapMealViewController.viewDidLoadPortrait: headerVert: %3.2f", headerVert);
144 [
self.view addSubview:tableSpecial];
150 +
self.navigationController.navigationBar.frame.size.height;
153 CGRect totalFrame =
self.view.frame;
155 UIImage *backgrdImage = [UIImage imageNamed:@"elphieLandscape.png"];
156 CGSize photoSize = [backgrdImage size];
157 float resizeRatio = photoSize.width / totalFrame.size.width;
158 UIImage *resizedImage = [UIImage imageWithCGImage:[backgrdImage CGImage]
159 scale:backgrdImage.scale * resizeRatio
160 orientation:(backgrdImage.imageOrientation) ];
162 [
self.view addSubview:snapGalleryImageBackground];
165 float tableWidth =
self.view.bounds.size.width;
168 NSLog(
@"P2SnapMealViewController.viewDidLoadLandscape: headerVert: %3.2f", headerVert);
173 NSLog(
@"P2SnapMealViewController.orientAppearUI");
174 UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
177 case UIDeviceOrientationPortrait:
178 case UIDeviceOrientationFaceUp:
183 case UIDeviceOrientationLandscapeLeft:
184 case UIDeviceOrientationLandscapeRight:
191 NSLog(
@"P2SnapMealViewController.viewDidLoad: unk orrientation");
199 CGRect bound =
self.view.bounds;
202 [tableSpecial
appear:bound];
207 NSLog(
@"P2SnapMealViewController.viewDidAppearLandscape");
213 CGRect totalFrame =
self.view.frame;
215 UIImage *backgrdImage = [UIImage imageNamed:@"elphie.png"];
216 CGSize photoSize = [backgrdImage size];
217 float resizeRatio = photoSize.height / totalFrame.size.height;
218 UIImage *resizedImage = [UIImage imageWithCGImage:[backgrdImage CGImage]
219 scale:backgrdImage.scale * resizeRatio
220 orientation:(backgrdImage.imageOrientation) ];
222 [
self.view addSubview:snapGalleryImageBackground];
227 CGRect bound =
self.view.bounds;
228 NSLog(
@"P2SnapMealViewController.screenBound: bound: (%3.2f,%3.2f)-(%3.2fx%3.2f",
229 bound.origin.x, bound.origin.y, bound.size.width, bound.size.height);
234 - (void) clickedMeal: (
Meal *)meal atRow: (NSUInteger)row
UIImageView * snapGalleryImageBackground
float heightRequirement()
void viewDidLoadPortrait()
void viewDidAppearPortrait()
void appear:(CGRect bound)
U5MealPanoramaView * tableSpecial
CGSize mealGalleryOverallSize
void viewDidAppearLandscape()
void fetchScaleBackgroundImg()
void viewDidLoadLandscape()