Skip to content

Commit

Permalink
Priesh Mac Os Update
Browse files Browse the repository at this point in the history
  • Loading branch information
abackys committed Oct 9, 2012
1 parent 7658a7c commit 433c679
Show file tree
Hide file tree
Showing 36 changed files with 389 additions and 52 deletions.
102 changes: 102 additions & 0 deletions scanorama.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file added scanorama/List_sep_640x7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions scanorama/SCCustomToolbar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// SCCustomToolbar.h
// scanorama
//
// Created by Lion User on 08/10/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SCCustomToolbar : UIToolbar

@end
25 changes: 25 additions & 0 deletions scanorama/SCCustomToolbar.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// SCCustomToolbar.m
// scanorama
//
// Created by Lion User on 08/10/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "SCCustomToolbar.h"

@implementation SCCustomToolbar




// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
[[UIImage imageNamed:@"toolbar_320x88.png"] drawInRect:rect];
// Drawing code
}


@end
15 changes: 13 additions & 2 deletions scanorama/SCLandingPageViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ @interface SCLandingPageViewController ()

@end



@implementation UINavigationBar (UINavigationBarCategory)
- (void)drawRect:(CGRect)rect {
UIColor *color = [UIColor blueColor];
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColor(context, CGColorGetComponents( [color CGColor]));
CGContextFillRect(context, rect);
}
@end

@implementation SCLandingPageViewController
@synthesize vilniusButton = _vilniusButton;
@synthesize kaunasButton = _kaunasButton;
Expand All @@ -28,8 +39,8 @@ - (void)viewDidLoad
{

SCJsonDatabase *jsonDb = [[SCJsonDatabase alloc] init];
[jsonDb insertMoviesJsonToDatabase];
[jsonDb insertScheduleJsonToDatabase];
// [jsonDb insertMoviesJsonToDatabase];
// [jsonDb insertScheduleJsonToDatabase];

// [[self navigationController] setTitle:@"Landing Page"];
[super viewDidLoad];
Expand Down
5 changes: 5 additions & 0 deletions scanorama/SCMovieCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *movieLabel;
@property (weak, nonatomic) IBOutlet UILabel *movieEnLabel;
@property (weak, nonatomic) IBOutlet UILabel *directorLenghLabel;
@property (weak, nonatomic) IBOutlet UILabel *yearsCountryLabel;

@property (weak, nonatomic) IBOutlet UIButton *favoriteButton;
@property (weak, nonatomic) IBOutlet UIImageView *thumbImage;


@property (strong, nonatomic) NSString *cinema;
@property (strong, nonatomic) NSDate *date;
@property (strong, nonatomic) NSString *city;
Expand Down
2 changes: 2 additions & 0 deletions scanorama/SCMovieCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ @implementation SCMovieCell
@synthesize timeLabel = _timeLabel;
@synthesize movieLabel = _movieLabel;
@synthesize movieEnLabel = _movieEnLabel;
@synthesize directorLenghLabel = _directorLenghLabel;
@synthesize yearsCountryLabel = _yearsCountryLabel;
@synthesize favoriteButton = _favoriteButton;
@synthesize thumbImage = _thumbImage;
@synthesize cinema = _cinema;
Expand Down
10 changes: 7 additions & 3 deletions scanorama/SCMovieDescriptionViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ - (void)viewWillAppear:(BOOL)animated {

_scrollView.contentSize = CGSizeMake(320, 160 + 400 + 200 + 5*50 + strech);

[[self navigationController] setNavigationBarHidden:NO animated:YES];
[ self navigationController].navigationBar.barStyle = UIBarStyleBlack;
[[self navigationController] setNavigationBarHidden:NO animated:YES];

[[ self navigationController].navigationBar setBackgroundImage:[UIImage imageNamed:@"toolbar_320x88.png"] forBarMetrics:UIBarMetricsDefault];


// [ self navigationController].navigationBar.barStyle = UIBarStyleBlack;

[self addWebViewToBottom:@"http://www.youtube.com/embed/oHg5SJYRHA0" ];

Expand All @@ -101,7 +105,7 @@ - (void)viewWillAppear:(BOOL)animated {
_headerImage.frame = promoImgRect;
_headerImage.image = promoImg ;

_scheduleTextView.hidden = TRUE;
// _scheduleTextView.hidden = TRUE;

}

Expand Down
1 change: 1 addition & 0 deletions scanorama/SCMyProgramViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

@property (weak, nonatomic) IBOutlet UIBarButtonItem *shareProgramButton;

@property (weak, nonatomic) IBOutlet UIToolbar *toolbarOutlet;


@end
11 changes: 9 additions & 2 deletions scanorama/SCMyProgramViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ @interface SCMyProgramViewController ()

@implementation SCMyProgramViewController
@synthesize shareProgramButton = _shareProgramButton;
@synthesize toolbarOutlet = _toolbarOutlet;

@synthesize managedObjectContext = _managedObjectContext;
@synthesize config = _config;
Expand All @@ -25,12 +26,16 @@ @implementation SCMyProgramViewController
@synthesize scheduleView = _scheduleView;
@synthesize myProgramTableView = _myProgramTableView;

-(void) configureView {
self.tabBarController.title = @"Mano Programa";


}


- (void)viewDidLoad
{
// self.tabBarController.title = @"Mano Programa";
SCAppDelegate *app = [UIApplication sharedApplication].delegate;
_managedObjectContext = app.managedObjectContext;
[super viewDidLoad];
Expand All @@ -48,6 +53,7 @@ - (void)viewDidUnload


[self setShareProgramButton:nil];
[self setToolbarOutlet:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
Expand All @@ -61,7 +67,8 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface

- (void)viewWillAppear:(BOOL)animated
{
self.tabBarController.title = @"Mano Programa";

[self configureView];

_favoriteMovieArray = [[NSMutableArray alloc] init];
NSArray *fetchedFavoriteArray = [self getFavoriteMoviesArray];
Expand Down
2 changes: 2 additions & 0 deletions scanorama/SCScheduleViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ NSFetchedResultsControllerDelegate, FavoriteButtonDelegate>
@property (strong, nonatomic) SCConfig * config;
@property (nonatomic, retain) NSFetchedResultsController *fetchedResultsController;
@property (nonatomic, retain) NSManagedObjectContext *managedObjectContext;
@property (weak, nonatomic) IBOutlet UIToolbar *toolbarOutlet;

- (IBAction)nextDay:(id)sender;
- (IBAction)previousDay:(id)sender;
-(void) disableDateNavigationButtons;
-(NSDate *) combineDateWithTime:(NSDate *)selectedDate movieTime:(NSString *)movieTime;
-(void) insertFavoriteToDatabase:(NSDate *)date byCity:(NSString *)city byCinema:(NSString *)cinema favoriteState:(NSNumber *)favorite;
@property (weak, nonatomic) IBOutlet UITabBar *tabBar;

@property (weak, nonatomic) IBOutlet UITableView *scheduleTableView;

Expand Down
44 changes: 41 additions & 3 deletions scanorama/SCScheduleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,34 @@
#import "SCMovieDescriptionViewController.h"


@implementation UIToolbar (CustomImage)


- (void)drawRect:(CGRect)rect {
UIImage *image = [UIImage imageNamed:@"filmai_header_640x74.png"];
[image drawInRect:CGRectMake(0,0,self.frame.size.width, self.frame.size.height)];

/*
UIColor *color = [UIColor blueColor];
// self.tintColor = color;
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColor(context, CGColorGetComponents( [color CGColor]));
CGContextFillRect(context, rect);
*/
}

@end

@interface SCScheduleViewController ()

@end

@implementation SCScheduleViewController
@synthesize managedObjectContext = _managedObjectContext;
@synthesize toolbarOutlet = _toolbarOutlet;
@synthesize dateNavigatorView = _dateNavigatorView;
@synthesize fetchedResultsController = _fetchedResultsController;
@synthesize tabBar = _tabBar;
@synthesize scheduleTableView = _scheduleTableView;
@synthesize ScheduleArray = _ScheduleArray;
@synthesize cityToolbarButton = _cityToolbarButton;
Expand All @@ -39,18 +58,33 @@ @implementation SCScheduleViewController


-(void) configureView {

_config = [SCConfig sharedInstance];

// UIColor *color = [UIColor colorWithRed:30/255.0 green:30/255.0 blue:30/255.0 alpha:1.0];
// _toolbarOutlet set
// [_toolbarOutlet setBackgroundColor:color];
// [_toolbarOutlet setBackgroundImage:[UIImage imageNamed:@"repertuaras_header_640x74.png"] forToolbarPosition: UIToolbarPositionAny barMetrics: UIBarMetricsDefault];
_config = [SCConfig sharedInstance];
[self.scheduleTableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
_ScheduleArray = [self getMoviesByDateAndCity:[_dateString getCurrentDate].date endDate:[_dateString getNextDay].date];

[_dateNavigatorView.dateLabel setText:[_dateString getCurrentDate].dateStringLt];
[_dateNavigatorView.dateLabelEn setText:[_dateString getCurrentDate].dateStringEn];
[self disableDateNavigationButtons];

_cityToolbarButton.title = [_config getCityName];


_ScheduleArray = [self getMoviesByDateAndCity:[_dateString getCurrentDate].date endDate:[_dateString getNextDay].date];



}

- (void)viewDidLoad
{

// [_toolbarOutlet setBackgroundImage:[UIImage imageNamed:@"toolbar_320x88.png"] forToolbarPosition: UIToolbarPositionAny barMetrics: UIBarMetricsDefault];


// [self configureView];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeFavoriteNotification:) name:@"changeFavoriteValue" object:nil];
Expand Down Expand Up @@ -187,6 +221,8 @@ - (void)viewDidUnload



[self setToolbarOutlet:nil];
[self setTabBar:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
Expand Down Expand Up @@ -327,6 +363,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
Schedule *schedule = [_ScheduleArray objectAtIndex:indexPath.row];
cell.movieLabel.text = schedule.movie.title;
cell.movieEnLabel.text = schedule.movie.titleEn;
cell.directorLenghLabel.text = [schedule.movie.director stringByAppendingFormat:@", %@ min.", schedule.movie.duration];
cell.yearsCountryLabel.text = [schedule.movie.createdYear stringByAppendingFormat:@" m. %@", schedule.movie.country];
cell.favoriteButton.selected = [schedule.favorite boolValue];
cell.timeLabel.text = [ hours_minutes stringFromDate:schedule.date];
cell.thumbImage.image = [UIImage imageNamed:schedule.movie.thumbImage];
Expand Down
9 changes: 7 additions & 2 deletions scanorama/SCTabBarViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@

#import "SCTabBarViewController.h"

@interface SCTabBarViewController ()

@interface SCTabBarViewController (private)
- (UITabBar *)tabBar;
@end

@implementation SCTabBarViewController


- (void)viewDidLoad
{

[super viewDidLoad];
// [[self tabBar] setBackgroundColor:[UIColor greenColor]];
[[self tabBar] setBackgroundImage:[UIImage imageNamed:@"tabBar_bg____1x48.png"]];
// [[self tabBar] setTintColor:[UIColor colorWithRed:30/255 green:30/255 blue:30/255 alpha:1]];

// Do any additional setup after loading the view.
}

Expand Down
Loading

0 comments on commit 433c679

Please sign in to comment.