Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi! #9

Closed
wants to merge 12 commits into from
12 changes: 2 additions & 10 deletions YRDropdownExample.xcodeproj/project.pbxproj
Expand Up @@ -17,8 +17,6 @@
2D5FCB5D14D30C2C00DA334B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D5FCB5C14D30C2C00DA334B /* AppDelegate.m */; };
2D5FCB6014D30C2C00DA334B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D5FCB5F14D30C2C00DA334B /* ViewController.m */; };
2D5FCB6314D30C2C00DA334B /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D5FCB6114D30C2C00DA334B /* ViewController.xib */; };
2DC084D814D878460013863F /* bg-yellow.png in Resources */ = {isa = PBXBuildFile; fileRef = 2DC084D414D878460013863F /* bg-yellow.png */; };
2DC084D914D878460013863F /* bg-yellow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2DC084D514D878460013863F /* bg-yellow@2x.png */; };
2DC084DA14D878460013863F /* YRDropdownView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DC084D714D878460013863F /* YRDropdownView.m */; };
/* End PBXBuildFile section */

Expand All @@ -39,8 +37,6 @@
2D5FCB5F14D30C2C00DA334B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
2D5FCB6214D30C2C00DA334B /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = "<group>"; };
2D5FCB7214D321BC00DA334B /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
2DC084D414D878460013863F /* bg-yellow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bg-yellow.png"; path = "YRDropdownView/bg-yellow.png"; sourceTree = "<group>"; };
2DC084D514D878460013863F /* bg-yellow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bg-yellow@2x.png"; path = "YRDropdownView/bg-yellow@2x.png"; sourceTree = "<group>"; };
2DC084D614D878460013863F /* YRDropdownView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YRDropdownView.h; path = YRDropdownView/YRDropdownView.h; sourceTree = "<group>"; };
2DC084D714D878460013863F /* YRDropdownView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YRDropdownView.m; path = YRDropdownView/YRDropdownView.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand All @@ -62,8 +58,6 @@
2D3DC25414D7419F00898E62 /* YRDropdownView */ = {
isa = PBXGroup;
children = (
2DC084D414D878460013863F /* bg-yellow.png */,
2DC084D514D878460013863F /* bg-yellow@2x.png */,
2DC084D614D878460013863F /* YRDropdownView.h */,
2DC084D714D878460013863F /* YRDropdownView.m */,
);
Expand Down Expand Up @@ -188,8 +182,6 @@
2D5FCB6314D30C2C00DA334B /* ViewController.xib in Resources */,
2D3DC25114D73F8E00898E62 /* dropdown-alert@2x.png in Resources */,
2D3DC25214D73F8E00898E62 /* dropdown-alert.png in Resources */,
2DC084D814D878460013863F /* bg-yellow.png in Resources */,
2DC084D914D878460013863F /* bg-yellow@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -234,6 +226,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -248,7 +241,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -258,14 +250,14 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
"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_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
11 changes: 2 additions & 9 deletions YRDropdownExample/AppDelegate.m
Expand Up @@ -15,18 +15,11 @@ @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];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
Expand Down
5 changes: 1 addition & 4 deletions YRDropdownExample/ViewController.m
Expand Up @@ -55,8 +55,5 @@ - (IBAction)showInWindow:(id)sender {
- (IBAction)hide:(id)sender {
[YRDropdownView hideDropdownInView:demoView animated:YES];
}
- (void)dealloc {
[demoView release];
[super dealloc];
}

@end
19 changes: 11 additions & 8 deletions YRDropdownExample/YRDropdownView/YRDropdownView.h
Expand Up @@ -15,22 +15,22 @@
NSString *detailText;
UILabel *titleLabel;
UILabel *detailLabel;
UIImage *backgroundImage;
UIImageView *backgroundImageView;
UIImage *accessoryImage;
UIImageView *accessoryImageView;
SEL onTouch;
NSDate *showStarted;
BOOL shouldAnimate;
}

@property (copy) NSString *titleText;
@property (copy) NSString *detailText;
@property (assign) UIImage *accessoryImage;
@property (assign) float minHeight;
@property (nonatomic, assign) UIImage *backgroundImage;
@property (nonatomic, copy) NSString *titleText;
@property (nonatomic, copy) NSString *detailText;
@property (nonatomic, strong) UIImage *accessoryImage;
@property (nonatomic, assign) float minHeight;
@property (nonatomic, assign) SEL onTouch;
@property (assign) BOOL shouldAnimate;
@property (nonatomic, assign) BOOL shouldAnimate;
@property (nonatomic, strong) NSMutableArray * backgroundColors;
@property (nonatomic, strong) NSMutableArray * backgroundColorPositions;
@property (nonatomic, assign, readonly) BOOL isView;

#pragma mark - View methods

Expand Down Expand Up @@ -62,8 +62,11 @@
+ (BOOL)hideDropdownInView:(UIView *)view;
+ (BOOL)hideDropdownInView:(UIView *)view animated:(BOOL)animated;

+ (void)setRtl:(BOOL)rtl;

#pragma mark -
- (void)show:(BOOL)animated;
- (void)hide:(BOOL)animated;
- (void)flipViewToOrientation:(NSNotification *)notification;

@end