venue in schedule now shows correctly
This commit is contained in:
18
FestivalHelper/schedule/FESScheduleFilmCell.h
Normal file
18
FestivalHelper/schedule/FESScheduleFilmCell.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// FESScheduleFilmCell.h
|
||||
// FestivalHelper
|
||||
//
|
||||
// Created by Hamo Hapic on 03/09/14.
|
||||
// Copyright (c) 2014 Senad Uka. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface FESScheduleFilmCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic)IBOutlet UILabel *scheduleFilmTime;
|
||||
@property (weak, nonatomic)IBOutlet UILabel *scheduleFilmTitle;
|
||||
@property (weak, nonatomic)IBOutlet UILabel *scheduleFilmVenue;
|
||||
@property (weak, nonatomic)IBOutlet UILabel *scheduleFilmDuration;
|
||||
|
||||
@end
|
||||
39
FestivalHelper/schedule/FESScheduleFilmCell.m
Normal file
39
FestivalHelper/schedule/FESScheduleFilmCell.m
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// FESScheduleFilmCell.m
|
||||
// FestivalHelper
|
||||
//
|
||||
// Created by Hamo Hapic on 03/09/14.
|
||||
// Copyright (c) 2014 Senad Uka. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FESScheduleFilmCell.h"
|
||||
|
||||
@implementation FESScheduleFilmCell
|
||||
|
||||
@synthesize scheduleFilmTitle;
|
||||
@synthesize scheduleFilmDuration;
|
||||
@synthesize scheduleFilmTime;
|
||||
@synthesize scheduleFilmVenue;
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
// Initialization code
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
|
||||
{
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#import "FESScheduleFilmsViewController.h"
|
||||
#import "FESScheduleFilm.h"
|
||||
#import "FESScheduleFilmCell.h"
|
||||
|
||||
@interface FESScheduleFilmsViewController ()
|
||||
|
||||
@@ -55,16 +56,26 @@
|
||||
return [scheduleFilmsArray count];
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
|
||||
|
||||
// Configure the cell...
|
||||
UITableViewCell *retrievedCell = [tableView dequeueReusableCellWithIdentifier:@"scheduleFilmCell" forIndexPath:indexPath];
|
||||
FESScheduleFilmCell *cell = (FESScheduleFilmCell *)retrievedCell;
|
||||
|
||||
if(cell)
|
||||
{
|
||||
//The beauty of this is that you have all your data in one object and grab WHATEVER you like
|
||||
//This way in the future you can add another field without doing much.
|
||||
FESScheduleFilm *scheduleFilm = [scheduleFilmsArray objectAtIndex:indexPath.row];
|
||||
cell.scheduleFilmTime.text = scheduleFilm.scheduleFilmTime;
|
||||
cell.scheduleFilmDuration.text = scheduleFilm.scheduleFilmDuration;
|
||||
cell.scheduleFilmTitle.text = scheduleFilm.scheduleFilmTitle;
|
||||
cell.scheduleFilmVenue.text = scheduleFilm.scheduleFilmVenue;
|
||||
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
// Override to support conditional editing of the table view.
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#import "FESScheduleTableViewController.h"
|
||||
#import "FESSCheduleEntry.h"
|
||||
#import "FESScheduleEntryCell.h"
|
||||
#import "FESScheduleFilmsViewController.h"
|
||||
|
||||
@interface FESScheduleTableViewController ()
|
||||
|
||||
@@ -166,7 +167,11 @@
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
|
||||
{
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
FESScheduleFilmsViewController *destination = (FESScheduleFilmsViewController *) [segue destinationViewController];
|
||||
FESSCheduleEntry *entry = (FESSCheduleEntry *)[self.scheduleArray objectAtIndex:self.tableView.indexPathForSelectedRow.row];
|
||||
|
||||
// Pass the selected object to the new view controller.
|
||||
destination.scheduleFilmsArray = entry.scheduleFilms;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user