forked from organicmaps/organicmaps-tmp
Merge pull request #2490 from igrechuhin/ig-master
[ios] Added long tap support to downloader.
This commit is contained in:
commit
36eb77139d
2 changed files with 27 additions and 0 deletions
|
@ -491,6 +491,18 @@ using namespace storage;
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
#pragma mark - UILongPressGestureRecognizer
|
||||
|
||||
|
||||
- (IBAction)longPress:(UILongPressGestureRecognizer *)sender
|
||||
{
|
||||
if (sender.state != UIGestureRecognizerStateBegan)
|
||||
return;
|
||||
NSIndexPath * indexPath = [self.tableView indexPathForRowAtPoint:[sender locationInView:self.tableView]];
|
||||
if (indexPath)
|
||||
[self showActionSheetForRowAtIndexPath:indexPath];
|
||||
}
|
||||
|
||||
#pragma mark - UIActionSheetDelegate
|
||||
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
|
||||
|
|
|
@ -55,11 +55,13 @@
|
|||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="zBz-nW-lOz">
|
||||
<rect key="frame" x="0.0" y="64" width="600" height="536"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<gestureRecognizers/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="eCI-mf-eCv" id="nWw-Fy-ADM"/>
|
||||
<outletCollection property="gestureRecognizers" destination="zmI-X6-NfL" appends="YES" id="ms4-To-w5e"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="q0y-yK-baH" userLabel="UpdateAllView">
|
||||
|
@ -159,6 +161,7 @@
|
|||
</searchBar>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<gestureRecognizers/>
|
||||
<constraints>
|
||||
<constraint firstItem="zBz-nW-lOz" firstAttribute="leading" secondItem="ttZ-X0-Odw" secondAttribute="leading" id="7un-Oz-Ck3"/>
|
||||
<constraint firstItem="XeK-11-Ief" firstAttribute="leading" secondItem="fet-TW-V41" secondAttribute="leading" id="95J-ks-5nO"/>
|
||||
|
@ -188,6 +191,11 @@
|
|||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="y2m-cz-WWh" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="0.5" id="zmI-X6-NfL">
|
||||
<connections>
|
||||
<action selector="longPress:" destination="eCI-mf-eCv" id="ExE-Gq-m4x"/>
|
||||
</connections>
|
||||
</pongPressGestureRecognizer>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3872" y="1224"/>
|
||||
</scene>
|
||||
|
@ -206,11 +214,13 @@
|
|||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="RAh-Cr-4I1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<gestureRecognizers/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="cIk-gU-IeI" id="d9Q-ue-dKw"/>
|
||||
<outletCollection property="gestureRecognizers" destination="0ix-3r-un4" appends="YES" id="Fyy-gc-1rD"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lqq-c4-P1I" userLabel="UpdateAllView">
|
||||
|
@ -327,6 +337,11 @@
|
|||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="CQ8-k2-EYn" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="0.5" id="0ix-3r-un4">
|
||||
<connections>
|
||||
<action selector="longPress:" destination="cIk-gU-IeI" id="XE7-v6-PXu"/>
|
||||
</connections>
|
||||
</pongPressGestureRecognizer>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="4531" y="1224"/>
|
||||
</scene>
|
||||
|
|
Loading…
Add table
Reference in a new issue