├── .gitignore ├── NBSlideUpView Example ├── Classes │ ├── GBFlatButton.h │ ├── GBFlatButton.m │ ├── GBFlatSelectableButton.h │ ├── GBFlatSelectableButton.m │ ├── UIColor+GBFlatButton.h │ └── UIColor+GBFlatButton.m ├── NBSlideUpView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── NBSlideUpView │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── NBAppDelegate.h │ ├── NBAppDelegate.m │ ├── NBSlideUpView-Info.plist │ ├── NBSlideUpView-Prefix.pch │ ├── NBSlideUpViewSampleContentView.h │ ├── NBSlideUpViewSampleContentView.m │ ├── NBViewController.h │ ├── NBViewController.m │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── NBSlideUpViewSampleContentView.xib ├── NBSlideUpViewTests │ ├── NBSlideUpViewTests-Info.plist │ ├── NBSlideUpViewTests.m │ └── en.lproj │ │ └── InfoPlist.strings └── close.png ├── NBSlideUpView.podspec ├── NBSlideUpView ├── NBSlideUpView.h ├── NBSlideUpView.m └── close.png ├── README.md ├── example.gif └── example.mov /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | *.pbxuser 3 | !default.pbxuser 4 | *.mode1v3 5 | !default.mode1v3 6 | *.mode2v3 7 | !default.mode2v3 8 | *.perspectivev3 9 | !default.perspectivev3 10 | xcuserdata 11 | *.xccheckout 12 | *.moved-aside 13 | DerivedData 14 | *.hmap 15 | *.ipa 16 | *.xcuserstate 17 | -------------------------------------------------------------------------------- /NBSlideUpView Example/Classes/GBFlatButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // GBFlatButton.h 3 | // GBFlatButtonExample 4 | // 5 | // Created by Gustavo Barbosa on 4/15/14. 6 | // Copyright (c) 2014 Gustavo Barbosa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GBFlatButton : UIButton 12 | 13 | @property (nonatomic, strong) UIColor *buttonColor; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /NBSlideUpView Example/Classes/GBFlatButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // GBFlatButton.m 3 | // GBFlatButtonExample 4 | // 5 | // Created by Gustavo Barbosa on 4/15/14. 6 | // Copyright (c) 2014 Gustavo Barbosa. All rights reserved. 7 | // 8 | 9 | #import "GBFlatButton.h" 10 | #import 11 | 12 | static CGFloat const kHorizontalPadding = 14.0f; 13 | 14 | @implementation GBFlatButton 15 | 16 | #pragma mark - Constructors 17 | 18 | - (id)init 19 | { 20 | self = [super init]; 21 | if (self) { 22 | [self customizeAppearance]; 23 | } 24 | return self; 25 | } 26 | 27 | - (id)initWithFrame:(CGRect)frame 28 | { 29 | self = [super initWithFrame:frame]; 30 | if (self) { 31 | [self customizeAppearance]; 32 | } 33 | return self; 34 | } 35 | 36 | - (id)initWithCoder:(NSCoder *)aDecoder 37 | { 38 | self = [super initWithCoder:aDecoder]; 39 | if (self) { 40 | [self customizeAppearance]; 41 | } 42 | return self; 43 | } 44 | 45 | #pragma mark - Appearance 46 | 47 | - (void)customizeAppearance 48 | { 49 | BOOL containsEdgeInsets = ! UIEdgeInsetsEqualToEdgeInsets(self.contentEdgeInsets, UIEdgeInsetsZero); 50 | self.contentEdgeInsets = containsEdgeInsets ? self.contentEdgeInsets : UIEdgeInsetsMake(0, kHorizontalPadding, 0, kHorizontalPadding); 51 | self.layer.borderWidth = self.layer.borderWidth ?: 1.0f; 52 | self.layer.cornerRadius = self.layer.cornerRadius ?: CGRectGetHeight(self.frame) / 2.0f; 53 | self.clipsToBounds = YES; 54 | } 55 | 56 | - (void)setSelected:(BOOL)selected 57 | { 58 | [super setSelected:selected]; 59 | 60 | if (selected) 61 | self.backgroundColor = self.buttonColor; 62 | else 63 | self.backgroundColor = [UIColor whiteColor]; 64 | } 65 | 66 | - (void)drawRect:(CGRect)rect 67 | { 68 | self.layer.borderColor = self.buttonColor.CGColor; 69 | [self setTitleColor:self.buttonColor 70 | forState:UIControlStateNormal]; 71 | [self setTitleColor:[UIColor whiteColor] 72 | forState:UIControlStateSelected]; 73 | } 74 | 75 | #pragma mark - Acessors 76 | 77 | - (UIColor *)buttonColor 78 | { 79 | return _buttonColor ?: self.tintColor; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /NBSlideUpView Example/Classes/GBFlatSelectableButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // GBFlatSelectableButton.h 3 | // GBFlatButtonExample 4 | // 5 | // Created by Gustavo Barbosa on 4/16/14. 6 | // Copyright (c) 2014 Gustavo Barbosa. All rights reserved. 7 | // 8 | 9 | #import "GBFlatButton.h" 10 | 11 | @interface GBFlatSelectableButton : GBFlatButton 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /NBSlideUpView Example/Classes/GBFlatSelectableButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // GBFlatSelectableButton.m 3 | // GBFlatButtonExample 4 | // 5 | // Created by Gustavo Barbosa on 4/16/14. 6 | // Copyright (c) 2014 Gustavo Barbosa. All rights reserved. 7 | // 8 | 9 | #import "GBFlatSelectableButton.h" 10 | 11 | @implementation GBFlatSelectableButton 12 | 13 | #pragma mark - Constructors 14 | 15 | - (id)init 16 | { 17 | self = [super init]; 18 | if (self) { 19 | [self addSelectionHandler]; 20 | } 21 | return self; 22 | } 23 | 24 | - (id)initWithFrame:(CGRect)frame 25 | { 26 | self = [super initWithFrame:frame]; 27 | if (self) { 28 | [self addSelectionHandler]; 29 | } 30 | return self; 31 | } 32 | 33 | - (id)initWithCoder:(NSCoder *)aDecoder 34 | { 35 | self = [super initWithCoder:aDecoder]; 36 | if (self) { 37 | [self addSelectionHandler]; 38 | } 39 | return self; 40 | } 41 | 42 | #pragma mark - Selection Handler 43 | 44 | - (void)addSelectionHandler 45 | { 46 | [self addTarget:self 47 | action:@selector(toggleButtonSelection) 48 | forControlEvents:UIControlEventTouchUpInside]; 49 | } 50 | 51 | - (void)toggleButtonSelection 52 | { 53 | self.selected = !self.selected; 54 | 55 | UIControlState state; 56 | if (self.selected) { 57 | state = UIControlStateSelected; 58 | } else { 59 | state = UIControlStateNormal; 60 | } 61 | 62 | NSString *title = [self titleForState:state]; 63 | [self setTitle:title forState:state]; 64 | 65 | [self invalidateIntrinsicContentSize]; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /NBSlideUpView Example/Classes/UIColor+GBFlatButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+GBFlatButton.h 3 | // GBFlatButtonExample 4 | // 5 | // Created by Gustavo Barbosa on 4/16/14. 6 | // Copyright (c) 2014 Gustavo Barbosa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (GBFlatButton) 12 | 13 | + (UIColor *)gb_pinkColor; 14 | + (UIColor *)gb_yellowColor; 15 | + (UIColor *)gb_orangeColor; 16 | + (UIColor *)gb_greenColor; 17 | + (UIColor *)gb_blueColor; 18 | + (UIColor *)gb_purpleColor; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /NBSlideUpView Example/Classes/UIColor+GBFlatButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+GBFlatButton.m 3 | // GBFlatButtonExample 4 | // 5 | // Created by Gustavo Barbosa on 4/16/14. 6 | // Copyright (c) 2014 Gustavo Barbosa. All rights reserved. 7 | // 8 | 9 | #import "UIColor+GBFlatButton.h" 10 | 11 | @implementation UIColor (GBFlatButton) 12 | 13 | + (UIColor *)gb_pinkColor 14 | { 15 | return [UIColor colorWithRed:206/255.0 green:67/255.0 blue:130/255.0 alpha:1]; 16 | } 17 | 18 | + (UIColor *)gb_yellowColor 19 | { 20 | return [UIColor colorWithRed:253/255.0 green:197/255.0 blue:0/255.0 alpha:1]; 21 | } 22 | 23 | + (UIColor *)gb_orangeColor 24 | { 25 | return [UIColor colorWithRed:255/255.0 green:167/255.0 blue:28/255.0 alpha:1]; 26 | } 27 | 28 | + (UIColor *)gb_greenColor 29 | { 30 | return [UIColor colorWithRed:158/255.0 green:211/255.0 blue:15/255.0 alpha:1]; 31 | } 32 | 33 | + (UIColor *)gb_blueColor 34 | { 35 | return [UIColor colorWithRed:100/255.0 green:194/255.0 blue:227/255.0 alpha:1]; 36 | } 37 | 38 | + (UIColor *)gb_purpleColor 39 | { 40 | return [UIColor colorWithRed:124/255.0 green:118/255.0 blue:247/255.0 alpha:1]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 070BDB111905AE99005CB41D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 070BDB101905AE99005CB41D /* Foundation.framework */; }; 11 | 070BDB131905AE99005CB41D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 070BDB121905AE99005CB41D /* CoreGraphics.framework */; }; 12 | 070BDB151905AE99005CB41D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 070BDB141905AE99005CB41D /* UIKit.framework */; }; 13 | 070BDB1B1905AE99005CB41D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 070BDB191905AE99005CB41D /* InfoPlist.strings */; }; 14 | 070BDB1D1905AE9A005CB41D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 070BDB1C1905AE9A005CB41D /* main.m */; }; 15 | 070BDB211905AE9A005CB41D /* NBAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 070BDB201905AE9A005CB41D /* NBAppDelegate.m */; }; 16 | 070BDB241905AE9A005CB41D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 070BDB221905AE9A005CB41D /* Main.storyboard */; }; 17 | 070BDB271905AE9A005CB41D /* NBViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 070BDB261905AE9A005CB41D /* NBViewController.m */; }; 18 | 070BDB291905AE9A005CB41D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 070BDB281905AE9A005CB41D /* Images.xcassets */; }; 19 | 070BDB301905AE9A005CB41D /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 070BDB2F1905AE9A005CB41D /* XCTest.framework */; }; 20 | 070BDB311905AE9A005CB41D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 070BDB101905AE99005CB41D /* Foundation.framework */; }; 21 | 070BDB321905AE9A005CB41D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 070BDB141905AE99005CB41D /* UIKit.framework */; }; 22 | 070BDB3A1905AE9A005CB41D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 070BDB381905AE9A005CB41D /* InfoPlist.strings */; }; 23 | 070BDB3C1905AE9A005CB41D /* NBSlideUpViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 070BDB3B1905AE9A005CB41D /* NBSlideUpViewTests.m */; }; 24 | 070BDB541905C8CB005CB41D /* NBSlideUpViewSampleContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 070BDB531905C8CB005CB41D /* NBSlideUpViewSampleContentView.xib */; }; 25 | 070BDB5F1905CA9D005CB41D /* GBFlatButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 070BDB5A1905CA9D005CB41D /* GBFlatButton.m */; }; 26 | 070BDB601905CA9D005CB41D /* GBFlatSelectableButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 070BDB5C1905CA9D005CB41D /* GBFlatSelectableButton.m */; }; 27 | 070BDB611905CA9D005CB41D /* UIColor+GBFlatButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 070BDB5E1905CA9D005CB41D /* UIColor+GBFlatButton.m */; }; 28 | 070BDB641905D5BC005CB41D /* NBSlideUpViewSampleContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 070BDB631905D5BC005CB41D /* NBSlideUpViewSampleContentView.m */; }; 29 | 070BDB661905E56B005CB41D /* close.png in Resources */ = {isa = PBXBuildFile; fileRef = 070BDB651905E56B005CB41D /* close.png */; }; 30 | 07621F4C1ACCEB7A004DD684 /* NBSlideUpView.m in Sources */ = {isa = PBXBuildFile; fileRef = 07621F4B1ACCEB7A004DD684 /* NBSlideUpView.m */; }; 31 | /* End PBXBuildFile section */ 32 | 33 | /* Begin PBXContainerItemProxy section */ 34 | 070BDB331905AE9A005CB41D /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 070BDB051905AE99005CB41D /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 070BDB0C1905AE99005CB41D; 39 | remoteInfo = NBSlideUpView; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | 070BDB0D1905AE99005CB41D /* NBSlideUpView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NBSlideUpView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 070BDB101905AE99005CB41D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 46 | 070BDB121905AE99005CB41D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 47 | 070BDB141905AE99005CB41D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 48 | 070BDB181905AE99005CB41D /* NBSlideUpView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "NBSlideUpView-Info.plist"; sourceTree = ""; }; 49 | 070BDB1A1905AE99005CB41D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 50 | 070BDB1C1905AE9A005CB41D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | 070BDB1E1905AE9A005CB41D /* NBSlideUpView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NBSlideUpView-Prefix.pch"; sourceTree = ""; }; 52 | 070BDB1F1905AE9A005CB41D /* NBAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NBAppDelegate.h; sourceTree = ""; }; 53 | 070BDB201905AE9A005CB41D /* NBAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NBAppDelegate.m; sourceTree = ""; }; 54 | 070BDB231905AE9A005CB41D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | 070BDB251905AE9A005CB41D /* NBViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NBViewController.h; sourceTree = ""; }; 56 | 070BDB261905AE9A005CB41D /* NBViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NBViewController.m; sourceTree = ""; }; 57 | 070BDB281905AE9A005CB41D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 58 | 070BDB2E1905AE9A005CB41D /* NBSlideUpViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NBSlideUpViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | 070BDB2F1905AE9A005CB41D /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 60 | 070BDB371905AE9A005CB41D /* NBSlideUpViewTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "NBSlideUpViewTests-Info.plist"; sourceTree = ""; }; 61 | 070BDB391905AE9A005CB41D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 62 | 070BDB3B1905AE9A005CB41D /* NBSlideUpViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NBSlideUpViewTests.m; sourceTree = ""; }; 63 | 070BDB531905C8CB005CB41D /* NBSlideUpViewSampleContentView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = NBSlideUpViewSampleContentView.xib; path = ../NBSlideUpViewSampleContentView.xib; sourceTree = ""; }; 64 | 070BDB591905CA9D005CB41D /* GBFlatButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GBFlatButton.h; sourceTree = ""; }; 65 | 070BDB5A1905CA9D005CB41D /* GBFlatButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GBFlatButton.m; sourceTree = ""; }; 66 | 070BDB5B1905CA9D005CB41D /* GBFlatSelectableButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GBFlatSelectableButton.h; sourceTree = ""; }; 67 | 070BDB5C1905CA9D005CB41D /* GBFlatSelectableButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GBFlatSelectableButton.m; sourceTree = ""; }; 68 | 070BDB5D1905CA9D005CB41D /* UIColor+GBFlatButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+GBFlatButton.h"; sourceTree = ""; }; 69 | 070BDB5E1905CA9D005CB41D /* UIColor+GBFlatButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+GBFlatButton.m"; sourceTree = ""; }; 70 | 070BDB621905D5BC005CB41D /* NBSlideUpViewSampleContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBSlideUpViewSampleContentView.h; sourceTree = ""; }; 71 | 070BDB631905D5BC005CB41D /* NBSlideUpViewSampleContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBSlideUpViewSampleContentView.m; sourceTree = ""; }; 72 | 070BDB651905E56B005CB41D /* close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = close.png; sourceTree = ""; }; 73 | 07621F4A1ACCEB7A004DD684 /* NBSlideUpView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NBSlideUpView.h; path = ../NBSlideUpView/NBSlideUpView.h; sourceTree = ""; }; 74 | 07621F4B1ACCEB7A004DD684 /* NBSlideUpView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NBSlideUpView.m; path = ../NBSlideUpView/NBSlideUpView.m; sourceTree = ""; }; 75 | /* End PBXFileReference section */ 76 | 77 | /* Begin PBXFrameworksBuildPhase section */ 78 | 070BDB0A1905AE99005CB41D /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | 070BDB131905AE99005CB41D /* CoreGraphics.framework in Frameworks */, 83 | 070BDB151905AE99005CB41D /* UIKit.framework in Frameworks */, 84 | 070BDB111905AE99005CB41D /* Foundation.framework in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | 070BDB2B1905AE9A005CB41D /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | 070BDB301905AE9A005CB41D /* XCTest.framework in Frameworks */, 93 | 070BDB321905AE9A005CB41D /* UIKit.framework in Frameworks */, 94 | 070BDB311905AE9A005CB41D /* Foundation.framework in Frameworks */, 95 | ); 96 | runOnlyForDeploymentPostprocessing = 0; 97 | }; 98 | /* End PBXFrameworksBuildPhase section */ 99 | 100 | /* Begin PBXGroup section */ 101 | 070BDB041905AE99005CB41D = { 102 | isa = PBXGroup; 103 | children = ( 104 | 070BDB161905AE99005CB41D /* NBSlideUpView */, 105 | 070BDB351905AE9A005CB41D /* NBSlideUpViewTests */, 106 | 070BDB0F1905AE99005CB41D /* Frameworks */, 107 | 070BDB0E1905AE99005CB41D /* Products */, 108 | ); 109 | sourceTree = ""; 110 | }; 111 | 070BDB0E1905AE99005CB41D /* Products */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 070BDB0D1905AE99005CB41D /* NBSlideUpView.app */, 115 | 070BDB2E1905AE9A005CB41D /* NBSlideUpViewTests.xctest */, 116 | ); 117 | name = Products; 118 | sourceTree = ""; 119 | }; 120 | 070BDB0F1905AE99005CB41D /* Frameworks */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 07621F4A1ACCEB7A004DD684 /* NBSlideUpView.h */, 124 | 07621F4B1ACCEB7A004DD684 /* NBSlideUpView.m */, 125 | 070BDB651905E56B005CB41D /* close.png */, 126 | 070BDB581905CA9D005CB41D /* GBFlatButton */, 127 | 070BDB101905AE99005CB41D /* Foundation.framework */, 128 | 070BDB121905AE99005CB41D /* CoreGraphics.framework */, 129 | 070BDB141905AE99005CB41D /* UIKit.framework */, 130 | 070BDB2F1905AE9A005CB41D /* XCTest.framework */, 131 | ); 132 | name = Frameworks; 133 | sourceTree = ""; 134 | }; 135 | 070BDB161905AE99005CB41D /* NBSlideUpView */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 070BDB1F1905AE9A005CB41D /* NBAppDelegate.h */, 139 | 070BDB201905AE9A005CB41D /* NBAppDelegate.m */, 140 | 070BDB221905AE9A005CB41D /* Main.storyboard */, 141 | 070BDB251905AE9A005CB41D /* NBViewController.h */, 142 | 070BDB261905AE9A005CB41D /* NBViewController.m */, 143 | 070BDB621905D5BC005CB41D /* NBSlideUpViewSampleContentView.h */, 144 | 070BDB631905D5BC005CB41D /* NBSlideUpViewSampleContentView.m */, 145 | 070BDB531905C8CB005CB41D /* NBSlideUpViewSampleContentView.xib */, 146 | 070BDB281905AE9A005CB41D /* Images.xcassets */, 147 | 070BDB171905AE99005CB41D /* Supporting Files */, 148 | ); 149 | path = NBSlideUpView; 150 | sourceTree = ""; 151 | }; 152 | 070BDB171905AE99005CB41D /* Supporting Files */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 070BDB181905AE99005CB41D /* NBSlideUpView-Info.plist */, 156 | 070BDB191905AE99005CB41D /* InfoPlist.strings */, 157 | 070BDB1C1905AE9A005CB41D /* main.m */, 158 | 070BDB1E1905AE9A005CB41D /* NBSlideUpView-Prefix.pch */, 159 | ); 160 | name = "Supporting Files"; 161 | sourceTree = ""; 162 | }; 163 | 070BDB351905AE9A005CB41D /* NBSlideUpViewTests */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 070BDB3B1905AE9A005CB41D /* NBSlideUpViewTests.m */, 167 | 070BDB361905AE9A005CB41D /* Supporting Files */, 168 | ); 169 | path = NBSlideUpViewTests; 170 | sourceTree = ""; 171 | }; 172 | 070BDB361905AE9A005CB41D /* Supporting Files */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 070BDB371905AE9A005CB41D /* NBSlideUpViewTests-Info.plist */, 176 | 070BDB381905AE9A005CB41D /* InfoPlist.strings */, 177 | ); 178 | name = "Supporting Files"; 179 | sourceTree = ""; 180 | }; 181 | 070BDB581905CA9D005CB41D /* GBFlatButton */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | 070BDB591905CA9D005CB41D /* GBFlatButton.h */, 185 | 070BDB5A1905CA9D005CB41D /* GBFlatButton.m */, 186 | 070BDB5B1905CA9D005CB41D /* GBFlatSelectableButton.h */, 187 | 070BDB5C1905CA9D005CB41D /* GBFlatSelectableButton.m */, 188 | 070BDB5D1905CA9D005CB41D /* UIColor+GBFlatButton.h */, 189 | 070BDB5E1905CA9D005CB41D /* UIColor+GBFlatButton.m */, 190 | ); 191 | name = GBFlatButton; 192 | path = Classes; 193 | sourceTree = ""; 194 | }; 195 | /* End PBXGroup section */ 196 | 197 | /* Begin PBXNativeTarget section */ 198 | 070BDB0C1905AE99005CB41D /* NBSlideUpView */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = 070BDB3F1905AE9A005CB41D /* Build configuration list for PBXNativeTarget "NBSlideUpView" */; 201 | buildPhases = ( 202 | 070BDB091905AE99005CB41D /* Sources */, 203 | 070BDB0A1905AE99005CB41D /* Frameworks */, 204 | 070BDB0B1905AE99005CB41D /* Resources */, 205 | ); 206 | buildRules = ( 207 | ); 208 | dependencies = ( 209 | ); 210 | name = NBSlideUpView; 211 | productName = NBSlideUpView; 212 | productReference = 070BDB0D1905AE99005CB41D /* NBSlideUpView.app */; 213 | productType = "com.apple.product-type.application"; 214 | }; 215 | 070BDB2D1905AE9A005CB41D /* NBSlideUpViewTests */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = 070BDB421905AE9A005CB41D /* Build configuration list for PBXNativeTarget "NBSlideUpViewTests" */; 218 | buildPhases = ( 219 | 070BDB2A1905AE9A005CB41D /* Sources */, 220 | 070BDB2B1905AE9A005CB41D /* Frameworks */, 221 | 070BDB2C1905AE9A005CB41D /* Resources */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | 070BDB341905AE9A005CB41D /* PBXTargetDependency */, 227 | ); 228 | name = NBSlideUpViewTests; 229 | productName = NBSlideUpViewTests; 230 | productReference = 070BDB2E1905AE9A005CB41D /* NBSlideUpViewTests.xctest */; 231 | productType = "com.apple.product-type.bundle.unit-test"; 232 | }; 233 | /* End PBXNativeTarget section */ 234 | 235 | /* Begin PBXProject section */ 236 | 070BDB051905AE99005CB41D /* Project object */ = { 237 | isa = PBXProject; 238 | attributes = { 239 | CLASSPREFIX = NB; 240 | LastUpgradeCheck = 0510; 241 | ORGANIZATIONNAME = "Neeraj Baid"; 242 | TargetAttributes = { 243 | 070BDB2D1905AE9A005CB41D = { 244 | TestTargetID = 070BDB0C1905AE99005CB41D; 245 | }; 246 | }; 247 | }; 248 | buildConfigurationList = 070BDB081905AE99005CB41D /* Build configuration list for PBXProject "NBSlideUpView" */; 249 | compatibilityVersion = "Xcode 3.2"; 250 | developmentRegion = English; 251 | hasScannedForEncodings = 0; 252 | knownRegions = ( 253 | en, 254 | Base, 255 | ); 256 | mainGroup = 070BDB041905AE99005CB41D; 257 | productRefGroup = 070BDB0E1905AE99005CB41D /* Products */; 258 | projectDirPath = ""; 259 | projectRoot = ""; 260 | targets = ( 261 | 070BDB0C1905AE99005CB41D /* NBSlideUpView */, 262 | 070BDB2D1905AE9A005CB41D /* NBSlideUpViewTests */, 263 | ); 264 | }; 265 | /* End PBXProject section */ 266 | 267 | /* Begin PBXResourcesBuildPhase section */ 268 | 070BDB0B1905AE99005CB41D /* Resources */ = { 269 | isa = PBXResourcesBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | 070BDB291905AE9A005CB41D /* Images.xcassets in Resources */, 273 | 070BDB1B1905AE99005CB41D /* InfoPlist.strings in Resources */, 274 | 070BDB241905AE9A005CB41D /* Main.storyboard in Resources */, 275 | 070BDB661905E56B005CB41D /* close.png in Resources */, 276 | 070BDB541905C8CB005CB41D /* NBSlideUpViewSampleContentView.xib in Resources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | 070BDB2C1905AE9A005CB41D /* Resources */ = { 281 | isa = PBXResourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | 070BDB3A1905AE9A005CB41D /* InfoPlist.strings in Resources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | /* End PBXResourcesBuildPhase section */ 289 | 290 | /* Begin PBXSourcesBuildPhase section */ 291 | 070BDB091905AE99005CB41D /* Sources */ = { 292 | isa = PBXSourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 070BDB271905AE9A005CB41D /* NBViewController.m in Sources */, 296 | 07621F4C1ACCEB7A004DD684 /* NBSlideUpView.m in Sources */, 297 | 070BDB211905AE9A005CB41D /* NBAppDelegate.m in Sources */, 298 | 070BDB611905CA9D005CB41D /* UIColor+GBFlatButton.m in Sources */, 299 | 070BDB641905D5BC005CB41D /* NBSlideUpViewSampleContentView.m in Sources */, 300 | 070BDB1D1905AE9A005CB41D /* main.m in Sources */, 301 | 070BDB5F1905CA9D005CB41D /* GBFlatButton.m in Sources */, 302 | 070BDB601905CA9D005CB41D /* GBFlatSelectableButton.m in Sources */, 303 | ); 304 | runOnlyForDeploymentPostprocessing = 0; 305 | }; 306 | 070BDB2A1905AE9A005CB41D /* Sources */ = { 307 | isa = PBXSourcesBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | 070BDB3C1905AE9A005CB41D /* NBSlideUpViewTests.m in Sources */, 311 | ); 312 | runOnlyForDeploymentPostprocessing = 0; 313 | }; 314 | /* End PBXSourcesBuildPhase section */ 315 | 316 | /* Begin PBXTargetDependency section */ 317 | 070BDB341905AE9A005CB41D /* PBXTargetDependency */ = { 318 | isa = PBXTargetDependency; 319 | target = 070BDB0C1905AE99005CB41D /* NBSlideUpView */; 320 | targetProxy = 070BDB331905AE9A005CB41D /* PBXContainerItemProxy */; 321 | }; 322 | /* End PBXTargetDependency section */ 323 | 324 | /* Begin PBXVariantGroup section */ 325 | 070BDB191905AE99005CB41D /* InfoPlist.strings */ = { 326 | isa = PBXVariantGroup; 327 | children = ( 328 | 070BDB1A1905AE99005CB41D /* en */, 329 | ); 330 | name = InfoPlist.strings; 331 | sourceTree = ""; 332 | }; 333 | 070BDB221905AE9A005CB41D /* Main.storyboard */ = { 334 | isa = PBXVariantGroup; 335 | children = ( 336 | 070BDB231905AE9A005CB41D /* Base */, 337 | ); 338 | name = Main.storyboard; 339 | sourceTree = ""; 340 | }; 341 | 070BDB381905AE9A005CB41D /* InfoPlist.strings */ = { 342 | isa = PBXVariantGroup; 343 | children = ( 344 | 070BDB391905AE9A005CB41D /* en */, 345 | ); 346 | name = InfoPlist.strings; 347 | sourceTree = ""; 348 | }; 349 | /* End PBXVariantGroup section */ 350 | 351 | /* Begin XCBuildConfiguration section */ 352 | 070BDB3D1905AE9A005CB41D /* Debug */ = { 353 | isa = XCBuildConfiguration; 354 | buildSettings = { 355 | ALWAYS_SEARCH_USER_PATHS = NO; 356 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 357 | CLANG_CXX_LIBRARY = "libc++"; 358 | CLANG_ENABLE_MODULES = YES; 359 | CLANG_ENABLE_OBJC_ARC = YES; 360 | CLANG_WARN_BOOL_CONVERSION = YES; 361 | CLANG_WARN_CONSTANT_CONVERSION = YES; 362 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 363 | CLANG_WARN_EMPTY_BODY = YES; 364 | CLANG_WARN_ENUM_CONVERSION = YES; 365 | CLANG_WARN_INT_CONVERSION = YES; 366 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 367 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 368 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 369 | COPY_PHASE_STRIP = NO; 370 | GCC_C_LANGUAGE_STANDARD = gnu99; 371 | GCC_DYNAMIC_NO_PIC = NO; 372 | GCC_OPTIMIZATION_LEVEL = 0; 373 | GCC_PREPROCESSOR_DEFINITIONS = ( 374 | "DEBUG=1", 375 | "$(inherited)", 376 | ); 377 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 378 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 379 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 380 | GCC_WARN_UNDECLARED_SELECTOR = YES; 381 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 382 | GCC_WARN_UNUSED_FUNCTION = YES; 383 | GCC_WARN_UNUSED_VARIABLE = YES; 384 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 385 | ONLY_ACTIVE_ARCH = YES; 386 | SDKROOT = iphoneos; 387 | }; 388 | name = Debug; 389 | }; 390 | 070BDB3E1905AE9A005CB41D /* Release */ = { 391 | isa = XCBuildConfiguration; 392 | buildSettings = { 393 | ALWAYS_SEARCH_USER_PATHS = NO; 394 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 395 | CLANG_CXX_LIBRARY = "libc++"; 396 | CLANG_ENABLE_MODULES = YES; 397 | CLANG_ENABLE_OBJC_ARC = YES; 398 | CLANG_WARN_BOOL_CONVERSION = YES; 399 | CLANG_WARN_CONSTANT_CONVERSION = YES; 400 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 401 | CLANG_WARN_EMPTY_BODY = YES; 402 | CLANG_WARN_ENUM_CONVERSION = YES; 403 | CLANG_WARN_INT_CONVERSION = YES; 404 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 405 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 406 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 407 | COPY_PHASE_STRIP = YES; 408 | ENABLE_NS_ASSERTIONS = NO; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 411 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 412 | GCC_WARN_UNDECLARED_SELECTOR = YES; 413 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 414 | GCC_WARN_UNUSED_FUNCTION = YES; 415 | GCC_WARN_UNUSED_VARIABLE = YES; 416 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 417 | SDKROOT = iphoneos; 418 | VALIDATE_PRODUCT = YES; 419 | }; 420 | name = Release; 421 | }; 422 | 070BDB401905AE9A005CB41D /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 426 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 427 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 428 | GCC_PREFIX_HEADER = "NBSlideUpView/NBSlideUpView-Prefix.pch"; 429 | INFOPLIST_FILE = "NBSlideUpView/NBSlideUpView-Info.plist"; 430 | PRODUCT_NAME = "$(TARGET_NAME)"; 431 | WRAPPER_EXTENSION = app; 432 | }; 433 | name = Debug; 434 | }; 435 | 070BDB411905AE9A005CB41D /* Release */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 440 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 441 | GCC_PREFIX_HEADER = "NBSlideUpView/NBSlideUpView-Prefix.pch"; 442 | INFOPLIST_FILE = "NBSlideUpView/NBSlideUpView-Info.plist"; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | WRAPPER_EXTENSION = app; 445 | }; 446 | name = Release; 447 | }; 448 | 070BDB431905AE9A005CB41D /* Debug */ = { 449 | isa = XCBuildConfiguration; 450 | buildSettings = { 451 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/NBSlideUpView.app/NBSlideUpView"; 452 | FRAMEWORK_SEARCH_PATHS = ( 453 | "$(SDKROOT)/Developer/Library/Frameworks", 454 | "$(inherited)", 455 | "$(DEVELOPER_FRAMEWORKS_DIR)", 456 | ); 457 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 458 | GCC_PREFIX_HEADER = "NBSlideUpView/NBSlideUpView-Prefix.pch"; 459 | GCC_PREPROCESSOR_DEFINITIONS = ( 460 | "DEBUG=1", 461 | "$(inherited)", 462 | ); 463 | INFOPLIST_FILE = "NBSlideUpViewTests/NBSlideUpViewTests-Info.plist"; 464 | PRODUCT_NAME = "$(TARGET_NAME)"; 465 | TEST_HOST = "$(BUNDLE_LOADER)"; 466 | WRAPPER_EXTENSION = xctest; 467 | }; 468 | name = Debug; 469 | }; 470 | 070BDB441905AE9A005CB41D /* Release */ = { 471 | isa = XCBuildConfiguration; 472 | buildSettings = { 473 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/NBSlideUpView.app/NBSlideUpView"; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(SDKROOT)/Developer/Library/Frameworks", 476 | "$(inherited)", 477 | "$(DEVELOPER_FRAMEWORKS_DIR)", 478 | ); 479 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 480 | GCC_PREFIX_HEADER = "NBSlideUpView/NBSlideUpView-Prefix.pch"; 481 | INFOPLIST_FILE = "NBSlideUpViewTests/NBSlideUpViewTests-Info.plist"; 482 | PRODUCT_NAME = "$(TARGET_NAME)"; 483 | TEST_HOST = "$(BUNDLE_LOADER)"; 484 | WRAPPER_EXTENSION = xctest; 485 | }; 486 | name = Release; 487 | }; 488 | /* End XCBuildConfiguration section */ 489 | 490 | /* Begin XCConfigurationList section */ 491 | 070BDB081905AE99005CB41D /* Build configuration list for PBXProject "NBSlideUpView" */ = { 492 | isa = XCConfigurationList; 493 | buildConfigurations = ( 494 | 070BDB3D1905AE9A005CB41D /* Debug */, 495 | 070BDB3E1905AE9A005CB41D /* Release */, 496 | ); 497 | defaultConfigurationIsVisible = 0; 498 | defaultConfigurationName = Release; 499 | }; 500 | 070BDB3F1905AE9A005CB41D /* Build configuration list for PBXNativeTarget "NBSlideUpView" */ = { 501 | isa = XCConfigurationList; 502 | buildConfigurations = ( 503 | 070BDB401905AE9A005CB41D /* Debug */, 504 | 070BDB411905AE9A005CB41D /* Release */, 505 | ); 506 | defaultConfigurationIsVisible = 0; 507 | defaultConfigurationName = Release; 508 | }; 509 | 070BDB421905AE9A005CB41D /* Build configuration list for PBXNativeTarget "NBSlideUpViewTests" */ = { 510 | isa = XCConfigurationList; 511 | buildConfigurations = ( 512 | 070BDB431905AE9A005CB41D /* Debug */, 513 | 070BDB441905AE9A005CB41D /* Release */, 514 | ); 515 | defaultConfigurationIsVisible = 0; 516 | defaultConfigurationName = Release; 517 | }; 518 | /* End XCConfigurationList section */ 519 | }; 520 | rootObject = 070BDB051905AE99005CB41D /* Project object */; 521 | } 522 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/NBAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NBAppDelegate : UIResponder 4 | 5 | @property (strong, nonatomic) UIWindow *window; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/NBAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "NBAppDelegate.h" 2 | 3 | @implementation NBAppDelegate 4 | 5 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 6 | return YES; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/NBSlideUpView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | neerajbaid.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/NBSlideUpView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/NBSlideUpViewSampleContentView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class NBSlideUpViewSampleContentView; 4 | @protocol NBSlideUpViewSampleContentViewDelegate 5 | 6 | @optional 7 | 8 | - (void)slideUpViewSampleContentViewDidRequestAnimateOut:(NBSlideUpViewSampleContentView *)slideUpViewSampleContentView; 9 | 10 | @end 11 | 12 | @interface NBSlideUpViewSampleContentView : UIView 13 | 14 | - (instancetype)initWithDelegate:(id)delegate; 15 | 16 | @property (nonatomic, weak) id delegate; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/NBSlideUpViewSampleContentView.m: -------------------------------------------------------------------------------- 1 | #import "NBSlideUpViewSampleContentView.h" 2 | #import "NBSlideUpView.h" 3 | 4 | @implementation NBSlideUpViewSampleContentView 5 | 6 | - (instancetype)initWithDelegate:(id)delegate { 7 | self = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) 8 | owner:self 9 | options:nil] firstObject]; 10 | if (self) { 11 | self.delegate = delegate; 12 | } 13 | return self; 14 | } 15 | 16 | - (IBAction)sampleButton:(id)sender { 17 | if ([self.delegate respondsToSelector:@selector(slideUpViewSampleContentViewDidRequestAnimateOut:)]) { 18 | [self.delegate slideUpViewSampleContentViewDidRequestAnimateOut:self]; 19 | } 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/NBViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NBSlideUpView.h" 3 | 4 | @interface NBViewController : UIViewController 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/NBViewController.m: -------------------------------------------------------------------------------- 1 | #import "NBSlideUpView.h" 2 | #import "NBSlideUpViewSampleContentView.h" 3 | #import "NBViewController.h" 4 | 5 | @interface NBViewController () 6 | 7 | @property (nonatomic, strong) NBSlideUpView *slideUpView; 8 | 9 | @end 10 | 11 | @implementation NBViewController 12 | 13 | - (void)viewDidLoad { 14 | [super viewDidLoad]; 15 | self.slideUpView = [[NBSlideUpView alloc] initWithSuperview:self.view viewableHeight:200]; 16 | self.slideUpView.delegate = self; 17 | 18 | NBSlideUpViewSampleContentView *sampleContentView = [[NBSlideUpViewSampleContentView alloc] initWithDelegate:self]; 19 | [self.slideUpView.contentView addSubview:sampleContentView]; 20 | } 21 | 22 | - (IBAction)animateIn:(id)sender { 23 | [self.slideUpView animateIn]; 24 | } 25 | 26 | #pragma mark - NBSlideUpViewDelegate 27 | 28 | - (void)slideUpViewDidAnimateIn:(UIView *)slideUpView { 29 | NSLog(@"NBSlideUpView animated in."); 30 | } 31 | 32 | - (void)slideUpViewDidAnimateOut:(UIView *)slideUpView { 33 | NSLog(@"NBSlideUpView animated out."); 34 | } 35 | 36 | - (void)slideUpViewDidAnimateRestore:(UIView *)slideUpView { 37 | NSLog(@"NBSlideUpView animated restore."); 38 | } 39 | 40 | #pragma mark - NBSlideUpViewSampleContentViewDelegate 41 | 42 | - (void)slideUpViewSampleContentViewDidRequestAnimateOut:(NBSlideUpViewSampleContentView *)slideUpViewSampleContentView { 43 | [self.slideUpView animateOut]; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NBSlideUpView 4 | // 5 | // Created by Neeraj Baid on 4/21/14. 6 | // Copyright (c) 2014 Neeraj Baid. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "NBAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([NBAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpViewSampleContentView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpViewTests/NBSlideUpViewTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | neerajbaid.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpViewTests/NBSlideUpViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // NBSlideUpViewTests.m 3 | // NBSlideUpViewTests 4 | // 5 | // Created by Neeraj Baid on 4/21/14. 6 | // Copyright (c) 2014 Neeraj Baid. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NBSlideUpViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation NBSlideUpViewTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /NBSlideUpView Example/NBSlideUpViewTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /NBSlideUpView Example/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neerajbaid/NBSlideUpView/9a5398e09883ada99d09d561733481f18cd7105e/NBSlideUpView Example/close.png -------------------------------------------------------------------------------- /NBSlideUpView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "NBSlideUpView" 3 | s.version = "1.0" 4 | s.summary = "A drop-in modal view that animates on and off the screen to display information" 5 | s.homepage = "https://github.com/neerajbaid/NBSlideUpView/" 6 | s.license = { :type => 'MIT', :text => 'Copyright 2014. Neeraj Baid. This library is distributed under the terms of the MIT/X11.' } 7 | s.author = { "Neeraj Baid" => "wdaareg@gmail.com" } 8 | s.social_media_url = "http://twitter.com/2neeraj" 9 | s.platform = :ios, '7.0' 10 | s.source = { :git => "https://github.com/neerajbaid/NBSlideUpView.git", :tag => "1.0"} 11 | s.source_files = 'NBSlideUpView/*.{h,m}' 12 | s.resource = "NBSlideUpView/close.png" 13 | s.requires_arc = true 14 | end 15 | -------------------------------------------------------------------------------- /NBSlideUpView/NBSlideUpView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol NBSlideUpViewDelegate 4 | 5 | @optional 6 | 7 | - (void)slideUpViewDidAnimateOut:(UIView *)slideUpView; 8 | - (void)slideUpViewDidAnimateIn:(UIView *)slideUpView; 9 | - (void)slideUpViewDidAnimateRestore:(UIView *)slideUpView; 10 | 11 | @end 12 | 13 | @interface NBSlideUpView : UIView 14 | 15 | - (id)initWithSuperview:(UIView *)superview viewableHeight:(CGFloat)viewablePixels; 16 | - (void)animateOut; 17 | - (void)animateIn; 18 | 19 | @property (nonatomic) CGFloat arrowAlpha; 20 | 21 | @property (nonatomic) CGFloat viewablePixels; 22 | @property (nonatomic) CGFloat dragMultiplier; 23 | 24 | @property (nonatomic) CGFloat springDamping; 25 | @property (nonatomic) CGFloat initialSpringVelocity; 26 | @property (nonatomic) CGFloat animateInOutTime; 27 | 28 | @property (nonatomic) BOOL shouldDarkenSuperview; 29 | @property (nonatomic) BOOL shouldTapSuperviewToAnimateOut; 30 | @property (nonatomic) BOOL shouldBlockSuperviewTouchesWhileUp; 31 | 32 | @property (nonatomic, strong) UIView *contentView; 33 | @property (nonatomic, strong) id delegate; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /NBSlideUpView/NBSlideUpView.m: -------------------------------------------------------------------------------- 1 | #import "NBSlideUpView.h" 2 | 3 | @interface NBSlideUpView () 4 | 5 | @property (nonatomic, strong) UIView *overlayView; 6 | 7 | @end 8 | 9 | @implementation NBSlideUpView 10 | 11 | - (id)initWithSuperview:(UIView *)superview viewableHeight:(CGFloat)viewablePixels { 12 | CGRect frame = CGRectMake(0, 13 | superview.frame.size.height, 14 | superview.frame.size.width, 15 | viewablePixels + superview.frame.size.height/3.0); // 3.0 is the default dragMultiplier, as set on self below. 16 | self = [super initWithFrame:frame]; 17 | if (self) { 18 | // Default values. 19 | self.backgroundColor = [UIColor clearColor]; 20 | self.arrowAlpha = 0.7; 21 | self.viewablePixels = viewablePixels; 22 | self.dragMultiplier = 3.0; 23 | self.initialSpringVelocity = 1; 24 | self.animateInOutTime = 0.5; 25 | self.springDamping = 0.8; 26 | self.shouldDarkenSuperview = true; 27 | self.shouldTapSuperviewToAnimateOut = true; 28 | self.shouldBlockSuperviewTouchesWhileUp = true; 29 | self.layer.cornerRadius = 15; 30 | self.layer.masksToBounds = YES; 31 | 32 | CGRect contentViewFrame = frame; 33 | contentViewFrame.origin.y = 0; 34 | UIView *contentView = [[UIView alloc] initWithFrame:contentViewFrame]; 35 | [self addSubview:contentView]; 36 | self.contentView = contentView; 37 | self.contentView.backgroundColor = [UIColor grayColor]; 38 | self.contentView.layer.cornerRadius = 15; 39 | 40 | UIImageView *arrowImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"close.png"]]; 41 | arrowImageView.alpha = self.arrowAlpha; 42 | CGRect arrowFrame = CGRectMake((superview.frame.size.width-37)/2.0, 11, 37, 10); 43 | arrowImageView.frame = arrowFrame; 44 | [self addSubview:arrowImageView]; 45 | 46 | self.overlayView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 47 | superview.frame.size.width, 48 | superview.frame.size.height)]; 49 | [self.overlayView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self 50 | action:@selector(tappedOverlayView)]]; 51 | [superview addSubview:self.overlayView]; 52 | self.overlayView.userInteractionEnabled = NO; 53 | [superview addSubview:self]; 54 | 55 | UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self 56 | action:@selector(onPanned:)]; 57 | [self addGestureRecognizer:pan]; 58 | } 59 | return self; 60 | } 61 | 62 | - (void)setViewablePixels:(CGFloat)viewablePixels { 63 | _viewablePixels = viewablePixels; 64 | if (self.superview) { 65 | CGRect frame = CGRectMake(0, 66 | self.superview.frame.size.height, 67 | self.superview.frame.size.width, 68 | viewablePixels + self.superview.frame.size.height/self.dragMultiplier); 69 | self.frame = frame; 70 | frame.origin.y = 0; 71 | self.contentView.frame = frame; 72 | } 73 | } 74 | 75 | - (void)tappedOverlayView { 76 | if (self.shouldTapSuperviewToAnimateOut) { 77 | [self animateOut]; 78 | } 79 | } 80 | 81 | #pragma mark - Touches/Dragging 82 | 83 | - (void)onPanned:(UIPanGestureRecognizer*)pan { 84 | if (pan.state == UIGestureRecognizerStateEnded) { 85 | if (self.frame.origin.y > self.superview.frame.size.height - self.viewablePixels) { 86 | [self animateOut]; 87 | } else { 88 | [self animateRestore]; 89 | } 90 | } else { 91 | CGPoint offset = [pan translationInView:self]; 92 | CGPoint center = self.center; 93 | center.y += offset.y / self.dragMultiplier; 94 | self.center = center; 95 | [pan setTranslation:CGPointZero inView:self]; 96 | } 97 | } 98 | 99 | - (void)animateIn { 100 | if (self.shouldBlockSuperviewTouchesWhileUp) { 101 | self.overlayView.userInteractionEnabled = YES; 102 | } 103 | [UIView animateWithDuration:self.animateInOutTime 104 | delay:0 105 | usingSpringWithDamping:self.springDamping 106 | initialSpringVelocity:self.initialSpringVelocity 107 | options:UIViewAnimationOptionCurveEaseInOut 108 | animations:^(void) { 109 | self.frame = CGRectMake(self.frame.origin.x, 110 | self.superview.frame.size.height - self.viewablePixels, 111 | self.frame.size.width, 112 | self.frame.size.height); 113 | if (self.shouldDarkenSuperview) { 114 | [self.overlayView setBackgroundColor:[[UIColor blackColor] colorWithAlphaComponent:0.26]]; 115 | } 116 | } completion:^(BOOL completed){ 117 | if ([self.delegate respondsToSelector:@selector(slideUpViewDidAnimateIn:)]) { 118 | [self.delegate slideUpViewDidAnimateIn:self]; 119 | } 120 | }]; 121 | } 122 | 123 | - (void)animateOut { 124 | self.overlayView.userInteractionEnabled = NO; 125 | [UIView animateWithDuration:self.animateInOutTime 126 | delay:0 127 | usingSpringWithDamping:self.springDamping 128 | initialSpringVelocity:self.initialSpringVelocity 129 | options:UIViewAnimationOptionCurveEaseInOut 130 | animations:^(void) { 131 | self.frame = CGRectMake(self.frame.origin.x, 132 | self.superview.frame.size.height, 133 | self.frame.size.width, 134 | self.frame.size.height); 135 | [self.overlayView setBackgroundColor:[UIColor clearColor]]; 136 | } completion:^(BOOL completed) { 137 | if ([self.delegate respondsToSelector:@selector(slideUpViewDidAnimateOut:)]) { 138 | [self.delegate slideUpViewDidAnimateOut:self]; 139 | } 140 | }]; 141 | } 142 | 143 | - (void)animateRestore { 144 | [UIView animateWithDuration:self.animateInOutTime 145 | delay:0 146 | usingSpringWithDamping:self.springDamping 147 | initialSpringVelocity:self.initialSpringVelocity 148 | options:UIViewAnimationOptionCurveEaseInOut animations:^(void) { 149 | self.frame = CGRectMake(self.frame.origin.x, 150 | self.superview.frame.size.height - self.viewablePixels, 151 | self.frame.size.width, 152 | self.frame.size.height); 153 | } completion:^(BOOL completed) { 154 | if ([self.delegate respondsToSelector:@selector(slideUpViewDidAnimateRestore:)]) { 155 | [self.delegate slideUpViewDidAnimateRestore:self]; 156 | } 157 | }]; 158 | } 159 | 160 | @end 161 | 162 | -------------------------------------------------------------------------------- /NBSlideUpView/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neerajbaid/NBSlideUpView/9a5398e09883ada99d09d561733481f18cd7105e/NBSlideUpView/close.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | NBSlideUpView 2 | ============= 3 | ####By [@2neeraj](http://twitter.com/2neeraj) 4 | 5 | This is a highly customizable, sticky modal view that slides up from the bottom of the screen. NBSlideUpView can be dragged off the screen or dismissed programatically. 6 | 7 | (If the below gif doesn't autoplay, feel free to click on it.) 8 | 9 | ![](example.gif) 10 | 11 | 12 | #####Used in 13 | * [giftbook](https://itunes.apple.com/us/app/giftbook-gift-cards-on-your/id707069900?mt=8) 14 | * [WWDC 2014 Scholarship-winning App](https://github.com/neerajbaid/WWDC2014) 15 | 16 | ####Let [me](http://twitter.com/2neeraj) know where you use this library so I can add to the list here! 17 | 18 | ##Installation 19 | ###CocoaPods 20 | [CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like NBSlideUpView in your projects. 21 | 22 | If the cocoapods installation doesn't work, please use the Alternative below. 23 | ```ruby 24 | platform :ios, '7.0' 25 | pod "NBSlideUpView" 26 | ``` 27 | 28 | ###Alternative 29 | Alternatively, you can just drag the NBSlideUpView folder into your project. 30 | 31 | ##Usage 32 | ```smalltalk 33 | NBSlideUpView *slideUpView = [[NBSlideUpView alloc] initWithSuperview:self.view viewableHeight:200]; 34 | slideUpView.delegate = self; 35 | "slideUpView is automatically added as a subview of self.view" 36 | ``` 37 | 38 | ### Add Content to the View 39 | Add a subview to the NBSlideUpView's contentView. 40 | ```smalltalk 41 | [slideUpView.contentView addSubview:aView]; 42 | ``` 43 | 44 | ### Delegate Methods 45 | 46 | ```smalltalk 47 | NBSlideUpViewDelegate 48 | - (void)slideUpViewDidAnimateOut:(UIView *)slideUpView; 49 | - (void)slideUpViewDidAnimateIn:(UIView *)slideUpView; 50 | - (void)slideUpViewDidAnimateRestore:(UIView *)slideUpView; 51 | ``` 52 | 53 | ###Customization 54 | Height of the view. 55 | 56 | ```smalltalk 57 | @property (nonatomic) CGFloat viewablePixels; 58 | ``` 59 | Any aspect of the spring-loaded animation. 60 | 61 | ```smalltalk 62 | @property (nonatomic) CGFloat springDamping; "Default to 0.8" 63 | @property (nonatomic) CGFloat initialSpringVelocity; "Default to 1" 64 | @property (nonatomic) CGFloat animateInOutTime; "Default to 0.5" 65 | ``` 66 | 67 | The stickiness of the view. 68 | ```smalltalk 69 | @property (nonatomic) CGFloat dragMultiplier; 70 | "1.0 means the view moves with the user's finger. > 1.0 means the view sticks. Defaults to 3.0" 71 | ``` 72 | Opacity of the default downward arrow. 73 | ```smalltalk 74 | @property (nonatomic) CGFloat arrowAlpha; "Default to 0.7" 75 | ``` 76 | 77 | Tap superview to dismiss and darkening. 78 | ```smalltalk 79 | @property (nonatomic) BOOL shouldDarkenSuperview; "Default true" 80 | @property (nonatomic) BOOL shouldTapSuperviewToAnimateOut; "Default true" 81 | @property (nonatomic) BOOL shouldBlockSuperviewTouchesWhileUp; "Default true" 82 | ``` 83 | -------------------------------------------------------------------------------- /example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neerajbaid/NBSlideUpView/9a5398e09883ada99d09d561733481f18cd7105e/example.gif -------------------------------------------------------------------------------- /example.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neerajbaid/NBSlideUpView/9a5398e09883ada99d09d561733481f18cd7105e/example.mov --------------------------------------------------------------------------------