Subversion Repository Public Repository

Nextrek

Diff Revisions 529 vs 530 for /iOS/SafariArte/trunk/SafariArte/Controllers/PoiListVC.m

Diff revisions: vs.
  @@ -14,8 +14,6 @@
14 14 #import "PoiVC.h"
15 15 #import "SFAUser.h"
16 16
17 -
18 -
19 17 @interface PoiListVC ()
20 18 @end
21 19
  @@ -25,19 +23,17 @@
25 23 [super viewDidLoad];
26 24
27 25 [self.collectionView registerNib:[UINib nibWithNibName:@"PoiListCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"CollectionCell"];
28 -
29 26
30 -
31 27 self.title = NSLocalizedString(@"ListPoi", nil);
32 28
33 29 self.navigationItem.backBarButtonItem.title = @"";
34 30
35 -
36 31 self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iconLogo"]]];
37 32
38 -
33 + if(self.routeForDetail.completed) {
34 + //TODO
39 35
40 -
36 + }
41 37 }
42 38
43 39 #pragma mark - UICollectionView Datasource
  @@ -53,23 +49,21 @@
53 49 - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
54 50 PoiListCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"CollectionCell" forIndexPath:indexPath];
55 51
56 - SFAPoi *poi=(SFAPoi*)self.routeForDetail.routePois[indexPath.row];
52 + SFAPoi *poi = (SFAPoi*)self.routeForDetail.routePois[indexPath.row];
57 53
58 - [cell.imagePoi setImageWithURL:[NSURL URLWithString:poi.fileImage ]];
54 + [cell.imagePoi setImageWithURL:[NSURL URLWithString:poi.fileImage]];
59 55
60 -
61 - cell.labelPoi.text = [NSString stringWithFormat:@"%@.%@",[NSNumber numberWithInt:(int)indexPath.row + 1 ],poi.poiLabel ];
56 + cell.labelPoi.text = [NSString stringWithFormat:@"%@.%@",[NSNumber numberWithInt:(int)indexPath.row + 1 ],poi.poiLabel];
62 57
63 - // NSArray *status=@[@"KO",@"OK",@"S"];
64 - NSArray *statusImg=@[@"fail",@"Success",@"Skip",@"not_done"];
65 -
66 -
58 + NSArray *statusImg = @[@"fail", @"Success", @"Skip", @"not_done"];
67 59
68 60 if (![poi.status isEqualToString:@""]){
69 - // cell.lblStatus.text= status[[poi.status intValue]];
70 - [cell.imageStatus setImage:[UIImage imageNamed:statusImg[[poi.status intValue]]]];
71 -
72 - }else {
61 + if(![poi.status isEqualToString:@"999"]) {
62 +
63 + [cell.imageStatus setImage:[UIImage imageNamed:statusImg[[poi.status intValue]]]];
64 + }
65 + }
66 + else {
73 67 [cell.imageStatus setImage:[UIImage imageNamed:statusImg[3]]];
74 68 }
75 69 return cell;
  @@ -77,8 +71,6 @@
77 71
78 72 #pragma mark – UICollectionViewDelegateFlowLayout
79 73
80 -
81 -
82 74 - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
83 75 return UIEdgeInsetsMake(30, 10, 30, 10);
84 76 }