Skip to content

Commit

Permalink
Updated individual class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftales committed Mar 31, 2015
1 parent 887ff50 commit efb6889
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions VSDropdown.m
Expand Up @@ -317,8 +317,13 @@ -(void)validColorComponet:(CGFloat *)component forscale:(float)scale

}

- (instancetype)init
{
return [self initWithDelegate:nil];

}

-(id)initWithDelegate:(id<VSDropdownDelegate>)delegate
-(instancetype)initWithDelegate:(id<VSDropdownDelegate>)delegate
{
self = [super init];
if (self)
Expand All @@ -336,6 +341,7 @@ -(id)initWithDelegate:(id<VSDropdownDelegate>)delegate
}



-(void)setUpViews
{
if (self.backGroundImageView == nil)
Expand Down Expand Up @@ -707,18 +713,10 @@ - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event

BOOL inside = [super pointInside:point withEvent:event];

if (self.controlRemovalManually == NO)
if (inside == NO && self.controlRemovalManually == NO)
{

if (inside == NO)
{
CGPoint pointInDropdownView = [self convertPoint:point toView:self.dropDownView];
if ([self.dropDownView pointInside:pointInDropdownView withEvent:event] == NO)
{
[self remove];
}

}
[self remove];

}

return inside;
Expand Down

0 comments on commit efb6889

Please sign in to comment.