Skip to content

Commit

Permalink
It would help if I actually called the tap block on the user defined …
Browse files Browse the repository at this point in the history
…queue….

Also ARCified the project
  • Loading branch information
tonymillion committed Mar 26, 2012
1 parent 800e4c0 commit 2821372
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Binary file added .DS_Store
Binary file not shown.
10 changes: 6 additions & 4 deletions YRDropdownView/YRDropdownView.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ typedef void (^YRTapBlock)(void);
NSString *detailText;
UILabel *titleLabel;
UILabel *detailLabel;
UIImage *backgroundImage;
//UIImage *backgroundImage;
UIImageView *backgroundImageView;
UIImage *accessoryImage;
//UIImage *accessoryImage;
UIImageView *accessoryImageView;
UIColor *titleLabelColor;
UIColor *detailLabelColor;
Expand All @@ -33,11 +33,13 @@ typedef void (^YRTapBlock)(void);

@property (copy) NSString *titleText;
@property (copy) NSString *detailText;
@property (assign) UIImage *accessoryImage;

@property (nonatomic, strong) UIImage *accessoryImage;
@property (nonatomic, strong) UIImage *backgroundImage;

@property (assign) float minHeight;
@property (retain) UIColor *titleLabelColor;
@property (retain) UIColor *detailLabelColor;
@property (nonatomic, assign) UIImage *backgroundImage;
@property (nonatomic, assign) SEL onTouch;
@property (assign) BOOL shouldAnimate;

Expand Down
5 changes: 3 additions & 2 deletions YRDropdownView/YRDropdownView.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

@interface UILabel (YRDropdownView)
- (void)sizeToFitFixedWidth:(CGFloat)fixedWidth;

@end

@implementation UILabel (YRDropdownView)
Expand Down Expand Up @@ -282,7 +283,7 @@ + (void)removeView

[currentDropdown removeFromSuperview];

[currentDropdown release];
//[currentDropdown release];
currentDropdown = nil;
}

Expand Down Expand Up @@ -377,7 +378,7 @@ - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
if(self.tapBlock)
{
dispatch_async(dispatch_get_main_queue(), ^{
dispatch_async(_tapQueue, ^{
self.tapBlock();
});
}
Expand Down

0 comments on commit 2821372

Please sign in to comment.