Browse files

Initial commit

  • Loading branch information...
0 parents commit afc1a28c28a5909aa19ccd4d81e681572fb8c71f Fabio Rodella committed Jan 20, 2012
17 .gitignore
@@ -0,0 +1,17 @@
+.DS_Store
+*.swp
+*~.nib
+
+xcuserdata/
+
+*.mode1v3
+*.pbxuser
+build/
+*.perspectivev3
+*.perspective
+
+*.xcuserstate
+
+*.mode2v3
+project.xcworkspace/
+*.orig
315 PullableView.xcodeproj/project.pbxproj
@@ -0,0 +1,315 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 15AF6C5714C9AB8400BC1DB4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15AF6C5614C9AB8400BC1DB4 /* UIKit.framework */; };
+ 15AF6C5914C9AB8400BC1DB4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15AF6C5814C9AB8400BC1DB4 /* Foundation.framework */; };
+ 15AF6C5B14C9AB8400BC1DB4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15AF6C5A14C9AB8400BC1DB4 /* CoreGraphics.framework */; };
+ 15AF6C6114C9AB8400BC1DB4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 15AF6C5F14C9AB8400BC1DB4 /* InfoPlist.strings */; };
+ 15AF6C6314C9AB8400BC1DB4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 15AF6C6214C9AB8400BC1DB4 /* main.m */; };
+ 15AF6C6714C9AB8400BC1DB4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 15AF6C6614C9AB8400BC1DB4 /* AppDelegate.m */; };
+ 15AF6C6A14C9AB8400BC1DB4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 15AF6C6914C9AB8400BC1DB4 /* ViewController.m */; };
+ 15AF6C6D14C9AB8400BC1DB4 /* ViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 15AF6C6B14C9AB8400BC1DB4 /* ViewController_iPhone.xib */; };
+ 15AF6C7014C9AB8400BC1DB4 /* ViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 15AF6C6E14C9AB8400BC1DB4 /* ViewController_iPad.xib */; };
+ 15AF6C7814C9ABB600BC1DB4 /* PullableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 15AF6C7714C9ABB600BC1DB4 /* PullableView.m */; };
+ 15AF6C7B14C9ACF500BC1DB4 /* StyledPullableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 15AF6C7A14C9ACF500BC1DB4 /* StyledPullableView.m */; };
+ 15AF6C7E14C9B29700BC1DB4 /* background.png in Resources */ = {isa = PBXBuildFile; fileRef = 15AF6C7C14C9B29700BC1DB4 /* background.png */; };
+ 15AF6C7F14C9B29700BC1DB4 /* background@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 15AF6C7D14C9B29700BC1DB4 /* background@2x.png */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 15AF6C5214C9AB8400BC1DB4 /* PullableView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PullableView.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 15AF6C5614C9AB8400BC1DB4 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 15AF6C5814C9AB8400BC1DB4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 15AF6C5A14C9AB8400BC1DB4 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 15AF6C5E14C9AB8400BC1DB4 /* PullableView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PullableView-Info.plist"; sourceTree = "<group>"; };
+ 15AF6C6014C9AB8400BC1DB4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 15AF6C6214C9AB8400BC1DB4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 15AF6C6414C9AB8400BC1DB4 /* PullableView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PullableView-Prefix.pch"; sourceTree = "<group>"; };
+ 15AF6C6514C9AB8400BC1DB4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ 15AF6C6614C9AB8400BC1DB4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ 15AF6C6814C9AB8400BC1DB4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+ 15AF6C6914C9AB8400BC1DB4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+ 15AF6C6C14C9AB8400BC1DB4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPhone.xib; sourceTree = "<group>"; };
+ 15AF6C6F14C9AB8400BC1DB4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPad.xib; sourceTree = "<group>"; };
+ 15AF6C7614C9ABB600BC1DB4 /* PullableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PullableView.h; sourceTree = "<group>"; };
+ 15AF6C7714C9ABB600BC1DB4 /* PullableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PullableView.m; sourceTree = "<group>"; };
+ 15AF6C7914C9ACF500BC1DB4 /* StyledPullableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyledPullableView.h; sourceTree = "<group>"; };
+ 15AF6C7A14C9ACF500BC1DB4 /* StyledPullableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StyledPullableView.m; sourceTree = "<group>"; };
+ 15AF6C7C14C9B29700BC1DB4 /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = background.png; sourceTree = "<group>"; };
+ 15AF6C7D14C9B29700BC1DB4 /* background@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "background@2x.png"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 15AF6C4F14C9AB8400BC1DB4 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 15AF6C5714C9AB8400BC1DB4 /* UIKit.framework in Frameworks */,
+ 15AF6C5914C9AB8400BC1DB4 /* Foundation.framework in Frameworks */,
+ 15AF6C5B14C9AB8400BC1DB4 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 15AF6C4714C9AB8400BC1DB4 = {
+ isa = PBXGroup;
+ children = (
+ 15AF6C5C14C9AB8400BC1DB4 /* PullableView */,
+ 15AF6C5514C9AB8400BC1DB4 /* Frameworks */,
+ 15AF6C5314C9AB8400BC1DB4 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 15AF6C5314C9AB8400BC1DB4 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 15AF6C5214C9AB8400BC1DB4 /* PullableView.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 15AF6C5514C9AB8400BC1DB4 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 15AF6C5614C9AB8400BC1DB4 /* UIKit.framework */,
+ 15AF6C5814C9AB8400BC1DB4 /* Foundation.framework */,
+ 15AF6C5A14C9AB8400BC1DB4 /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 15AF6C5C14C9AB8400BC1DB4 /* PullableView */ = {
+ isa = PBXGroup;
+ children = (
+ 15AF6C7614C9ABB600BC1DB4 /* PullableView.h */,
+ 15AF6C7714C9ABB600BC1DB4 /* PullableView.m */,
+ 15AF6C7914C9ACF500BC1DB4 /* StyledPullableView.h */,
+ 15AF6C7A14C9ACF500BC1DB4 /* StyledPullableView.m */,
+ 15AF6C6514C9AB8400BC1DB4 /* AppDelegate.h */,
+ 15AF6C6614C9AB8400BC1DB4 /* AppDelegate.m */,
+ 15AF6C6814C9AB8400BC1DB4 /* ViewController.h */,
+ 15AF6C6914C9AB8400BC1DB4 /* ViewController.m */,
+ 15AF6C6B14C9AB8400BC1DB4 /* ViewController_iPhone.xib */,
+ 15AF6C6E14C9AB8400BC1DB4 /* ViewController_iPad.xib */,
+ 15AF6C5D14C9AB8400BC1DB4 /* Supporting Files */,
+ );
+ path = PullableView;
+ sourceTree = "<group>";
+ };
+ 15AF6C5D14C9AB8400BC1DB4 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 15AF6C7C14C9B29700BC1DB4 /* background.png */,
+ 15AF6C7D14C9B29700BC1DB4 /* background@2x.png */,
+ 15AF6C5E14C9AB8400BC1DB4 /* PullableView-Info.plist */,
+ 15AF6C5F14C9AB8400BC1DB4 /* InfoPlist.strings */,
+ 15AF6C6214C9AB8400BC1DB4 /* main.m */,
+ 15AF6C6414C9AB8400BC1DB4 /* PullableView-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 15AF6C5114C9AB8400BC1DB4 /* PullableView */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 15AF6C7314C9AB8400BC1DB4 /* Build configuration list for PBXNativeTarget "PullableView" */;
+ buildPhases = (
+ 15AF6C4E14C9AB8400BC1DB4 /* Sources */,
+ 15AF6C4F14C9AB8400BC1DB4 /* Frameworks */,
+ 15AF6C5014C9AB8400BC1DB4 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = PullableView;
+ productName = PullableView;
+ productReference = 15AF6C5214C9AB8400BC1DB4 /* PullableView.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 15AF6C4914C9AB8400BC1DB4 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
+ buildConfigurationList = 15AF6C4C14C9AB8400BC1DB4 /* Build configuration list for PBXProject "PullableView" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 15AF6C4714C9AB8400BC1DB4;
+ productRefGroup = 15AF6C5314C9AB8400BC1DB4 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 15AF6C5114C9AB8400BC1DB4 /* PullableView */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 15AF6C5014C9AB8400BC1DB4 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 15AF6C6114C9AB8400BC1DB4 /* InfoPlist.strings in Resources */,
+ 15AF6C6D14C9AB8400BC1DB4 /* ViewController_iPhone.xib in Resources */,
+ 15AF6C7014C9AB8400BC1DB4 /* ViewController_iPad.xib in Resources */,
+ 15AF6C7E14C9B29700BC1DB4 /* background.png in Resources */,
+ 15AF6C7F14C9B29700BC1DB4 /* background@2x.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 15AF6C4E14C9AB8400BC1DB4 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 15AF6C6314C9AB8400BC1DB4 /* main.m in Sources */,
+ 15AF6C6714C9AB8400BC1DB4 /* AppDelegate.m in Sources */,
+ 15AF6C6A14C9AB8400BC1DB4 /* ViewController.m in Sources */,
+ 15AF6C7814C9ABB600BC1DB4 /* PullableView.m in Sources */,
+ 15AF6C7B14C9ACF500BC1DB4 /* StyledPullableView.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 15AF6C5F14C9AB8400BC1DB4 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 15AF6C6014C9AB8400BC1DB4 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 15AF6C6B14C9AB8400BC1DB4 /* ViewController_iPhone.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 15AF6C6C14C9AB8400BC1DB4 /* en */,
+ );
+ name = ViewController_iPhone.xib;
+ sourceTree = "<group>";
+ };
+ 15AF6C6E14C9AB8400BC1DB4 /* ViewController_iPad.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 15AF6C6F14C9AB8400BC1DB4 /* en */,
+ );
+ name = ViewController_iPad.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 15AF6C7114C9AB8400BC1DB4 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 15AF6C7214C9AB8400BC1DB4 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 15AF6C7414C9AB8400BC1DB4 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "PullableView/PullableView-Prefix.pch";
+ INFOPLIST_FILE = "PullableView/PullableView-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 15AF6C7514C9AB8400BC1DB4 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "PullableView/PullableView-Prefix.pch";
+ INFOPLIST_FILE = "PullableView/PullableView-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 15AF6C4C14C9AB8400BC1DB4 /* Build configuration list for PBXProject "PullableView" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 15AF6C7114C9AB8400BC1DB4 /* Debug */,
+ 15AF6C7214C9AB8400BC1DB4 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 15AF6C7314C9AB8400BC1DB4 /* Build configuration list for PBXNativeTarget "PullableView" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 15AF6C7414C9AB8400BC1DB4 /* Debug */,
+ 15AF6C7514C9AB8400BC1DB4 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 15AF6C4914C9AB8400BC1DB4 /* Project object */;
+}
16 PullableView/AppDelegate.h
@@ -0,0 +1,16 @@
+
+#import <UIKit/UIKit.h>
+
+/**
+ @author Fabio Rodella fabio@crocodella.com.br
+ */
+
+@class ViewController;
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) ViewController *viewController;
+
+@end
75 PullableView/AppDelegate.m
@@ -0,0 +1,75 @@
+
+#import "AppDelegate.h"
+
+#import "ViewController.h"
+
+/**
+ @author Fabio Rodella fabio@crocodella.com.br
+ */
+
+@implementation AppDelegate
+
+@synthesize window = _window;
+@synthesize viewController = _viewController;
+
+- (void)dealloc
+{
+ [_window release];
+ [_viewController release];
+ [super dealloc];
+}
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
+ // Override point for customization after application launch.
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
+ self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil] autorelease];
+ } else {
+ self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil] autorelease];
+ }
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ /*
+ Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+ */
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ /*
+ Called when the application is about to terminate.
+ Save data if appropriate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+@end
44 PullableView/PullableView-Info.plist
@@ -0,0 +1,44 @@
+<?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>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFiles</key>
+ <array/>
+ <key>CFBundleIdentifier</key>
+ <string>br.com.crocodella.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ </array>
+</dict>
+</plist>
14 PullableView/PullableView-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'PullableView' target in the 'PullableView' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_4_0
+#warning "This project uses features only available in iOS SDK 4.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
118 PullableView/PullableView.h
@@ -0,0 +1,118 @@
+
+#import <UIKit/UIKit.h>
+
+@class PullableView;
+
+/**
+ Protocol for objects that wish to be notified when the state of a
+ PullableView changes
+ */
+@protocol PullableViewDelegate <NSObject>
+
+/**
+ Notifies of a changed state
+ @param pView PullableView whose state was changed
+ @param opened The new state of the view
+ */
+- (void)pullableView:(PullableView *)pView didChangeState:(BOOL)opened;
+
+@end
+
+/**
+ Class that implements a view that can be pulled out by a handle,
+ similar to the Notification Center in iOS 5. This class supports
+ pulling in the horizontal or vertical axis. This is determined by
+ the values for openedCenter and closedCenter that you set: if
+ both have the same x coordinate, the pulling should happen in the
+ vertical axis, or the horizontal axis otherwise.
+ @author Fabio Rodella fabio@crocodella.com.br
+ */
+@interface PullableView : UIView {
+
+ CGPoint closedCenter;
+ CGPoint openedCenter;
+
+ UIView *handleView;
+ UIPanGestureRecognizer *dragRecognizer;
+ UITapGestureRecognizer *tapRecognizer;
+
+ CGPoint startPos;
+ CGPoint minPos;
+ CGPoint maxPos;
+
+ BOOL opened;
+ BOOL verticalAxis;
+
+ BOOL toggleOnTap;
+
+ BOOL animate;
+ float animationDuration;
+
+ id<PullableViewDelegate> delegate;
+}
+
+/**
+ The view that is used as the handle for the PullableView. You
+ can style it, add subviews or set its frame at will.
+ */
+@property (nonatomic,readonly) UIView *handleView;
+
+/**
+ The point that defines the center of the view when in its closed
+ state. You must set this before using the PullableView.
+ */
+@property (readwrite,assign) CGPoint closedCenter;
+
+/**
+ The point that defines the center of the view when in its opened
+ state. You must set this before using the PullableView.
+ */
+@property (readwrite,assign) CGPoint openedCenter;
+
+/**
+ Gesture recognizer responsible for the dragging of the handle view.
+ It is exposed as a property so you can change the number of touches
+ or created dependencies to other recognizers in your views.
+ */
+@property (nonatomic,readonly) UIPanGestureRecognizer *dragRecognizer;
+
+/**
+ Gesture recognizer responsible for handling tapping of the handle view.
+ It is exposed as a property so you can change the number of touches
+ or created dependencies to other recognizers in your views.
+ */
+@property (nonatomic,readonly) UITapGestureRecognizer *tapRecognizer;
+
+/**
+ If set to YES, tapping the handle view will toggle the PullableView.
+ Default value is YES.
+ */
+@property (readwrite,assign) BOOL toggleOnTap;
+
+/**
+ If set to YES, the opening or closing of the PullableView will
+ be animated. Default value is YES.
+ */
+@property (readwrite,assign) BOOL animate;
+
+/**
+ Duration of the opening/closing animation, if enabled. Default
+ value is 0.2.
+ */
+@property (readwrite,assign) float animationDuration;
+
+/**
+ Delegate that will be notified when the PullableView changes state.
+ If the view is set to animate transitions, the delegate will be
+ called only when the animation finishes.
+ */
+@property (readwrite,assign) id<PullableViewDelegate> delegate;
+
+/**
+ Toggles the state of the PullableView
+ @param op New state of the view
+ @param anim Flag indicating if the transition should be animated
+ */
+- (void)setOpened:(BOOL)op animated:(BOOL)anim;
+
+@end
182 PullableView/PullableView.m
@@ -0,0 +1,182 @@
+
+#import "PullableView.h"
+
+/**
+ @author Fabio Rodella fabio@crocodella.com.br
+ */
+
+@implementation PullableView
+
+@synthesize handleView;
+@synthesize closedCenter;
+@synthesize openedCenter;
+@synthesize dragRecognizer;
+@synthesize tapRecognizer;
+@synthesize animate;
+@synthesize animationDuration;
+@synthesize delegate;
+
+- (id)initWithFrame:(CGRect)frame
+{
+ self = [super initWithFrame:frame];
+ if (self) {
+
+ animate = YES;
+ animationDuration = 0.2;
+
+ toggleOnTap = YES;
+
+ // Creates the handle view. Subclasses should resize, reposition and style this view
+ handleView = [[UIView alloc] initWithFrame:CGRectMake(0, frame.size.height - 40, frame.size.width, 40)];
+ [self addSubview:handleView];
+ [handleView release];
+
+ dragRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleDrag:)];
+ dragRecognizer.minimumNumberOfTouches = 1;
+ dragRecognizer.maximumNumberOfTouches = 1;
+
+ [handleView addGestureRecognizer:dragRecognizer];
+ [dragRecognizer release];
+
+ tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
+ tapRecognizer.numberOfTapsRequired = 1;
+ tapRecognizer.numberOfTouchesRequired = 1;
+
+ [handleView addGestureRecognizer:tapRecognizer];
+ [tapRecognizer release];
+
+ opened = NO;
+ }
+ return self;
+}
+
+- (void)handleDrag:(UIPanGestureRecognizer *)sender {
+
+ if ([sender state] == UIGestureRecognizerStateBegan) {
+
+ startPos = self.center;
+
+ // Determines if the view can be pulled in the x or y axis
+ verticalAxis = closedCenter.x == openedCenter.x;
+
+ // Finds the minimum and maximum points in the axis
+ if (verticalAxis) {
+ minPos = closedCenter.y < openedCenter.y ? closedCenter : openedCenter;
+ maxPos = closedCenter.y > openedCenter.y ? closedCenter : openedCenter;
+ } else {
+ minPos = closedCenter.x < openedCenter.x ? closedCenter : openedCenter;
+ maxPos = closedCenter.x > openedCenter.x ? closedCenter : openedCenter;
+ }
+
+ } else if ([sender state] == UIGestureRecognizerStateChanged) {
+
+ CGPoint translate = [sender translationInView:self.superview];
+
+ CGPoint newPos;
+
+ // Moves the view, keeping it constrained between openedCenter and closedCenter
+ if (verticalAxis) {
+
+ newPos = CGPointMake(startPos.x, startPos.y + translate.y);
+
+ if (newPos.y < minPos.y) {
+ newPos.y = minPos.y;
+ translate = CGPointMake(0, newPos.y - startPos.y);
+ }
+
+ if (newPos.y > maxPos.y) {
+ newPos.y = maxPos.y;
+ translate = CGPointMake(0, newPos.y - startPos.y);
+ }
+ } else {
+
+ newPos = CGPointMake(startPos.x + translate.x, startPos.y);
+
+ if (newPos.x < minPos.x) {
+ newPos.x = minPos.x;
+ translate = CGPointMake(newPos.x - startPos.x, 0);
+ }
+
+ if (newPos.x > maxPos.x) {
+ newPos.x = maxPos.x;
+ translate = CGPointMake(newPos.x - startPos.x, 0);
+ }
+ }
+
+ [sender setTranslation:translate inView:self.superview];
+
+ self.center = newPos;
+
+ } else if ([sender state] == UIGestureRecognizerStateEnded) {
+
+ // Gets the velocity of the gesture in the axis, so it can be
+ // determined to which endpoint the state should be set.
+
+ CGPoint vectorVelocity = [sender velocityInView:self.superview];
+ CGFloat axisVelocity = verticalAxis ? vectorVelocity.y : vectorVelocity.x;
+
+ CGPoint target = axisVelocity < 0 ? minPos : maxPos;
+ BOOL op = CGPointEqualToPoint(target, openedCenter);
+
+ [self setOpened:op animated:animate];
+ }
+}
+
+- (void)handleTap:(UITapGestureRecognizer *)sender {
+
+ if ([sender state] == UIGestureRecognizerStateEnded) {
+ [self setOpened:!opened animated:animate];
+ }
+}
+
+- (void)setToggleOnTap:(BOOL)tap {
+ toggleOnTap = tap;
+ tapRecognizer.enabled = tap;
+}
+
+- (BOOL)toggleOnTap {
+ return toggleOnTap;
+}
+
+- (void)setOpened:(BOOL)op animated:(BOOL)anim {
+ opened = op;
+
+ if (anim) {
+ [UIView beginAnimations:nil context:nil];
+ [UIView setAnimationDuration:animationDuration];
+ [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
+ [UIView setAnimationDelegate:self];
+ [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
+ }
+
+ self.center = opened ? openedCenter : closedCenter;
+
+ if (anim) {
+
+ // For the duration of the animation, no further interaction with the view is permitted
+ dragRecognizer.enabled = NO;
+ tapRecognizer.enabled = NO;
+
+ [UIView commitAnimations];
+
+ } else {
+
+ if ([delegate respondsToSelector:@selector(pullableView:didChangeState:)]) {
+ [delegate pullableView:self didChangeState:opened];
+ }
+ }
+}
+
+- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
+ if (finished) {
+ // Restores interaction after the animation is over
+ dragRecognizer.enabled = YES;
+ tapRecognizer.enabled = toggleOnTap;
+
+ if ([delegate respondsToSelector:@selector(pullableView:didChangeState:)]) {
+ [delegate pullableView:self didChangeState:opened];
+ }
+ }
+}
+
+@end
10 PullableView/StyledPullableView.h
@@ -0,0 +1,10 @@
+
+#import "PullableView.h"
+
+/**
+ Subclass of PullableView that uses a background image
+ @author Fabio Rodella fabio@crocodella.com.br
+ */
+@interface StyledPullableView : PullableView
+
+@end
21 PullableView/StyledPullableView.m
@@ -0,0 +1,21 @@
+
+#import "StyledPullableView.h"
+
+/**
+ @author Fabio Rodella fabio@crocodella.com.br
+ */
+
+@implementation StyledPullableView
+
+- (id)initWithFrame:(CGRect)frame {
+ if ((self = [super initWithFrame:frame])) {
+
+ UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background.png"]];
+ imgView.frame = CGRectMake(0, 0, 320, 460);
+ [self addSubview:imgView];
+ [imgView release];
+ }
+ return self;
+}
+
+@end
19 PullableView/ViewController.h
@@ -0,0 +1,19 @@
+
+#import <UIKit/UIKit.h>
+#import "StyledPullableView.h"
+
+/**
+ Sample view controller
+ @author Fabio Rodella fabio@crocodella.com.br
+ */
+
+@interface ViewController : UIViewController <PullableViewDelegate> {
+ StyledPullableView *pullDownView;
+
+ StyledPullableView *pullUpView;
+ UILabel *pullUpLabel;
+
+ PullableView *pullRightView;
+}
+
+@end
113 PullableView/ViewController.m
@@ -0,0 +1,113 @@
+
+#import "ViewController.h"
+
+/**
+ @author Fabio Rodella fabio@crocodella.com.br
+ */
+
+@implementation ViewController
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ CGFloat xOffset = 0;
+ if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+ xOffset = 224;
+ }
+
+ pullRightView = [[PullableView alloc] initWithFrame:CGRectMake(0, 200, 200, 300)];
+ pullRightView.backgroundColor = [UIColor lightGrayColor];
+ pullRightView.openedCenter = CGPointMake(100, 200);
+ pullRightView.closedCenter = CGPointMake(-70, 200);
+ pullRightView.center = pullRightView.closedCenter;
+ pullRightView.animate = NO;
+
+ pullRightView.handleView.backgroundColor = [UIColor darkGrayColor];
+ pullRightView.handleView.frame = CGRectMake(170, 0, 30, 300);
+
+ [self.view addSubview:pullRightView];
+ [pullRightView release];
+
+ UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 30)];
+ label.backgroundColor = [UIColor darkGrayColor];
+ label.textColor = [UIColor whiteColor];
+ label.text = @"Pull me to the right!";
+ label.transform = CGAffineTransformMakeRotation(-M_PI_2);
+ label.center = CGPointMake(185, 150);
+
+ [pullRightView addSubview:label];
+ [label release];
+
+ label = [[UILabel alloc] initWithFrame:CGRectMake(4, 120, 200, 30)];
+ label.backgroundColor = [UIColor clearColor];
+ label.textColor = [UIColor whiteColor];
+ label.text = @"I'm not animated";
+
+ [pullRightView addSubview:label];
+ [label release];
+
+ pullUpView = [[StyledPullableView alloc] initWithFrame:CGRectMake(xOffset, 0, 320, 460)];
+ pullUpView.openedCenter = CGPointMake(160 + xOffset,self.view.frame.size.height);
+ pullUpView.closedCenter = CGPointMake(160 + xOffset, self.view.frame.size.height + 200);
+ pullUpView.center = pullUpView.closedCenter;
+ pullUpView.handleView.frame = CGRectMake(0, 0, 320, 40);
+ pullUpView.delegate = self;
+
+ [self.view addSubview:pullUpView];
+ [pullUpView release];
+
+ pullUpLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 4, 320, 20)];
+ pullUpLabel.textAlignment = UITextAlignmentCenter;
+ pullUpLabel.backgroundColor = [UIColor clearColor];
+ pullUpLabel.textColor = [UIColor lightGrayColor];
+ pullUpLabel.text = @"Pull me up!";
+
+ [pullUpView addSubview:pullUpLabel];
+ [pullUpLabel release];
+
+ label = [[UILabel alloc] initWithFrame:CGRectMake(0, 80, 320, 64)];
+ label.textAlignment = UITextAlignmentCenter;
+ label.backgroundColor = [UIColor clearColor];
+ label.textColor = [UIColor whiteColor];
+ label.shadowColor = [UIColor blackColor];
+ label.shadowOffset = CGSizeMake(1, 1);
+ label.text = @"I only go half-way up!";
+
+ [pullUpView addSubview:label];
+ [label release];
+
+ pullDownView = [[StyledPullableView alloc] initWithFrame:CGRectMake(xOffset, 0, 320, 460)];
+ pullDownView.openedCenter = CGPointMake(160 + xOffset,230);
+ pullDownView.closedCenter = CGPointMake(160 + xOffset, -200);
+ pullDownView.center = pullDownView.closedCenter;
+
+ [self.view addSubview:pullDownView];
+ [pullDownView release];
+
+ label = [[UILabel alloc] initWithFrame:CGRectMake(0, 200, 320, 64)];
+ label.textAlignment = UITextAlignmentCenter;
+ label.backgroundColor = [UIColor clearColor];
+ label.textColor = [UIColor whiteColor];
+ label.shadowColor = [UIColor blackColor];
+ label.shadowOffset = CGSizeMake(1, 1);
+ label.text = @"Look at this beautiful linen texture!";
+
+ [pullDownView addSubview:label];
+ [label release];
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return UIInterfaceOrientationIsPortrait(interfaceOrientation);
+}
+
+- (void)pullableView:(PullableView *)pView didChangeState:(BOOL)opened {
+ if (opened) {
+ pullUpLabel.text = @"Now I'm open!";
+ } else {
+ pullUpLabel.text = @"Now I'm closed, pull me up again!";
+ }
+}
+
+@end
BIN PullableView/background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN PullableView/background@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 PullableView/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
163 PullableView/en.lproj/ViewController_iPad.xib
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1280</int>
+ <string key="IBDocument.SystemVersion">10K549</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1938</string>
+ <string key="IBDocument.AppKitVersion">1038.36</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">933</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBProxyObject</string>
+ <string>IBUIView</string>
+ <string>IBUILabel</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ </object>
+ <object class="IBProxyObject" id="606714003">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ </object>
+ <object class="IBUIView" id="766721923">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUILabel" id="1010507522">
+ <reference key="NSNextResponder" ref="766721923"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{280, 407}, {186, 141}}</string>
+ <reference key="NSSuperview" ref="766721923"/>
+ <reference key="NSWindow"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <string key="IBUIText">This is your main content</string>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAwIDAAA</bytes>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUINumberOfLines">0</int>
+ <int key="IBUITextAlignment">1</int>
+ <object class="IBUIFontDescription" key="IBUIFontDescription">
+ <int key="type">1</int>
+ <double key="pointSize">20</double>
+ </object>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">20</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{0, 20}, {768, 1004}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
+ <int key="IBUIStatusBarStyle">2</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="766721923"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="606714003"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="766721923"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1010507522"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4</int>
+ <reference key="object" ref="1010507522"/>
+ <reference key="parent" ref="766721923"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">ViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">4</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">ViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/ViewController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">933</string>
+ </data>
+</archive>
161 PullableView/en.lproj/ViewController_iPhone.xib
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1280</int>
+ <string key="IBDocument.SystemVersion">10K549</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1938</string>
+ <string key="IBDocument.AppKitVersion">1038.36</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">933</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBProxyObject</string>
+ <string>IBUIView</string>
+ <string>IBUILabel</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUILabel" id="74029203">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{69, 164}, {186, 141}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">This is your main content</string>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAwIDAAA</bytes>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUINumberOfLines">0</int>
+ <int key="IBUITextAlignment">1</int>
+ <object class="IBUIFontDescription" key="IBUIFontDescription">
+ <int key="type">1</int>
+ <double key="pointSize">20</double>
+ </object>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">20</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="74029203"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="74029203"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="74029203"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">ViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">8</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">ViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/ViewController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">933</string>
+ </data>
+</archive>
18 PullableView/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// PullableView
+//
+// Created by Fabio Rodella on 1/20/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
1 README
@@ -0,0 +1 @@
+UIView subclass that implements pullable behaviour similar to the Notification Center in iOS 5. More information: http://www.crocodella.com.br/2011/01/rpg-like-text-box-with-cocos2d/

0 comments on commit afc1a28

Please sign in to comment.