diff --git a/0.jpg b/0.jpg new file mode 100644 index 0000000..73af766 Binary files /dev/null and b/0.jpg differ diff --git a/2.jpg b/2.jpg new file mode 100644 index 0000000..2074065 Binary files /dev/null and b/2.jpg differ diff --git a/3.jpg b/3.jpg new file mode 100644 index 0000000..e085417 Binary files /dev/null and b/3.jpg differ diff --git a/Flikrkr.xcodeproj/project.pbxproj b/Flikrkr.xcodeproj/project.pbxproj index defb7c1..2ffa10d 100644 --- a/Flikrkr.xcodeproj/project.pbxproj +++ b/Flikrkr.xcodeproj/project.pbxproj @@ -7,6 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + 5A066DD718F68EA500A16494 /* PictureViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A066DD618F68EA500A16494 /* PictureViewController.m */; }; + 5A066DDA18F68EE900A16494 /* ReaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A066DD918F68EE900A16494 /* ReaderView.m */; }; + 5A066DDF18F6975200A16494 /* 1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 5A066DDB18F6975200A16494 /* 1.jpg */; }; + 5A066DE618F6982000A16494 /* 0.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 5A066DE318F6982000A16494 /* 0.jpg */; }; + 5A066DE718F6982000A16494 /* 3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 5A066DE418F6982000A16494 /* 3.jpg */; }; + 5A066DE818F6982000A16494 /* 2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 5A066DE518F6982000A16494 /* 2.jpg */; }; 5A11DCFE18F68644007CE97C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A11DCFD18F68644007CE97C /* Foundation.framework */; }; 5A11DD0018F68644007CE97C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A11DCFF18F68644007CE97C /* CoreGraphics.framework */; }; 5A11DD0218F68644007CE97C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A11DD0118F68644007CE97C /* UIKit.framework */; }; @@ -36,6 +42,14 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 5A066DD518F68EA500A16494 /* PictureViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PictureViewController.h; sourceTree = ""; }; + 5A066DD618F68EA500A16494 /* PictureViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PictureViewController.m; sourceTree = ""; }; + 5A066DD818F68EE900A16494 /* ReaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReaderView.h; sourceTree = ""; }; + 5A066DD918F68EE900A16494 /* ReaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReaderView.m; sourceTree = ""; }; + 5A066DDB18F6975200A16494 /* 1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1.jpg; sourceTree = ""; }; + 5A066DE318F6982000A16494 /* 0.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = 0.jpg; path = ../0.jpg; sourceTree = ""; }; + 5A066DE418F6982000A16494 /* 3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = 3.jpg; path = ../3.jpg; sourceTree = ""; }; + 5A066DE518F6982000A16494 /* 2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = 2.jpg; path = ../2.jpg; sourceTree = ""; }; 5A11DCFA18F68644007CE97C /* Flikrkr.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Flikrkr.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5A11DCFD18F68644007CE97C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 5A11DCFF18F68644007CE97C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -117,9 +131,17 @@ 5A11DD0518F68644007CE97C /* Flikrkr */ = { isa = PBXGroup; children = ( + 5A066DE318F6982000A16494 /* 0.jpg */, + 5A066DDB18F6975200A16494 /* 1.jpg */, + 5A066DE518F6982000A16494 /* 2.jpg */, + 5A066DE418F6982000A16494 /* 3.jpg */, 5A11DD0E18F68644007CE97C /* AppDelegate.h */, 5A11DD0F18F68644007CE97C /* AppDelegate.m */, 5A11DD3218F6871F007CE97C /* Storyboard.storyboard */, + 5A066DD518F68EA500A16494 /* PictureViewController.h */, + 5A066DD618F68EA500A16494 /* PictureViewController.m */, + 5A066DD818F68EE900A16494 /* ReaderView.h */, + 5A066DD918F68EE900A16494 /* ReaderView.m */, 5A11DD1418F68644007CE97C /* Images.xcassets */, 5A11DD1118F68644007CE97C /* Flikrkr.xcdatamodeld */, 5A11DD0618F68644007CE97C /* Supporting Files */, @@ -232,7 +254,11 @@ buildActionMask = 2147483647; files = ( 5A11DD0A18F68644007CE97C /* InfoPlist.strings in Resources */, + 5A066DDF18F6975200A16494 /* 1.jpg in Resources */, + 5A066DE818F6982000A16494 /* 2.jpg in Resources */, 5A11DD1518F68644007CE97C /* Images.xcassets in Resources */, + 5A066DE718F6982000A16494 /* 3.jpg in Resources */, + 5A066DE618F6982000A16494 /* 0.jpg in Resources */, 5A11DD3318F6871F007CE97C /* Storyboard.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -253,7 +279,9 @@ buildActionMask = 2147483647; files = ( 5A11DD1318F68644007CE97C /* Flikrkr.xcdatamodeld in Sources */, + 5A066DD718F68EA500A16494 /* PictureViewController.m in Sources */, 5A11DD1018F68644007CE97C /* AppDelegate.m in Sources */, + 5A066DDA18F68EE900A16494 /* ReaderView.m in Sources */, 5A11DD0C18F68644007CE97C /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Flikrkr/._6e68f6dac305142db41b3873c8469f84_large.jpeg b/Flikrkr/._6e68f6dac305142db41b3873c8469f84_large.jpeg new file mode 100644 index 0000000..752fcac Binary files /dev/null and b/Flikrkr/._6e68f6dac305142db41b3873c8469f84_large.jpeg differ diff --git a/Flikrkr/._PictureViewController.h b/Flikrkr/._PictureViewController.h new file mode 100644 index 0000000..a322a67 Binary files /dev/null and b/Flikrkr/._PictureViewController.h differ diff --git a/Flikrkr/._PictureViewController.m b/Flikrkr/._PictureViewController.m new file mode 100644 index 0000000..a322a67 Binary files /dev/null and b/Flikrkr/._PictureViewController.m differ diff --git a/Flikrkr/._ReaderView.h b/Flikrkr/._ReaderView.h new file mode 100644 index 0000000..a322a67 Binary files /dev/null and b/Flikrkr/._ReaderView.h differ diff --git a/Flikrkr/._ReaderView.m b/Flikrkr/._ReaderView.m new file mode 100644 index 0000000..a322a67 Binary files /dev/null and b/Flikrkr/._ReaderView.m differ diff --git a/Flikrkr/._android1.png b/Flikrkr/._android1.png new file mode 100644 index 0000000..9e68f0b Binary files /dev/null and b/Flikrkr/._android1.png differ diff --git a/Flikrkr/._androidEvolution1920x1080.png b/Flikrkr/._androidEvolution1920x1080.png new file mode 100644 index 0000000..cecc104 Binary files /dev/null and b/Flikrkr/._androidEvolution1920x1080.png differ diff --git a/Flikrkr/1.jpg b/Flikrkr/1.jpg new file mode 100644 index 0000000..77b00d8 Binary files /dev/null and b/Flikrkr/1.jpg differ diff --git a/Flikrkr/6e68f6dac305142db41b3873c8469f84_large.jpeg b/Flikrkr/6e68f6dac305142db41b3873c8469f84_large.jpeg new file mode 100644 index 0000000..1d18851 Binary files /dev/null and b/Flikrkr/6e68f6dac305142db41b3873c8469f84_large.jpeg differ diff --git a/Flikrkr/PictureViewController.h b/Flikrkr/PictureViewController.h new file mode 100644 index 0000000..0867399 --- /dev/null +++ b/Flikrkr/PictureViewController.h @@ -0,0 +1,13 @@ +// +// PictureViewController.h +// Flikrkr +// +// Created by esgi on 10/04/2014. +// Copyright (c) 2014 Oui. All rights reserved. +// + +#import + +@interface PictureViewController : UIViewController + +@end diff --git a/Flikrkr/PictureViewController.m b/Flikrkr/PictureViewController.m new file mode 100644 index 0000000..f9609bc --- /dev/null +++ b/Flikrkr/PictureViewController.m @@ -0,0 +1,59 @@ +// +// PictureViewController.m +// Flikrkr +// +// Created by esgi on 10/04/2014. +// Copyright (c) 2014 Oui. All rights reserved. +// + +#import "PictureViewController.h" +#import "ReaderView.h" + +@interface PictureViewController () + +@property (weak, nonatomic) IBOutlet ReaderView *readerView; + +@end + +@implementation PictureViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view. + self.readerView.delegate = self; +} +- (void) viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + [self.readerView displayPageAtIndex:0]; +} +- (int) numberOfPages +{ + return 4; +} +- (UIView *) pageAtIndex:(int)index +{ + NSString * imageName = [NSString stringWithFormat:@"%i.jpg",index]; + UIImage * image = [UIImage imageNamed:imageName]; + UIImageView * imageView = [[UIImageView alloc] initWithImage: image]; + imageView.frame = self.readerView.bounds; + imageView.contentMode = UIViewContentModeScaleAspectFit; + return imageView; +} +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/Flikrkr/ReaderView.h b/Flikrkr/ReaderView.h new file mode 100644 index 0000000..bca40ae --- /dev/null +++ b/Flikrkr/ReaderView.h @@ -0,0 +1,24 @@ +// +// ReaderView.h +// Flikrkr +// +// Created by esgi on 10/04/2014. +// Copyright (c) 2014 Oui. All rights reserved. +// + +#import + +@protocol ReaderViewDelegate + +- (int) numberOfPages; +- (UIView*) pageAtIndex:(int)index; + +@end + +@interface ReaderView : UIView + +@property (nonatomic, weak) id delegate; + +- (void) displayPageAtIndex:(int)index; + +@end \ No newline at end of file diff --git a/Flikrkr/ReaderView.m b/Flikrkr/ReaderView.m new file mode 100644 index 0000000..3327699 --- /dev/null +++ b/Flikrkr/ReaderView.m @@ -0,0 +1,35 @@ +// +// ReaderView.m +// Flikrkr +// +// Created by esgi on 10/04/2014. +// Copyright (c) 2014 Oui. All rights reserved. +// + +#import "ReaderView.h" + +@implementation ReaderView + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + // Initialization code + } + return self; +} + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect +{ + // Drawing code +} +*/ +-(void)displayPageAtIndex:(int)index +{ + UIView * view = [self.delegate pageAtIndex:index]; + [self addSubview:view]; +} +@end diff --git a/Flikrkr/Storyboard.storyboard b/Flikrkr/Storyboard.storyboard index be30bb7..58d4447 100644 --- a/Flikrkr/Storyboard.storyboard +++ b/Flikrkr/Storyboard.storyboard @@ -50,10 +50,10 @@ - + - + @@ -61,9 +61,25 @@ + + + + + + + + + + + + + + + + diff --git a/Flikrkr/android1.png b/Flikrkr/android1.png new file mode 100644 index 0000000..8d73f09 Binary files /dev/null and b/Flikrkr/android1.png differ diff --git a/Flikrkr/androidEvolution1920x1080.png b/Flikrkr/androidEvolution1920x1080.png new file mode 100644 index 0000000..9d6041e Binary files /dev/null and b/Flikrkr/androidEvolution1920x1080.png differ