Permalink
Browse files

Started adding support for gesture recognizers added via XIBs

  • Loading branch information...
1 parent 6a36a3a commit a141ec6ff7e4763d2ae559a6e1a04ce801325984 Adrian Kosmaczewski committed Nov 7, 2011
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 45;
+ objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
@@ -293,9 +293,16 @@
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
- buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "nib2objc" */;
- compatibilityVersion = "Xcode 3.1";
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
+ buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "Command Line" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
hasScannedForEncodings = 1;
+ knownRegions = (
+ en,
+ );
mainGroup = 08FB7794FE84155DC02AAC07 /* nib2objc */;
projectDirPath = "";
projectRoot = "";
@@ -356,7 +363,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -392,8 +398,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
- PREBINDING = NO;
- SDKROOT = macosx10.5;
+ SDKROOT = macosx;
};
name = Debug;
};
@@ -404,8 +409,7 @@
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- PREBINDING = NO;
- SDKROOT = macosx10.5;
+ SDKROOT = macosx;
};
name = Release;
};
@@ -421,7 +425,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "nib2objc" */ = {
+ 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "Command Line" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB927908733DD40010E9CD /* Debug */,
@@ -9,6 +9,10 @@
/* Begin PBXBuildFile section */
1DDD582C0DA1D0D100B32029 /* MyDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58280DA1D0D100B32029 /* MyDocument.xib */; };
1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */; };
+ 3A13E9F3146822B50099DE03 /* UIGestureRecognizerProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A13E9F2146822B50099DE03 /* UIGestureRecognizerProcessor.m */; };
+ 3A13E9F6146823500099DE03 /* UIPinchGestureRecognizerProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A13E9F5146823500099DE03 /* UIPinchGestureRecognizerProcessor.m */; };
+ 3A13E9F9146828AE0099DE03 /* UIRotationGestureRecognizerProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A13E9F8146828AE0099DE03 /* UIRotationGestureRecognizerProcessor.m */; };
+ 3A13E9FC14682ADE0099DE03 /* UISwipeGestureRecognizerProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A13E9FB14682ADE0099DE03 /* UISwipeGestureRecognizerProcessor.m */; };
3A527B4C12006FAD00F0986C /* MGSFragaria.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3ACD6E2A120067A2006C9D8E /* MGSFragaria.framework */; };
3A92DE6311F308C300E0EF30 /* nib2objc.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3A92DE6211F308C300E0EF30 /* nib2objc.icns */; };
3A92E20211F3153000E0EF30 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A92E20111F3153000E0EF30 /* AppDelegate.m */; };
@@ -110,6 +114,14 @@
2A37F4BAFDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 3A13E9F1146822B50099DE03 /* UIGestureRecognizerProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIGestureRecognizerProcessor.h; sourceTree = "<group>"; };
+ 3A13E9F2146822B50099DE03 /* UIGestureRecognizerProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIGestureRecognizerProcessor.m; sourceTree = "<group>"; };
+ 3A13E9F4146823500099DE03 /* UIPinchGestureRecognizerProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPinchGestureRecognizerProcessor.h; sourceTree = "<group>"; };
+ 3A13E9F5146823500099DE03 /* UIPinchGestureRecognizerProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIPinchGestureRecognizerProcessor.m; sourceTree = "<group>"; };
+ 3A13E9F7146828AD0099DE03 /* UIRotationGestureRecognizerProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRotationGestureRecognizerProcessor.h; sourceTree = "<group>"; };
+ 3A13E9F8146828AE0099DE03 /* UIRotationGestureRecognizerProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIRotationGestureRecognizerProcessor.m; sourceTree = "<group>"; };
+ 3A13E9FA14682ADE0099DE03 /* UISwipeGestureRecognizerProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISwipeGestureRecognizerProcessor.h; sourceTree = "<group>"; };
+ 3A13E9FB14682ADE0099DE03 /* UISwipeGestureRecognizerProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UISwipeGestureRecognizerProcessor.m; sourceTree = "<group>"; };
3A92DE6211F308C300E0EF30 /* nib2objc.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = nib2objc.icns; sourceTree = "<group>"; };
3A92E20011F3153000E0EF30 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
3A92E20111F3153000E0EF30 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -383,6 +395,14 @@
3AEDA04411F2578100D0D041 /* UIViewProcessor.m */,
3AEDA04511F2578100D0D041 /* UIWebViewProcessor.h */,
3AEDA04611F2578100D0D041 /* UIWebViewProcessor.m */,
+ 3A13E9F1146822B50099DE03 /* UIGestureRecognizerProcessor.h */,
+ 3A13E9F2146822B50099DE03 /* UIGestureRecognizerProcessor.m */,
+ 3A13E9F4146823500099DE03 /* UIPinchGestureRecognizerProcessor.h */,
+ 3A13E9F5146823500099DE03 /* UIPinchGestureRecognizerProcessor.m */,
+ 3A13E9F7146828AD0099DE03 /* UIRotationGestureRecognizerProcessor.h */,
+ 3A13E9F8146828AE0099DE03 /* UIRotationGestureRecognizerProcessor.m */,
+ 3A13E9FA14682ADE0099DE03 /* UISwipeGestureRecognizerProcessor.h */,
+ 3A13E9FB14682ADE0099DE03 /* UISwipeGestureRecognizerProcessor.m */,
);
path = Processors;
sourceTree = "<group>";
@@ -418,7 +438,7 @@
attributes = {
LastUpgradeCheck = 0420;
};
- buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "nib2objc" */;
+ buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "GUI App" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
@@ -520,6 +540,10 @@
3AEDA06611F2578100D0D041 /* UIViewProcessor.m in Sources */,
3AEDA06711F2578100D0D041 /* UIWebViewProcessor.m in Sources */,
3A92E20211F3153000E0EF30 /* AppDelegate.m in Sources */,
+ 3A13E9F3146822B50099DE03 /* UIGestureRecognizerProcessor.m in Sources */,
+ 3A13E9F6146823500099DE03 /* UIPinchGestureRecognizerProcessor.m in Sources */,
+ 3A13E9F9146828AE0099DE03 /* UIRotationGestureRecognizerProcessor.m in Sources */,
+ 3A13E9FC14682ADE0099DE03 /* UISwipeGestureRecognizerProcessor.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -640,7 +664,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "nib2objc" */ = {
+ C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "GUI App" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C05733CC08A9546B00998B17 /* Debug */,
@@ -44,5 +44,6 @@
- (NSString *)tabBarSystemItemString;
- (NSString *)mapTypeString;
- (NSString *)clearButtonModeString;
+- (NSString *)swipeGestureRecognizerDirectionString;
@end
@@ -372,4 +372,13 @@ - (NSString *)clearButtonModeString
return [values objectAtIndex:[self intValue]];
}
+- (NSString *)swipeGestureRecognizerDirectionString
+{
+ NSArray *values = [NSArray arrayWithObjects:@"UISwipeGestureRecognizerDirectionRight",
+ @"UISwipeGestureRecognizerDirectionLeft",
+ @"UISwipeGestureRecognizerDirectionUp",
+ @"UISwipeGestureRecognizerDirectionDown", nil];
+ return [values objectAtIndex:[self intValue]];
+}
+
@end
@@ -37,6 +37,9 @@
#import "UITabBarProcessor.h"
#import "UITabBarItemProcessor.h"
#import "MKMapViewProcessor.h"
+#import "UIPinchGestureRecognizerProcessor.h"
+#import "UIRotationGestureRecognizerProcessor.h"
+#import "UISwipeGestureRecognizerProcessor.h"
@interface Processor (Protected)
@@ -79,6 +82,9 @@ + (Processor *)processorForClass:(NSString *)klass
else if ([klass isEqualToString:@"IBUITabBar"]) processor = [[UITabBarProcessor alloc] init];
else if ([klass isEqualToString:@"IBUITabBarItem"]) processor = [[UITabBarItemProcessor alloc] init];
else if ([klass isEqualToString:@"IBMKMapView"]) processor = [[MKMapViewProcessor alloc] init];
+ else if ([klass isEqualToString:@"IBUIPinchGestureRecognizer"]) processor = [[UIPinchGestureRecognizerProcessor alloc] init];
+ else if ([klass isEqualToString:@"IBUIRotationGestureRecognizer"]) processor = [[UIRotationGestureRecognizerProcessor alloc] init];
+ else if ([klass isEqualToString:@"IBUISwipeGestureRecognizer"]) processor = [[UISwipeGestureRecognizerProcessor alloc] init];
return [processor autorelease];
}
@@ -45,6 +45,10 @@ - (void)processKey:(id)item value:(id)value
{
object = @"nil";
}
+ else if ([item isEqualToString:@"imageInsets"])
+ {
+ object = @"UIEdgeInsetsZero";
+ }
if (object != nil)
{
[output setObject:object forKey:item];
@@ -0,0 +1,13 @@
+//
+// UIGestureRecognizerProcessor.h
+// nib2objc
+//
+// Created by Adrian Kosmaczewski on 11/7/11.
+// Copyright (c) 2011 akosma software. All rights reserved.
+//
+
+#import "Processor.h"
+
+@interface UIGestureRecognizerProcessor : Processor
+
+@end
@@ -0,0 +1,59 @@
+//
+// UIGestureRecognizerProcessor.m
+// nib2objc
+//
+// Created by Adrian Kosmaczewski on 11/7/11.
+// Copyright (c) 2011 akosma software. All rights reserved.
+//
+
+#import "UIGestureRecognizerProcessor.h"
+#import "NSString+Nib2ObjcExtensions.h"
+#import "NSNumber+Nib2ObjcExtensions.h"
+
+@implementation UIGestureRecognizerProcessor
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+- (NSString *)getProcessedClassName
+{
+ return @"UIGestureRecognizer";
+}
+
+- (NSString *)constructorString
+{
+ return [NSString stringWithFormat:@"[[%@ alloc] init]", [self getProcessedClassName]];
+}
+
+- (void)processKey:(id)item value:(id)value
+{
+ id object = nil;
+ if ([item isEqualToString:@"class"])
+ {
+ object = [self getProcessedClassName];
+ }
+ else if ([item isEqualToString:@"enabled"])
+ {
+ object = [value booleanString];
+ }
+ else if ([item isEqualToString:@"cancelsTouchesInView"])
+ {
+ object = [value booleanString];
+ }
+ else if ([item isEqualToString:@"delaysTouchesBegan"])
+ {
+ object = [value booleanString];
+ }
+ else if ([item isEqualToString:@"delaysTouchesEnded"])
+ {
+ object = [value booleanString];
+ }
+ if (object != nil)
+ {
+ [output setObject:object forKey:item];
+ }
+}
+
+@end
@@ -0,0 +1,13 @@
+//
+// UIPinchGestureRecognizerProcessor.h
+// nib2objc
+//
+// Created by Adrian Kosmaczewski on 11/7/11.
+// Copyright (c) 2011 akosma software. All rights reserved.
+//
+
+#import "UIGestureRecognizerProcessor.h"
+
+@interface UIPinchGestureRecognizerProcessor : UIGestureRecognizerProcessor
+
+@end
@@ -0,0 +1,36 @@
+//
+// UIPinchGestureRecognizerProcessor.m
+// nib2objc
+//
+// Created by Adrian Kosmaczewski on 11/7/11.
+// Copyright (c) 2011 akosma software. All rights reserved.
+//
+
+#import "UIPinchGestureRecognizerProcessor.h"
+#import "NSNumber+Nib2ObjcExtensions.h"
+
+@implementation UIPinchGestureRecognizerProcessor
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+- (NSString *)getProcessedClassName
+{
+ return @"UIPinchGestureRecognizer";
+}
+
+- (void)processKey:(id)item value:(id)value
+{
+ if ([item isEqualToString:@"scale"])
+ {
+ [output setObject:[value floatString] forKey:item];
+ }
+ else
+ {
+ [super processKey:item value:value];
+ }
+}
+
+@end
@@ -0,0 +1,13 @@
+//
+// UIRotationGestureRecognizerProcessor.h
+// nib2objc
+//
+// Created by Adrian Kosmaczewski on 11/7/11.
+// Copyright (c) 2011 akosma software. All rights reserved.
+//
+
+#import "UIGestureRecognizerProcessor.h"
+
+@interface UIRotationGestureRecognizerProcessor : UIGestureRecognizerProcessor
+
+@end
@@ -0,0 +1,36 @@
+//
+// UIRotationGestureRecognizerProcessor.m
+// nib2objc
+//
+// Created by Adrian Kosmaczewski on 11/7/11.
+// Copyright (c) 2011 akosma software. All rights reserved.
+//
+
+#import "UIRotationGestureRecognizerProcessor.h"
+#import "NSNumber+Nib2ObjcExtensions.h"
+
+@implementation UIRotationGestureRecognizerProcessor
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+- (NSString *)getProcessedClassName
+{
+ return @"UIRotationGestureRecognizer";
+}
+
+- (void)processKey:(id)item value:(id)value
+{
+ if ([item isEqualToString:@"rotation"])
+ {
+ [output setObject:[value floatString] forKey:item];
+ }
+ else
+ {
+ [super processKey:item value:value];
+ }
+}
+
+@end
@@ -0,0 +1,13 @@
+//
+// UISwipeGestureRecognizerProcessor.h
+// nib2objc
+//
+// Created by Adrian Kosmaczewski on 11/7/11.
+// Copyright (c) 2011 akosma software. All rights reserved.
+//
+
+#import "UIGestureRecognizerProcessor.h"
+
+@interface UISwipeGestureRecognizerProcessor : UIGestureRecognizerProcessor
+
+@end
Oops, something went wrong.

0 comments on commit a141ec6

Please sign in to comment.