#import <U5MealPanoramaView.h>
Definition at line 21 of file U5MealPanoramaView.h.
◆ appear:()
- (void) appear: |
|
(CGRect) |
bound |
|
|
implementation |
Definition at line 98 of file U5MealPanoramaView.m.
100 NSNumber *galleryChoice = [NSNumber numberWithInt:1];
104 NSLog(
@"U5MenuPanoramaView.appear: width: %3.2f self-width: %3.2f", bound.size.width,
self.bounds.size.width);
105 [
self setSnapMeals:[[NSMutableArray alloc] initWithArray:tmp]];
109 [mealCollectionView setBackgroundColor:[UIColor yellowColor]];
110 [mealCollectionView reloadData];
instancetype sharedInstance()
NSArray< Meal * > * retrieveAllMeals:(NSNumber *galleryNumber)
Singleton interface to both core and remote data sources.
◆ collectionView:cellForItemAtIndexPath:()
- (__kindof UICollectionViewCell *) collectionView: |
|
(UICollectionView *) |
collectionView |
cellForItemAtIndexPath: |
|
(NSIndexPath *) |
indexPath |
|
|
| |
|
implementation |
Definition at line 124 of file U5MealPanoramaView.m.
125 cellForItemAtIndexPath:(NSIndexPath *)indexPath
127 int imageHeight = 120;
128 int selectedImageHeight = 160;
129 int outputImageHeight = 0;
134 outputImageHeight = selectedImageHeight;
137 outputImageHeight = imageHeight;
141 Meal *cellItem = [_snapMeals objectAtIndex:indexPath.row];
142 UIImage *photoImage = [UIImage imageWithData:cellItem.photo];
144 NSString *itemName = [mDateFormatter stringFromDate:photoDate];
147 CGSize photoSize = [photoImage size];
148 float resizeRatio = photoSize.height / (float)outputImageHeight;
149 UIImage *keptImage = [UIImage imageWithCGImage:[photoImage CGImage]
150 scale:photoImage.scale * resizeRatio
151 orientation:(photoImage.imageOrientation) ];
153 [cell.imageView setImage:keptImage];
NSInteger selectedMealRow
static NSString * selectedCellIdentifier
Singleton interface to both core and remote data sources.
void labelize:withText:(UILabel *targLabel, [withText] NSString *txt)
static NSString * cellIdentifier
◆ collectionView:numberOfItemsInSection:()
- (NSInteger) collectionView: |
|
(UICollectionView *) |
collectionView |
numberOfItemsInSection: |
|
(NSInteger) |
section |
|
|
| |
|
implementation |
Definition at line 117 of file U5MealPanoramaView.m.
118 numberOfItemsInSection:(NSInteger)section
120 NSInteger ret = [_snapMeals count];
121 NSLog(
@"U5MealPanoramaView.numberOfItemsInSection: %ld", (
long)ret);
◆ heightRequirement()
- (float) heightRequirement |
|
|
|
|
implementation |
◆ initialize()
Definition at line 46 of file U5MealPanoramaView.m.
49 float defaultCellwidth = 224;
50 float defaultCellheight = 268;
52 float selectCellWidth = 156;
53 float selectCellHeight = 180;
58 [mealFlowLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
59 [mealFlowLayout setMinimumInteritemSpacing:1.0];
60 [mealFlowLayout setItemSize:mealDefaultCellSize];
64 mealCollectionView = [[UICollectionView alloc] initWithFrame:collectionViewFrame collectionViewLayout:mealFlowLayout];
65 [
self addSubview:mealCollectionView];
67 [mealCollectionView setDelegate:self];
68 [mealCollectionView setDataSource:self];
70 [mealCollectionView setBackgroundColor:[[
Z5DataController alloc] wheatColor]];
73 [mDateFormatter setDateStyle:NSDateFormatterMediumStyle];
74 [mDateFormatter setTimeStyle:NSDateFormatterShortStyle];
UICollectionView * mealCollectionView
UICollectionViewFlowLayout * mealFlowLayout
CGSize mealDefaultCellSize
CGSize mealSelectCellSize
float initialCollectViewHgt
NSDateFormatter * mDateFormatter
Singleton interface to both core and remote data sources.
◆ initWithFrame:andDelegate:()
- (instancetype) initWithFrame: |
|
(CGRect) |
frame |
andDelegate: |
|
(id<Z6MealPanoramaDelegate>) |
delegate |
|
|
| |
Definition at line 35 of file U5MealPanoramaView.m.
35 :(CGRect)frame andDelegate:(id<Z6MealPanoramaDelegate>)dele
37 self = [
super initWithFrame:frame];
39 mealBackgroundShade = [UIColor colorWithRed:226.0/256 green:201.0/256 blue:114.0/256 alpha:1.0];
NSInteger selectedMealRow
id< Z6MealPanoramaDelegate > mealPanoramaDelegate
UIColor * mealBackgroundShade
◆ mealCellDefaultSize()
+ (NSValue *) mealCellDefaultSize |
|
|
|
Definition at line 29 of file U5MealPanoramaView.m.
31 NSValue *ret = [NSValue valueWithCGSize:mealDefaultCellSize];
◆ registerCells()
◆ reloadMeals()
◆ focusSnapMeal
◆ snapMeals
- (NSMutableArray<Meal *>*) snapMeals |
|
readwritenonatomicstrong |
The documentation for this class was generated from the following files: