Nextrek
@ 530
Nextrek / iOS / SafariArte / trunk / SafariArte / Controllers / PoiListVC.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
// // PoiListVC.m // SafariArte // // Created by Pier Domenico Bonamassa on 31/07/15. // Copyright (c) 2015 Nextrek. All rights reserved. // #import "PoiListVC.h" #import "PoiListCollectionViewCell.h" #import "RoutesVC.h" #import "NXTParser.h" #import "UIImageView+AFNetworking.h" #import "PoiVC.h" #import "SFAUser.h" @interface PoiListVC () @end @implementation PoiListVC - (void)viewDidLoad { [super viewDidLoad]; [self.collectionView registerNib:[UINib nibWithNibName:@"PoiListCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"CollectionCell"]; self.title = NSLocalizedString(@"ListPoi", nil); self.navigationItem.backBarButtonItem.title = @""; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iconLogo"]]]; if(self.routeForDetail.completed) { //TODO } } #pragma mark - UICollectionView Datasource - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { return self.routeForDetail.routePois.count; } - (NSInteger)numberOfSectionsInCollectionView: (UICollectionView *)collectionView { return 1; } - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { PoiListCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"CollectionCell" forIndexPath:indexPath]; SFAPoi *poi = (SFAPoi*)self.routeForDetail.routePois[indexPath.row]; [cell.imagePoi setImageWithURL:[NSURL URLWithString:poi.fileImage]]; cell.labelPoi.text = [NSString stringWithFormat:@"%@.%@",[NSNumber numberWithInt:(int)indexPath.row + 1 ],poi.poiLabel]; NSArray *statusImg = @[@"fail", @"Success", @"Skip", @"not_done"]; if (![poi.status isEqualToString:@""]){ if(![poi.status isEqualToString:@"999"]) { [cell.imageStatus setImage:[UIImage imageNamed:statusImg[[poi.status intValue]]]]; } } else { [cell.imageStatus setImage:[UIImage imageNamed:statusImg[3]]]; } return cell; } #pragma mark – UICollectionViewDelegateFlowLayout - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { return UIEdgeInsetsMake(30, 10, 30, 10); } #pragma mark – MemoryWarning - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } @end |
Commits for Nextrek/iOS/SafariArte/trunk/SafariArte/Controllers/PoiListVC.m
Revision | Author | Commited | Message |
---|---|---|---|
530 Diff | FAquili | Mon 24 Aug, 2015 10:51:56 +0000 | Bug fixing |
503 Diff | PBonamassa | Fri 14 Aug, 2015 08:38:39 +0000 | fixed graphic poi list |
482 Diff | PBonamassa | Thu 06 Aug, 2015 07:23:06 +0000 | change text color alert – added alert to button stepOver in PoiVC – removed button StepOver in |
479 Diff | FPompili | Tue 04 Aug, 2015 22:09:28 +0000 | aggiunta memorizzazione status poi (risposta ok, risposta errata , saltata) |
478 Diff | FPompili | Tue 04 Aug, 2015 20:02:39 +0000 | size increased |
477 Diff | FPompili | Tue 04 Aug, 2015 19:50:13 +0000 | fixed searchMenu for small screen |
476 Diff | PBonamassa | Tue 04 Aug, 2015 15:22:38 +0000 | fixed bug |
475 Diff | PBonamassa | Tue 04 Aug, 2015 10:36:18 +0000 | added label Clue(indizio) with relative value |
474 Diff | FAquili | Tue 04 Aug, 2015 08:40:49 +0000 | UICollectionView bug fixing |
462 | PBonamassa | Mon 03 Aug, 2015 10:40:02 +0000 | fixed bug text finalQuizVC |