Added long press to remove/unpair host

This commit is contained in:
Diego Waxemberg
2015-01-01 23:25:09 -05:00
parent 3eee684961
commit 417f1e02bc
5 changed files with 32 additions and 0 deletions

View File

@@ -74,6 +74,9 @@ static int LABEL_DY = 20;
_hostPairState.center = CGPointMake(_hostLabel.center.x, _hostLabel.center.y + LABEL_DY);
_hostStatus.center = CGPointMake(_hostPairState.center.x, _hostPairState.center.y + LABEL_DY);
UILongPressGestureRecognizer* longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(hostLongClicked)];
[_hostButton addGestureRecognizer:longPressRecognizer];
[self updateBounds];
[self addSubview:_hostButton];
[self addSubview:_hostLabel];
@@ -118,6 +121,10 @@ static int LABEL_DY = 20;
return self;
}
- (void) hostLongClicked {
[_callback hostLongClicked:_host];
}
- (void) hostClicked {
[_callback hostClicked:_host];
}