mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-20 15:30:17 +00:00
Added long press to remove/unpair host
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user