Skip to content

Commit

Permalink
add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon Lee committed Aug 8, 2012
1 parent fc4b13e commit e83a23c
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 5 deletions.
38 changes: 38 additions & 0 deletions AmzPhoto/AmzPhoto.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@
C17E26EB15D1D1DD00C5C781 /* libz.1.1.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C17E26EA15D1D1DD00C5C781 /* libz.1.1.3.dylib */; };
C17E26ED15D1D1F200C5C781 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C17E26EC15D1D1F200C5C781 /* CoreData.framework */; };
C17E26EF15D1D25E00C5C781 /* libsqlite3.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C17E26EE15D1D25E00C5C781 /* libsqlite3.0.dylib */; };
C1ED5C8C15D29EB80072AAB0 /* PagePhotosView.m in Sources */ = {isa = PBXBuildFile; fileRef = C1ED5C8B15D29EB80072AAB0 /* PagePhotosView.m */; };
C1ED5C9215D29EC20072AAB0 /* 1933_1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C1ED5C8D15D29EC20072AAB0 /* 1933_1.jpg */; };
C1ED5C9315D29EC20072AAB0 /* 1933_2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C1ED5C8E15D29EC20072AAB0 /* 1933_2.jpg */; };
C1ED5C9415D29EC20072AAB0 /* 1933_3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C1ED5C8F15D29EC20072AAB0 /* 1933_3.jpg */; };
C1ED5C9515D29EC20072AAB0 /* 1933_4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C1ED5C9015D29EC20072AAB0 /* 1933_4.jpg */; };
C1ED5C9615D29EC20072AAB0 /* 1933_5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C1ED5C9115D29EC20072AAB0 /* 1933_5.jpg */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -415,6 +421,14 @@
C17E26EA15D1D1DD00C5C781 /* libz.1.1.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.1.1.3.dylib; path = usr/lib/libz.1.1.3.dylib; sourceTree = SDKROOT; };
C17E26EC15D1D1F200C5C781 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
C17E26EE15D1D25E00C5C781 /* libsqlite3.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.0.dylib; path = usr/lib/libsqlite3.0.dylib; sourceTree = SDKROOT; };
C1ED5C8915D29EB80072AAB0 /* PagePhotosDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PagePhotosDataSource.h; sourceTree = "<group>"; };
C1ED5C8A15D29EB80072AAB0 /* PagePhotosView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PagePhotosView.h; sourceTree = "<group>"; };
C1ED5C8B15D29EB80072AAB0 /* PagePhotosView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PagePhotosView.m; sourceTree = "<group>"; };
C1ED5C8D15D29EC20072AAB0 /* 1933_1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1933_1.jpg; sourceTree = "<group>"; };
C1ED5C8E15D29EC20072AAB0 /* 1933_2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1933_2.jpg; sourceTree = "<group>"; };
C1ED5C8F15D29EC20072AAB0 /* 1933_3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1933_3.jpg; sourceTree = "<group>"; };
C1ED5C9015D29EC20072AAB0 /* 1933_4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1933_4.jpg; sourceTree = "<group>"; };
C1ED5C9115D29EC20072AAB0 /* 1933_5.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1933_5.jpg; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -484,6 +498,7 @@
C126B69815C4A14300613404 /* AmzPhoto */ = {
isa = PBXGroup;
children = (
C1ED5C8815D29EB80072AAB0 /* PagePhotos */,
C17E26D915D1D14300C5C781 /* AviarySDK */,
C17E26E315D1D14300C5C781 /* sample */,
C17E26B815D1CF8300C5C781 /* PhotoViewController.h */,
Expand Down Expand Up @@ -789,6 +804,21 @@
path = sample;
sourceTree = "<group>";
};
C1ED5C8815D29EB80072AAB0 /* PagePhotos */ = {
isa = PBXGroup;
children = (
C1ED5C8D15D29EC20072AAB0 /* 1933_1.jpg */,
C1ED5C8E15D29EC20072AAB0 /* 1933_2.jpg */,
C1ED5C8F15D29EC20072AAB0 /* 1933_3.jpg */,
C1ED5C9015D29EC20072AAB0 /* 1933_4.jpg */,
C1ED5C9115D29EC20072AAB0 /* 1933_5.jpg */,
C1ED5C8915D29EB80072AAB0 /* PagePhotosDataSource.h */,
C1ED5C8A15D29EB80072AAB0 /* PagePhotosView.h */,
C1ED5C8B15D29EB80072AAB0 /* PagePhotosView.m */,
);
path = PagePhotos;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -842,6 +872,11 @@
C126B69D15C4A14300613404 /* InfoPlist.strings in Resources */,
C17E26E615D1D14300C5C781 /* AviarySDKResources.bundle in Resources */,
C17E26E715D1D14300C5C781 /* Default.png in Resources */,
C1ED5C9215D29EC20072AAB0 /* 1933_1.jpg in Resources */,
C1ED5C9315D29EC20072AAB0 /* 1933_2.jpg in Resources */,
C1ED5C9415D29EC20072AAB0 /* 1933_3.jpg in Resources */,
C1ED5C9515D29EC20072AAB0 /* 1933_4.jpg in Resources */,
C1ED5C9615D29EC20072AAB0 /* 1933_5.jpg in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -972,6 +1007,7 @@
C17E26B215D1CF2E00C5C781 /* GPUImageWeakPixelInclusionFilter.m in Sources */,
C17E26B315D1CF2E00C5C781 /* GPUImageXYDerivativeFilter.m in Sources */,
C17E26BA15D1CF8300C5C781 /* PhotoViewController.m in Sources */,
C1ED5C8C15D29EB80072AAB0 /* PagePhotosView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1037,6 +1073,7 @@
C126B6AD15C4A14300613404 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AmzPhoto/AmzPhoto-Prefix.pch";
INFOPLIST_FILE = "AmzPhoto/AmzPhoto-Info.plist";
Expand All @@ -1053,6 +1090,7 @@
C126B6AE15C4A14300613404 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AmzPhoto/AmzPhoto-Prefix.pch";
INFOPLIST_FILE = "AmzPhoto/AmzPhoto-Info.plist";
Expand Down
9 changes: 7 additions & 2 deletions AmzPhoto/AmzPhoto/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@

#import <UIKit/UIKit.h>
#import "AFPhotoEditorController.h"
@class ViewController;
#import "PagePhotosDataSource.h"
#import "PagePhotosView.h"

@interface AppDelegate : UIResponder <UIApplicationDelegate,AFPhotoEditorControllerDelegate>
@class ViewController;

@interface AppDelegate : UIResponder <UIApplicationDelegate,AFPhotoEditorControllerDelegate,PagePhotosDataSource>
{
NSInteger mPageCount;
}
@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) ViewController *viewController;
Expand Down
38 changes: 35 additions & 3 deletions AmzPhoto/AmzPhoto/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ - (void)photoEditorCanceled:(AFPhotoEditorController *)editor
// Handle cancelation here
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-(void)pageScrollDone
{
[[NSNotificationCenter defaultCenter] removeObserver:self];

//remove current view and add new view
[self.window release];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
#if 1
self.window.backgroundColor = [UIColor whiteColor];
#if 0
// Override point for customization after application launch.
//self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
//self.window.rootViewController = self.viewController;
Expand All @@ -43,7 +47,35 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
PhotoViewController* rootViewController = [[PhotoViewController alloc] initWithNibName:nil bundle:nil];
rootViewController.view.frame = [[UIScreen mainScreen] bounds];
[self.window addSubview:rootViewController.view];
self.window.rootViewController = rootViewController;
#endif
[self.window makeKeyAndVisible];
}
// 有多少页
//
- (int)numberOfPages {
return mPageCount;
}

// 每页的图片
//
- (UIImage *)imageAtIndex:(int)index {
NSString *imageName = [NSString stringWithFormat:@"1933_%d.jpg", index + 1];
return [UIImage imageNamed:imageName];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

//add observer for page scroll done event
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(pageScrollDone) name:kPageScrollDone object:nil];

mPageCount = 5;
PagePhotosView *pagePhotosView = [[PagePhotosView alloc] initWithFrame: [[UIScreen mainScreen]bounds] withDataSource: self];
[self.window addSubview:pagePhotosView];

[pagePhotosView release];

[self.window makeKeyAndVisible];
return YES;
Expand Down

0 comments on commit e83a23c

Please sign in to comment.