#import <P2SnapMealGalleryViewController.h>
Snap Meals Gallery
Definition at line 15 of file P2SnapMealGalleryViewController.h.
◆ clickedMeal:atRow:()
- (void) clickedMeal: |
|
(Meal *) |
meal |
atRow: |
|
(NSUInteger) |
row |
|
|
| |
|
implementation |
◆ deviceOrientationDidChange:()
- (void) deviceOrientationDidChange: |
|
(NSNotification *) |
notification |
|
|
implementation |
Definition at line 99 of file P2SnapMealGalleryViewController.m.
99 :(NSNotification *)notification {
100 NSLog(
@"P2SnapMealGalleryViewController.deviceOrientationDidChange: %@", notification);
101 [
self orientAppearUI];
◆ fetchScaleBackgroundImg()
- (void) fetchScaleBackgroundImg |
|
|
|
|
implementation |
Definition at line 210 of file P2SnapMealGalleryViewController.m.
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];
UIImageView * snapGalleryImageBackground
CGSize mealGalleryOverallSize
◆ orientAppearUI()
Definition at line 172 of file P2SnapMealGalleryViewController.m.
173 NSLog(
@"P2SnapMealViewController.orientAppearUI");
174 UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
177 case UIDeviceOrientationPortrait:
178 case UIDeviceOrientationFaceUp:
180 [
self viewDidAppearPortrait];
183 case UIDeviceOrientationLandscapeLeft:
184 case UIDeviceOrientationLandscapeRight:
186 [
self viewDidAppearLandscape];
191 NSLog(
@"P2SnapMealViewController.viewDidLoad: unk orrientation");
◆ orientLoadUI()
Definition at line 104 of file P2SnapMealGalleryViewController.m.
105 NSLog(
@"P2SnapMealGalleryViewController.orientLoadUI");
106 UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
109 case UIDeviceOrientationPortrait:
110 case UIDeviceOrientationFaceUp:
112 [
self viewDidLoadPortrait];
115 case UIDeviceOrientationLandscapeLeft:
116 case UIDeviceOrientationLandscapeRight:
118 [
self viewDidLoadLandscape];
123 NSLog(
@"P2SnapMealGalleryViewController.orientLoadUI: unk orrientation");
◆ screenBound()
Definition at line 225 of file P2SnapMealGalleryViewController.m.
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);
◆ viewDidAppearLandscape()
- (void) viewDidAppearLandscape |
|
|
|
|
implementation |
◆ viewDidAppearPortrait()
- (void) viewDidAppearPortrait |
|
|
|
|
implementation |
◆ viewDidLoad()
Definition at line 80 of file P2SnapMealGalleryViewController.m.
83 self.title =
@"Meal Memory Lane";
87 [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
88 [[NSNotificationCenter defaultCenter] addObserver:self
89 selector:@selector(deviceOrientationDidChange:)
90 name: UIDeviceOrientationDidChangeNotification
◆ viewDidLoadLandscape()
- (void) viewDidLoadLandscape |
|
|
|
|
implementation |
Definition at line 147 of file P2SnapMealGalleryViewController.m.
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;
167 float headerVert = [tableSpecial heightRequirement];
168 NSLog(
@"P2SnapMealViewController.viewDidLoadLandscape: headerVert: %3.2f", headerVert);
169 [tableSpecial reloadMeals];
UIImageView * snapGalleryImageBackground
U5MealPanoramaView * tableSpecial
CGSize mealGalleryOverallSize
◆ viewDidLoadPortrait()
- (void) viewDidLoadPortrait |
|
|
|
|
implementation |
Definition at line 129 of file P2SnapMealGalleryViewController.m.
132 + self.navigationController.navigationBar.frame.size.height;
134 [
self fetchScaleBackgroundImg];
136 float tableWidth =
self.view.bounds.size.width;
138 CGRect headFrame = CGRectMake(4.0,
navbarBottomEdge+4.0, tableWidth-8.0, tableHeight-8.0);
141 float headerVert = [tableSpecial heightRequirement];
142 NSLog(
@"P2SnapMealViewController.viewDidLoadPortrait: headerVert: %3.2f", headerVert);
143 [tableSpecial reloadMeals];
144 [
self.view addSubview:tableSpecial];
U5MealPanoramaView * tableSpecial
◆ viewWillAppear:()
- (void) viewWillAppear: |
|
(BOOL) |
animated |
|
|
implementation |
The documentation for this class was generated from the following files: