Skip to content

Commit

Permalink
SCScheduleView patvarkytas, veikia toggle buttonas ir duomenys is NSM…
Browse files Browse the repository at this point in the history
…utableArray
  • Loading branch information
abackys committed Sep 11, 2012
1 parent 4f9396b commit f5e4dd8
Show file tree
Hide file tree
Showing 21 changed files with 1,417 additions and 154 deletions.
182 changes: 169 additions & 13 deletions scanorama.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions scanorama/Model.xcdatamodeld/.xccurrentversion
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_XCCurrentVersionName</key>
<string>Model.xcdatamodel</string>
</dict>
</plist>
4 changes: 4 additions & 0 deletions scanorama/Model.xcdatamodeld/Model.xcdatamodel/contents
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model name="Model" userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1171" systemVersion="11D50" minimumToolsVersion="Xcode 4.1" macOSVersion="Automatic" iOSVersion="Automatic">
<elements/>
</model>
34 changes: 0 additions & 34 deletions scanorama/SCFirstViewController.m

This file was deleted.

19 changes: 19 additions & 0 deletions scanorama/SCLandingPageViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// SCLandingPageViewController.h
// scanorama
//
// Created by Lion User on 06/09/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SCLandingPageViewController : UIViewController

- (IBAction)landingButton:(UIButton *)sender;
@property (weak, nonatomic) IBOutlet UIButton *vilniusButton;
@property (weak, nonatomic) IBOutlet UIButton *kaunasButton;
@property (weak, nonatomic) IBOutlet UIButton *klaipedaButton;
@property (weak, nonatomic) IBOutlet UIButton *siauliaiButton;
@property (assign, nonatomic) NSInteger *cityId;
@end
82 changes: 82 additions & 0 deletions scanorama/SCLandingPageViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
//
// SCLandingPageViewController.m
// scanorama
//
// Created by Lion User on 06/09/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "SCLandingPageViewController.h"
#import "SCScheduleViewController.h"

@interface SCLandingPageViewController ()

@end

@implementation SCLandingPageViewController
@synthesize vilniusButton = _vilniusButton;
@synthesize kaunasButton = _kaunasButton;
@synthesize klaipedaButton = _klaipedaButton;
@synthesize siauliaiButton = _siauliaiButton;
@synthesize cityId = _cityId;


- (void)viewDidLoad
{
[[self navigationController] setTitle:@"Landing Page"];
[super viewDidLoad];
// Do any additional setup after loading the view.
}

- (void)viewDidUnload
{
[self setVilniusButton:nil];
[self setKaunasButton:nil];
[self setKlaipedaButton:nil];
[self setSiauliaiButton:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (IBAction)landingButton:(UIButton *)sender {

if(sender == _vilniusButton )
NSLog(@"Vilnius");
else if(sender == _kaunasButton) {
NSLog(@"Kaunas");
}
else if(sender == _klaipedaButton) {
NSLog(@"Klaipeda");
}
else if(sender == _siauliaiButton) {
NSLog(@"Siauliai");
}

// SCFirstViewController * viewContr = [[SCFirstViewController alloc] init];


//[self setView:(UIView*)viewContr];
[self performSegueWithIdentifier:@"showSchedule" sender:self];




}

-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

if([segue.identifier isEqualToString:@"showSchedule"]){
NSLog(@"perejimas");
SCScheduleViewController *newController = (SCScheduleViewController *)segue.destinationViewController;
// [newController setT]
// newController.testInt = [NSNumber numberWithInt:15];
// NSLog(@"%@", newController);
}
// [(SCFirstViewController *)segue.destinationViewController setView:<#(UIView *)#>]
}
@end
20 changes: 20 additions & 0 deletions scanorama/SCMovieCell.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// SCMovieCell.h
// scanorama
//
// Created by Lion User on 07/09/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SCMovieCell : UITableViewCell

@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *movieLabel;
@property (weak, nonatomic) IBOutlet UILabel *movieEnLabel;
@property (weak, nonatomic) IBOutlet UIButton *favoriteButton;
@property (weak, nonatomic) IBOutlet UIImageView *thumbImage;


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

#import "SCMovieCell.h"

@implementation SCMovieCell

@synthesize timeLabel = _timeLabel;
@synthesize movieLabel = _movieLabel;
@synthesize movieEnLabel = _movieEnLabel;
@synthesize favoriteButton = _favoriteButton;
@synthesize thumbImage = _thumbImage;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
}
return self;
}

-(void) setHighlighted:(BOOL)highlighted animated:(BOOL)animated {

[super setHighlighted:highlighted animated:animated];
self.favoriteButton.highlighted = NO;

}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];

self.favoriteButton.highlighted = NO;

// Configure the view for the selected state
}

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

#import <Foundation/Foundation.h>

@interface SCMovieData : NSObject


@property (strong) UIImage *thumbImage;
@property (strong) UIImage *fullImage;
@property (strong) NSString * title;
@property (strong) NSString * titleEn;
@property (strong) NSDate * date;
@property (strong) NSString* director;
@property (strong) NSString* createdYear;
@property (strong) NSString* movieLenght;
@property (assign) bool inFavorite;

- (id)initWithTitle:(NSString*)title thumbImage:(UIImage *)thumbImage fullImage:(UIImage *)fullImage titleEn:(NSString *)titleEn director:(NSString *)director createdYear:(NSString *)createdYear movieLenght:(NSString *)movieLenght inFavorite:(BOOL)inFavorite date:(NSDate *)date ;

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

#import "SCMovieData.h"

@implementation SCMovieData

@synthesize thumbImage = _thumbImage;
@synthesize fullImage = _fullImage;
@synthesize titleEn = _titleEn;
@synthesize title = _title;
@synthesize date = _date;
@synthesize director = _director;
@synthesize createdYear = _createdYear;
@synthesize movieLenght = _movieLenght;
@synthesize inFavorite = _inFavorite;


- (id)initWithTitle:(NSString*)title thumbImage:(UIImage *)thumbImage fullImage:(UIImage *)fullImage titleEn:(NSString *)titleEn director:(NSString *)director createdYear:(NSString *)createdYear movieLenght:(NSString *)movieLenght inFavorite:(BOOL)inFavorite date:(NSDate *)date {

if ((self = [super init])) {
self.thumbImage = thumbImage;
self.fullImage = fullImage;
self.title = title;
self.titleEn = titleEn;
self.date = date;
self.director = director;
self.createdYear = createdYear;
self.movieLenght = movieLenght;
self.inFavorite = inFavorite;

}
return self;
}

@end
13 changes: 13 additions & 0 deletions scanorama/SCMoviesViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// SCMoviesViewController.h
// scanorama
//
// Created by Lion User on 07/09/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SCMoviesViewController : UITableViewController

@end
Loading

0 comments on commit f5e4dd8

Please sign in to comment.