Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial commit

  • Loading branch information...
commit 064dda10882b6cbbe2aca7b5c9ffaa4e96953dac 1 parent 8aeee7f
@dmitric dmitric authored
View
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "GPUImage"]
+ path = GPUImage
+ url = git://github.com/BradLarson/GPUImage.git
View
155 DLCImagePickerController.xcodeproj/project.pbxproj
@@ -21,8 +21,46 @@
6A5D9A3715E0163E001FAD14 /* PhotoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A5D9A3615E0163E001FAD14 /* PhotoViewController.m */; };
6A5D9A4615E017AA001FAD14 /* DLCImagePickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A5D9A4415E017AA001FAD14 /* DLCImagePickerController.m */; };
6A5D9A4715E017AA001FAD14 /* DLCImagePicker.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A4515E017AA001FAD14 /* DLCImagePicker.xib */; };
+ 6A5D9A5715E01BD7001FAD14 /* libGPUImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A5215E01B72001FAD14 /* libGPUImage.a */; };
+ 6A5D9A5915E01DA4001FAD14 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A5D9A5815E01DA4001FAD14 /* AssetsLibrary.framework */; };
+ 6A5D9A6F15E02195001FAD14 /* mask.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A6D15E02195001FAD14 /* mask.png */; };
+ 6A5D9A7015E02195001FAD14 /* blackframe.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A6E15E02195001FAD14 /* blackframe.png */; };
+ 6A5D9A7715E021AB001FAD14 /* dock_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A7115E021AB001FAD14 /* dock_bg.png */; };
+ 6A5D9A7815E021AB001FAD14 /* dock_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A7215E021AB001FAD14 /* dock_bg@2x.png */; };
+ 6A5D9A7915E021AB001FAD14 /* photo_bar.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A7315E021AB001FAD14 /* photo_bar.png */; };
+ 6A5D9A7A15E021AB001FAD14 /* photo_bar@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A7415E021AB001FAD14 /* photo_bar@2x.png */; };
+ 6A5D9A7B15E021AB001FAD14 /* micro_carbon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A7515E021AB001FAD14 /* micro_carbon.png */; };
+ 6A5D9A7C15E021AB001FAD14 /* micro_carbon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A7615E021AB001FAD14 /* micro_carbon@2x.png */; };
+ 6A5D9A8115E021B6001FAD14 /* lookup_amatorka.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A7D15E021B6001FAD14 /* lookup_amatorka.png */; };
+ 6A5D9A8215E021B6001FAD14 /* lookup_miss_etikate.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A7E15E021B6001FAD14 /* lookup_miss_etikate.png */; };
+ 6A5D9A8315E021B6001FAD14 /* lookup_soft_elegance_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A7F15E021B6001FAD14 /* lookup_soft_elegance_1.png */; };
+ 6A5D9A8415E021B6001FAD14 /* lookup_soft_elegance_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A5D9A8015E021B6001FAD14 /* lookup_soft_elegance_2.png */; };
/* End PBXBuildFile section */
+/* Begin PBXContainerItemProxy section */
+ 6A5D9A5115E01B72001FAD14 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = BCF1A33414DDB1EC00852800;
+ remoteInfo = GPUImage;
+ };
+ 6A5D9A5315E01B72001FAD14 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = BCF1A34414DDB1EC00852800;
+ remoteInfo = GPUImageTests;
+ };
+ 6A5D9A5515E01BC2001FAD14 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = BCF1A33314DDB1EC00852800;
+ remoteInfo = GPUImage;
+ };
+/* End PBXContainerItemProxy section */
+
/* Begin PBXFileReference section */
6A5D9A1015E0152D001FAD14 /* DLCImagePickerController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DLCImagePickerController.app; sourceTree = BUILT_PRODUCTS_DIR; };
6A5D9A1415E0152D001FAD14 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
@@ -44,6 +82,20 @@
6A5D9A4315E017AA001FAD14 /* DLCImagePickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DLCImagePickerController.h; sourceTree = "<group>"; };
6A5D9A4415E017AA001FAD14 /* DLCImagePickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DLCImagePickerController.m; sourceTree = "<group>"; };
6A5D9A4515E017AA001FAD14 /* DLCImagePicker.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DLCImagePicker.xib; sourceTree = "<group>"; };
+ 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GPUImage.xcodeproj; path = GPUImage/framework/GPUImage.xcodeproj; sourceTree = "<group>"; };
+ 6A5D9A5815E01DA4001FAD14 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
+ 6A5D9A6D15E02195001FAD14 /* mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mask.png; sourceTree = "<group>"; };
+ 6A5D9A6E15E02195001FAD14 /* blackframe.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blackframe.png; sourceTree = "<group>"; };
+ 6A5D9A7115E021AB001FAD14 /* dock_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dock_bg.png; sourceTree = "<group>"; };
+ 6A5D9A7215E021AB001FAD14 /* dock_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "dock_bg@2x.png"; sourceTree = "<group>"; };
+ 6A5D9A7315E021AB001FAD14 /* photo_bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_bar.png; sourceTree = "<group>"; };
+ 6A5D9A7415E021AB001FAD14 /* photo_bar@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo_bar@2x.png"; sourceTree = "<group>"; };
+ 6A5D9A7515E021AB001FAD14 /* micro_carbon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = micro_carbon.png; sourceTree = "<group>"; };
+ 6A5D9A7615E021AB001FAD14 /* micro_carbon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "micro_carbon@2x.png"; sourceTree = "<group>"; };
+ 6A5D9A7D15E021B6001FAD14 /* lookup_amatorka.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lookup_amatorka.png; sourceTree = "<group>"; };
+ 6A5D9A7E15E021B6001FAD14 /* lookup_miss_etikate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lookup_miss_etikate.png; sourceTree = "<group>"; };
+ 6A5D9A7F15E021B6001FAD14 /* lookup_soft_elegance_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lookup_soft_elegance_1.png; sourceTree = "<group>"; };
+ 6A5D9A8015E021B6001FAD14 /* lookup_soft_elegance_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lookup_soft_elegance_2.png; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -51,6 +103,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 6A5D9A5915E01DA4001FAD14 /* AssetsLibrary.framework in Frameworks */,
+ 6A5D9A5715E01BD7001FAD14 /* libGPUImage.a in Frameworks */,
6A5D9A3415E015B3001FAD14 /* AVFoundation.framework in Frameworks */,
6A5D9A3215E015A1001FAD14 /* OpenGLES.framework in Frameworks */,
6A5D9A3015E01598001FAD14 /* QuartzCore.framework in Frameworks */,
@@ -68,6 +122,7 @@
6A5D9A0515E0152D001FAD14 = {
isa = PBXGroup;
children = (
+ 6A5D9A6915E02164001FAD14 /* Images */,
6A5D9A1A15E0152D001FAD14 /* DLCImagePickerController */,
6A5D9A1315E0152D001FAD14 /* Frameworks */,
6A5D9A1115E0152D001FAD14 /* Products */,
@@ -85,6 +140,8 @@
6A5D9A1315E0152D001FAD14 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 6A5D9A5815E01DA4001FAD14 /* AssetsLibrary.framework */,
+ 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */,
6A5D9A3315E015B3001FAD14 /* AVFoundation.framework */,
6A5D9A3115E015A1001FAD14 /* OpenGLES.framework */,
6A5D9A2F15E01598001FAD14 /* QuartzCore.framework */,
@@ -123,6 +180,58 @@
name = "Supporting Files";
sourceTree = "<group>";
};
+ 6A5D9A4915E01B72001FAD14 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 6A5D9A5215E01B72001FAD14 /* libGPUImage.a */,
+ 6A5D9A5415E01B72001FAD14 /* GPUImageTests.octest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 6A5D9A6915E02164001FAD14 /* Images */ = {
+ isa = PBXGroup;
+ children = (
+ 6A5D9A6C15E02181001FAD14 /* Overlays */,
+ 6A5D9A6B15E0217A001FAD14 /* UI */,
+ 6A5D9A6A15E0216D001FAD14 /* Filters */,
+ );
+ name = Images;
+ sourceTree = "<group>";
+ };
+ 6A5D9A6A15E0216D001FAD14 /* Filters */ = {
+ isa = PBXGroup;
+ children = (
+ 6A5D9A7D15E021B6001FAD14 /* lookup_amatorka.png */,
+ 6A5D9A7E15E021B6001FAD14 /* lookup_miss_etikate.png */,
+ 6A5D9A7F15E021B6001FAD14 /* lookup_soft_elegance_1.png */,
+ 6A5D9A8015E021B6001FAD14 /* lookup_soft_elegance_2.png */,
+ );
+ name = Filters;
+ sourceTree = "<group>";
+ };
+ 6A5D9A6B15E0217A001FAD14 /* UI */ = {
+ isa = PBXGroup;
+ children = (
+ 6A5D9A7115E021AB001FAD14 /* dock_bg.png */,
+ 6A5D9A7215E021AB001FAD14 /* dock_bg@2x.png */,
+ 6A5D9A7315E021AB001FAD14 /* photo_bar.png */,
+ 6A5D9A7415E021AB001FAD14 /* photo_bar@2x.png */,
+ 6A5D9A7515E021AB001FAD14 /* micro_carbon.png */,
+ 6A5D9A7615E021AB001FAD14 /* micro_carbon@2x.png */,
+ );
+ name = UI;
+ sourceTree = "<group>";
+ };
+ 6A5D9A6C15E02181001FAD14 /* Overlays */ = {
+ isa = PBXGroup;
+ children = (
+ 6A5D9A6D15E02195001FAD14 /* mask.png */,
+ 6A5D9A6E15E02195001FAD14 /* blackframe.png */,
+ );
+ name = Overlays;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -137,6 +246,7 @@
buildRules = (
);
dependencies = (
+ 6A5D9A5615E01BC2001FAD14 /* PBXTargetDependency */,
);
name = DLCImagePickerController;
productName = DLCImagePickerController;
@@ -162,6 +272,12 @@
mainGroup = 6A5D9A0515E0152D001FAD14;
productRefGroup = 6A5D9A1115E0152D001FAD14 /* Products */;
projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = 6A5D9A4915E01B72001FAD14 /* Products */;
+ ProjectRef = 6A5D9A4815E01B72001FAD14 /* GPUImage.xcodeproj */;
+ },
+ );
projectRoot = "";
targets = (
6A5D9A0F15E0152D001FAD14 /* DLCImagePickerController */,
@@ -169,6 +285,23 @@
};
/* End PBXProject section */
+/* Begin PBXReferenceProxy section */
+ 6A5D9A5215E01B72001FAD14 /* libGPUImage.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libGPUImage.a;
+ remoteRef = 6A5D9A5115E01B72001FAD14 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 6A5D9A5415E01B72001FAD14 /* GPUImageTests.octest */ = {
+ isa = PBXReferenceProxy;
+ fileType = wrapper.cfbundle;
+ path = GPUImageTests.octest;
+ remoteRef = 6A5D9A5315E01B72001FAD14 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+/* End PBXReferenceProxy section */
+
/* Begin PBXResourcesBuildPhase section */
6A5D9A0E15E0152D001FAD14 /* Resources */ = {
isa = PBXResourcesBuildPhase;
@@ -176,6 +309,18 @@
files = (
6A5D9A1F15E0152D001FAD14 /* InfoPlist.strings in Resources */,
6A5D9A4715E017AA001FAD14 /* DLCImagePicker.xib in Resources */,
+ 6A5D9A6F15E02195001FAD14 /* mask.png in Resources */,
+ 6A5D9A7015E02195001FAD14 /* blackframe.png in Resources */,
+ 6A5D9A7715E021AB001FAD14 /* dock_bg.png in Resources */,
+ 6A5D9A7815E021AB001FAD14 /* dock_bg@2x.png in Resources */,
+ 6A5D9A7915E021AB001FAD14 /* photo_bar.png in Resources */,
+ 6A5D9A7A15E021AB001FAD14 /* photo_bar@2x.png in Resources */,
+ 6A5D9A7B15E021AB001FAD14 /* micro_carbon.png in Resources */,
+ 6A5D9A7C15E021AB001FAD14 /* micro_carbon@2x.png in Resources */,
+ 6A5D9A8115E021B6001FAD14 /* lookup_amatorka.png in Resources */,
+ 6A5D9A8215E021B6001FAD14 /* lookup_miss_etikate.png in Resources */,
+ 6A5D9A8315E021B6001FAD14 /* lookup_soft_elegance_1.png in Resources */,
+ 6A5D9A8415E021B6001FAD14 /* lookup_soft_elegance_2.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -195,6 +340,14 @@
};
/* End PBXSourcesBuildPhase section */
+/* Begin PBXTargetDependency section */
+ 6A5D9A5615E01BC2001FAD14 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = GPUImage;
+ targetProxy = 6A5D9A5515E01BC2001FAD14 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
/* Begin PBXVariantGroup section */
6A5D9A1D15E0152D001FAD14 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
@@ -227,6 +380,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = "../GPUImage/framework/**";
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
SDKROOT = iphoneos;
};
@@ -245,6 +399,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = "../GPUImage/framework/**";
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
View
BIN  ...r.xcodeproj/project.xcworkspace/xcuserdata/DLC.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
View
33 ...gePickerController.xcodeproj/xcuserdata/DLC.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+ <FileBreakpoints>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "PhotoViewController.m"
+ timestampString = "367009843.367855"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "48"
+ endingLineNumber = "48"
+ landmarkName = "-takePhoto:"
+ landmarkType = "5">
+ </FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "PhotoViewController.m"
+ timestampString = "367009843.367855"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "31"
+ endingLineNumber = "31"
+ landmarkName = "-loadView"
+ landmarkType = "5">
+ </FileBreakpoint>
+ </FileBreakpoints>
+</Bucket>
View
1  DLCImagePickerController/AppDelegate.h
@@ -11,5 +11,6 @@
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
+@property (retain, nonatomic) UIViewController *rootViewController;
@end
View
7 DLCImagePickerController/AppDelegate.m
@@ -12,15 +12,16 @@
@implementation AppDelegate
@synthesize window = _window;
+@synthesize rootViewController = _rootViewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
- UIViewController *rootViewController = [[PhotoViewController alloc] initWithNibName:nil bundle:nil];
- rootViewController.view.frame = [[UIScreen mainScreen] bounds];
- [self.window addSubview:rootViewController.view];
+ self.rootViewController = [[PhotoViewController alloc] initWithNibName:nil bundle:nil];
+ self.rootViewController.view.frame = [[UIScreen mainScreen] bounds];
+ [self.window addSubview:self.rootViewController.view];
[self.window makeKeyAndVisible];
return YES;
}
View
9 DLCImagePickerController/DLCImagePicker.xib
@@ -136,6 +136,7 @@
<string key="NSFrame">{{250, 3}, {65, 37}}</string>
<reference key="NSSuperview" ref="31350387"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -723,6 +724,14 @@
<string key="minorKey">./Classes/DLCImagePickerController.h</string>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">GPUImageView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/GPUImageView.h</string>
+ </object>
+ </object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
View
2  DLCImagePickerController/DLCImagePickerController.h
@@ -27,7 +27,7 @@
}
@property (nonatomic, weak) IBOutlet GPUImageView *imageView;
-@property (nonatomic, weak) id <DCImagePickerDelegate> delegate;
+@property (nonatomic, weak) id <DLCImagePickerDelegate> delegate;
@property (nonatomic, weak) IBOutlet UIButton *photoCaptureButton;
@property (nonatomic, weak) IBOutlet UIButton *cancelButton;
View
15 DLCImagePickerController/DLCImagePickerController.m
@@ -273,7 +273,7 @@ -(IBAction) handlePan:(UIGestureRecognizer *) sender {
-(IBAction) handlePinch:(UIPinchGestureRecognizer *) sender {
if(hasBlur){
- NSLog(@"Pinch scale: %g", [sender scale]);
+ //NSLog(@"Pinch scale: %g", [sender scale]);
CGPoint midpoint = [sender locationInView:imageView];
@@ -303,6 +303,7 @@ -(IBAction) handlePinch:(UIPinchGestureRecognizer *) sender {
-(IBAction)toggleFilters:(UIButton *)sender{
sender.enabled = NO;
+ [stillCamera pauseCameraCapture];
if(sender.selected){
CGRect imageRect = self.imageView.frame;
imageRect.origin.y += 26;
@@ -311,7 +312,7 @@ -(IBAction)toggleFilters:(UIButton *)sender{
CGRect sliderScrollFrameBackground = self.filtersBackgroundImageView.frame;
sliderScrollFrameBackground.origin.y += self.filtersBackgroundImageView.frame.size.height-3;
- [stillCamera pauseCameraCapture];
+
[UIView animateWithDuration:0.15
delay:0.0
options: UIViewAnimationCurveLinear
@@ -322,9 +323,11 @@ -(IBAction)toggleFilters:(UIButton *)sender{
}
completion:^(BOOL finished){
[stillCamera resumeCameraCapture];
- NSLog(@"Done!");
+ //NSLog(@"Done!");
[sender setSelected:NO];
sender.enabled = YES;
+ self.filterScrollView.hidden = YES;
+ self.filtersBackgroundImageView.hidden = YES;
}];
}else{
[sender setSelected:YES];
@@ -334,7 +337,9 @@ -(IBAction)toggleFilters:(UIButton *)sender{
sliderScrollFrame.origin.y -= self.filterScrollView.frame.size.height;
CGRect sliderScrollFrameBackground = self.filtersBackgroundImageView.frame;
sliderScrollFrameBackground.origin.y -= self.filtersBackgroundImageView.frame.size.height-3;
- [stillCamera resumeCameraCapture];
+
+ self.filterScrollView.hidden = NO;
+ self.filtersBackgroundImageView.hidden = NO;
[UIView animateWithDuration:0.15
delay:0.0
options: UIViewAnimationCurveLinear
@@ -345,7 +350,7 @@ -(IBAction)toggleFilters:(UIButton *)sender{
}
completion:^(BOOL finished){
[stillCamera resumeCameraCapture];
- NSLog(@"Done!");
+ //NSLog(@"Done!");
[sender setSelected:YES];
sender.enabled = YES;
}];
1  GPUImage
@@ -0,0 +1 @@
+Subproject commit cf29a44c83f56f14d102035c6d50e27e21e31a8b
View
6 PhotoViewController.h
@@ -9,8 +9,8 @@
#import <UIKit/UIKit.h>
#import "DLCImagePickerController.h"
-@interface PhotoViewController : UIViewController<DLCImagePickerDelegate>{
- UIButton *showPickerButton;
-}
+@interface PhotoViewController : UIViewController<DLCImagePickerDelegate>
+
+@property (nonatomic, strong) UIButton *showPickerButton;
@end
View
32 PhotoViewController.m
@@ -7,6 +7,7 @@
//
#import "PhotoViewController.h"
+#import <AssetsLibrary/AssetsLibrary.h>
@interface PhotoViewController ()
@@ -14,6 +15,8 @@ @interface PhotoViewController ()
@implementation PhotoViewController
+@synthesize showPickerButton;
+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
@@ -26,35 +29,33 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- (void)loadView
{
CGRect mainScreenFrame = [[UIScreen mainScreen] bounds];
-
- // Yes, I know I'm a caveman for doing all this by hand
UIView *primaryView = [[GPUImageView alloc] initWithFrame:mainScreenFrame];
- photoCaptureButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
- photoCaptureButton.frame = CGRectMake(round(mainScreenFrame.size.width / 2.0 - 150.0 / 2.0), mainScreenFrame.size.height - 90.0, 150.0, 40.0);
- [photoCaptureButton setTitle:@"Photo" forState:UIControlStateNormal];
- photoCaptureButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
- [photoCaptureButton addTarget:self action:@selector(takePhoto:) forControlEvents:UIControlEventTouchUpInside];
- [photoCaptureButton setTitleColor:[UIColor grayColor] forState:UIControlStateDisabled];
+ showPickerButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
+ showPickerButton.frame = CGRectMake(round(mainScreenFrame.size.width / 2.0 - 150.0 / 2.0), mainScreenFrame.size.height - 90.0, 150.0, 40.0);
+ [showPickerButton setTitle:@"Show picker" forState:UIControlStateNormal];
+ showPickerButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
+ [showPickerButton addTarget:self action:@selector(takePhoto:) forControlEvents:UIControlEventTouchUpInside];
+ [showPickerButton setTitleColor:[UIColor grayColor] forState:UIControlStateDisabled];
- [primaryView addSubview:photoCaptureButton];
+ [primaryView addSubview:showPickerButton];
self.view = primaryView;
}
-(void) takePhoto:(id)sender{
- DCImagePickerController *picker = [[DCImagePickerController alloc] init];
+ NSLog(@"here");
+ DLCImagePickerController *picker = [[DLCImagePickerController alloc] init];
picker.delegate = self;
[self presentModalViewController:picker animated:YES];
}
--(void) imagePickerControllerDidCancel:(DCImagePickerController *)picker{
+-(void) imagePickerControllerDidCancel:(DLCImagePickerController *)picker{
[self dismissModalViewControllerAnimated:YES];
}
--(void) imagePickerController:(DCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
-
+-(void) imagePickerController:(DLCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
if (info) {
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
@@ -72,4 +73,9 @@ -(void) imagePickerController:(DCImagePickerController *)picker didFinishPicking
}];
}
}
+
+-(void) viewDidUnload {
+ [super viewDidUnload];
+ showPickerButton = nil;
+}
@end
View
BIN  blackframe.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  dock_bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  dock_bg@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  lookup_amatorka.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  lookup_miss_etikate.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  lookup_soft_elegance_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  lookup_soft_elegance_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  mask.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  micro_carbon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  micro_carbon@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  photo_bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  photo_bar@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.