add gesture help screen
@ -28,6 +28,7 @@ extern NSString *DocumentsChangedNotification;
|
|||||||
- (void)showAlertWithTitle:(NSString *)title message:(NSString *)message;
|
- (void)showAlertWithTitle:(NSString *)title message:(NSString *)message;
|
||||||
- (IBAction)showInsertDisk:(id)sender;
|
- (IBAction)showInsertDisk:(id)sender;
|
||||||
- (IBAction)showSettings:(id)sender;
|
- (IBAction)showSettings:(id)sender;
|
||||||
|
- (IBAction)showGestureHelp:(id)sender;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ NSString *DocumentsChangedNotification = @"documentsChanged";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Settings / Insert Disk panels
|
#pragma mark - Settings / Insert Disk / Help
|
||||||
|
|
||||||
- (void)showSettings:(id)sender {
|
- (void)showSettings:(id)sender {
|
||||||
[self.window.rootViewController performSelector:@selector(showSettings:) withObject:sender];
|
[self.window.rootViewController performSelector:@selector(showSettings:) withObject:sender];
|
||||||
@ -166,6 +166,10 @@ NSString *DocumentsChangedNotification = @"documentsChanged";
|
|||||||
[self.window.rootViewController performSelector:@selector(showInsertDisk:) withObject:sender];
|
[self.window.rootViewController performSelector:@selector(showInsertDisk:) withObject:sender];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)showGestureHelp:(id)sender {
|
||||||
|
[self.window.rootViewController performSelector:@selector(showGestureHelp:) withObject:sender];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Files
|
#pragma mark - Files
|
||||||
|
|
||||||
- (BOOL)isSandboxed {
|
- (BOOL)isSandboxed {
|
||||||
|
26
Mini vMac/Assets.xcassets/Swipe2Down.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Down.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Down@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Down@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"template-rendering-intent" : "template"
|
||||||
|
}
|
||||||
|
}
|
BIN
Mini vMac/Assets.xcassets/Swipe2Down.imageset/Swipe2Down.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
Mini vMac/Assets.xcassets/Swipe2Down.imageset/Swipe2Down@2x.png
vendored
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
Mini vMac/Assets.xcassets/Swipe2Down.imageset/Swipe2Down@3x.png
vendored
Normal file
After Width: | Height: | Size: 4.3 KiB |
26
Mini vMac/Assets.xcassets/Swipe2Left.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Left.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Left@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Left@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"template-rendering-intent" : "template"
|
||||||
|
}
|
||||||
|
}
|
BIN
Mini vMac/Assets.xcassets/Swipe2Left.imageset/Swipe2Left.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
Mini vMac/Assets.xcassets/Swipe2Left.imageset/Swipe2Left@2x.png
vendored
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
Mini vMac/Assets.xcassets/Swipe2Left.imageset/Swipe2Left@3x.png
vendored
Normal file
After Width: | Height: | Size: 4.3 KiB |
26
Mini vMac/Assets.xcassets/Swipe2Right.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Right.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Right@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Right@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"template-rendering-intent" : "template"
|
||||||
|
}
|
||||||
|
}
|
BIN
Mini vMac/Assets.xcassets/Swipe2Right.imageset/Swipe2Right.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
Mini vMac/Assets.xcassets/Swipe2Right.imageset/Swipe2Right@2x.png
vendored
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
Mini vMac/Assets.xcassets/Swipe2Right.imageset/Swipe2Right@3x.png
vendored
Normal file
After Width: | Height: | Size: 4.3 KiB |
26
Mini vMac/Assets.xcassets/Swipe2Up.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Up.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Up@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Swipe2Up@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"template-rendering-intent" : "template"
|
||||||
|
}
|
||||||
|
}
|
BIN
Mini vMac/Assets.xcassets/Swipe2Up.imageset/Swipe2Up.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
Mini vMac/Assets.xcassets/Swipe2Up.imageset/Swipe2Up@2x.png
vendored
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
Mini vMac/Assets.xcassets/Swipe2Up.imageset/Swipe2Up@3x.png
vendored
Normal file
After Width: | Height: | Size: 4.3 KiB |
@ -23,24 +23,194 @@
|
|||||||
<rect key="frame" x="0.0" y="44" width="375" height="734"/>
|
<rect key="frame" x="0.0" y="44" width="375" height="734"/>
|
||||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
</view>
|
</view>
|
||||||
|
<visualEffectView hidden="YES" opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="o5Z-in-kcg">
|
||||||
|
<rect key="frame" x="37.666666666666657" y="186" width="300" height="440"/>
|
||||||
|
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="VP8-Cw-QnG">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="300" height="440"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<visualEffectView opaque="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6hC-03-7fj">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="60" height="312"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="BAe-j4-Jso">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="60" height="312"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
</view>
|
||||||
|
<vibrancyEffect>
|
||||||
|
<blurEffect style="regular"/>
|
||||||
|
</vibrancyEffect>
|
||||||
|
</visualEffectView>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Gestures" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mtd-2d-R6u">
|
||||||
|
<rect key="frame" x="0.0" y="28" width="300" height="21"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Swipe2Left" translatesAutoresizingMaskIntoConstraints="NO" id="pzY-d9-3Z5">
|
||||||
|
<rect key="frame" x="15" y="66" width="64" height="64"/>
|
||||||
|
<color key="tintColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="64" id="CmV-Bq-j5o"/>
|
||||||
|
<constraint firstAttribute="width" constant="64" id="gH6-fx-cgO"/>
|
||||||
|
</constraints>
|
||||||
|
</imageView>
|
||||||
|
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Swipe2Right" translatesAutoresizingMaskIntoConstraints="NO" id="7WX-Kv-Q7i">
|
||||||
|
<rect key="frame" x="15" y="152" width="64" height="64"/>
|
||||||
|
<color key="tintColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="64" id="8yn-GP-Kd1"/>
|
||||||
|
<constraint firstAttribute="width" constant="64" id="dEn-fC-loh"/>
|
||||||
|
</constraints>
|
||||||
|
</imageView>
|
||||||
|
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Swipe2Up" translatesAutoresizingMaskIntoConstraints="NO" id="ogt-xN-NKI">
|
||||||
|
<rect key="frame" x="15" y="238" width="64" height="64"/>
|
||||||
|
<color key="tintColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="64" id="L2w-OD-WT1"/>
|
||||||
|
<constraint firstAttribute="width" constant="64" id="yKv-YC-eFy"/>
|
||||||
|
</constraints>
|
||||||
|
</imageView>
|
||||||
|
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Swipe2Down" translatesAutoresizingMaskIntoConstraints="NO" id="GSB-g7-f2Y">
|
||||||
|
<rect key="frame" x="15" y="324" width="64" height="64"/>
|
||||||
|
<color key="tintColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" constant="64" id="1ZM-my-t5g"/>
|
||||||
|
<constraint firstAttribute="height" constant="64" id="9hg-7C-WG2"/>
|
||||||
|
</constraints>
|
||||||
|
</imageView>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Insert Disk" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IYD-cg-suz">
|
||||||
|
<rect key="frame" x="87" y="66" width="81.666666666666686" height="21"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Swipe left with two fingers" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SsX-0c-kRw">
|
||||||
|
<rect key="frame" x="87" y="95" width="167" height="17"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="light" pointSize="14"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Show Settings" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pNn-B0-E5z">
|
||||||
|
<rect key="frame" x="87" y="152" width="110" height="21"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Swipe right with two fingers" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lHi-aV-uGo">
|
||||||
|
<rect key="frame" x="86.999999999999986" y="181" width="175.66666666666663" height="17"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="light" pointSize="14"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Show Keyboard" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QcY-8W-bqI">
|
||||||
|
<rect key="frame" x="87" y="238" width="120" height="21"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Swipe up with two fingers" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6u4-fn-SWw">
|
||||||
|
<rect key="frame" x="86.999999999999986" y="267" width="162.66666666666663" height="17"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="light" pointSize="14"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hide Keyboard" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8kk-bG-T9V">
|
||||||
|
<rect key="frame" x="87" y="324" width="113" height="21"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Swipe down with two fingers" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5ZP-Fp-fg5">
|
||||||
|
<rect key="frame" x="87.000000000000014" y="353" width="181.33333333333337" height="17"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="light" pointSize="14"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="you can disable this help in Settings" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eaR-vV-QQc">
|
||||||
|
<rect key="frame" x="0.0" y="417.66666666666663" width="300" height="14.333333333333314"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="light" pointSize="11"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="5ZP-Fp-fg5" secondAttribute="trailing" constant="8" id="9Gu-y0-PaJ"/>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="pNn-B0-E5z" secondAttribute="trailing" constant="8" id="9QD-19-je9"/>
|
||||||
|
<constraint firstItem="8kk-bG-T9V" firstAttribute="leading" secondItem="GSB-g7-f2Y" secondAttribute="trailing" constant="8" id="Anm-7T-dRr"/>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="6u4-fn-SWw" secondAttribute="trailing" constant="8" id="CzZ-uK-QDB"/>
|
||||||
|
<constraint firstItem="pzY-d9-3Z5" firstAttribute="leading" secondItem="VP8-Cw-QnG" secondAttribute="leading" constant="15" id="Ece-TK-n4P"/>
|
||||||
|
<constraint firstItem="lHi-aV-uGo" firstAttribute="top" secondItem="pNn-B0-E5z" secondAttribute="bottom" constant="8" id="JPX-71-3Bt"/>
|
||||||
|
<constraint firstItem="5ZP-Fp-fg5" firstAttribute="top" secondItem="8kk-bG-T9V" secondAttribute="bottom" constant="8" id="PRj-jH-UYX"/>
|
||||||
|
<constraint firstItem="IYD-cg-suz" firstAttribute="leading" secondItem="pzY-d9-3Z5" secondAttribute="trailing" constant="8" id="PVd-ls-uzM"/>
|
||||||
|
<constraint firstItem="GSB-g7-f2Y" firstAttribute="top" secondItem="ogt-xN-NKI" secondAttribute="bottom" constant="22" id="Pr9-tm-GBe"/>
|
||||||
|
<constraint firstItem="IYD-cg-suz" firstAttribute="top" secondItem="pzY-d9-3Z5" secondAttribute="top" id="QaT-ga-RpH"/>
|
||||||
|
<constraint firstItem="QcY-8W-bqI" firstAttribute="top" secondItem="ogt-xN-NKI" secondAttribute="top" id="TCj-tJ-mir"/>
|
||||||
|
<constraint firstItem="lHi-aV-uGo" firstAttribute="leading" secondItem="7WX-Kv-Q7i" secondAttribute="trailing" constant="8" id="TZw-2f-LzT"/>
|
||||||
|
<constraint firstItem="7WX-Kv-Q7i" firstAttribute="top" secondItem="pzY-d9-3Z5" secondAttribute="bottom" constant="22" id="Tfj-P8-Hjm"/>
|
||||||
|
<constraint firstItem="Mtd-2d-R6u" firstAttribute="top" secondItem="VP8-Cw-QnG" secondAttribute="top" constant="28" id="UjE-40-eQC"/>
|
||||||
|
<constraint firstItem="5ZP-Fp-fg5" firstAttribute="leading" secondItem="GSB-g7-f2Y" secondAttribute="trailing" constant="8" id="UpC-yy-CJC"/>
|
||||||
|
<constraint firstItem="6u4-fn-SWw" firstAttribute="top" secondItem="QcY-8W-bqI" secondAttribute="bottom" constant="8" id="Uxi-MW-Pdu"/>
|
||||||
|
<constraint firstItem="Mtd-2d-R6u" firstAttribute="width" secondItem="VP8-Cw-QnG" secondAttribute="width" id="Wzq-tS-xNx"/>
|
||||||
|
<constraint firstItem="Mtd-2d-R6u" firstAttribute="centerX" secondItem="VP8-Cw-QnG" secondAttribute="centerX" id="YIO-q1-Kal"/>
|
||||||
|
<constraint firstItem="pzY-d9-3Z5" firstAttribute="top" secondItem="Mtd-2d-R6u" secondAttribute="bottom" constant="17" id="Yiv-2o-k6a"/>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="IYD-cg-suz" secondAttribute="trailing" constant="8" id="Zl8-zx-U7H"/>
|
||||||
|
<constraint firstItem="pNn-B0-E5z" firstAttribute="top" secondItem="7WX-Kv-Q7i" secondAttribute="top" id="aNO-vN-07B"/>
|
||||||
|
<constraint firstItem="SsX-0c-kRw" firstAttribute="top" secondItem="IYD-cg-suz" secondAttribute="bottom" constant="8" id="ay6-dS-d9s"/>
|
||||||
|
<constraint firstItem="GSB-g7-f2Y" firstAttribute="leading" secondItem="VP8-Cw-QnG" secondAttribute="leading" constant="15" id="gZm-k7-TnC"/>
|
||||||
|
<constraint firstItem="eaR-vV-QQc" firstAttribute="width" secondItem="VP8-Cw-QnG" secondAttribute="width" id="hGL-WS-EBl"/>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="lHi-aV-uGo" secondAttribute="trailing" constant="8" id="imt-CF-8d7"/>
|
||||||
|
<constraint firstItem="ogt-xN-NKI" firstAttribute="leading" secondItem="VP8-Cw-QnG" secondAttribute="leading" constant="15" id="ivK-8T-nqE"/>
|
||||||
|
<constraint firstItem="QcY-8W-bqI" firstAttribute="leading" secondItem="ogt-xN-NKI" secondAttribute="trailing" constant="8" id="j2z-Af-SeH"/>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="SsX-0c-kRw" secondAttribute="trailing" constant="8" id="kFP-MT-M1q"/>
|
||||||
|
<constraint firstItem="pNn-B0-E5z" firstAttribute="leading" secondItem="7WX-Kv-Q7i" secondAttribute="trailing" constant="8" id="mor-uC-od4"/>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="8kk-bG-T9V" secondAttribute="trailing" constant="8" id="nvs-GX-kwP"/>
|
||||||
|
<constraint firstItem="6u4-fn-SWw" firstAttribute="leading" secondItem="ogt-xN-NKI" secondAttribute="trailing" constant="8" id="pEX-d7-Ybb"/>
|
||||||
|
<constraint firstItem="eaR-vV-QQc" firstAttribute="centerX" secondItem="VP8-Cw-QnG" secondAttribute="centerX" id="r6H-B1-mRG"/>
|
||||||
|
<constraint firstItem="8kk-bG-T9V" firstAttribute="top" secondItem="GSB-g7-f2Y" secondAttribute="top" id="u9p-vU-w4i"/>
|
||||||
|
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="QcY-8W-bqI" secondAttribute="trailing" constant="8" id="uVe-7l-e36"/>
|
||||||
|
<constraint firstItem="ogt-xN-NKI" firstAttribute="top" secondItem="7WX-Kv-Q7i" secondAttribute="bottom" constant="22" id="xRf-Rk-xeC"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="eaR-vV-QQc" secondAttribute="bottom" constant="8" id="xp5-4f-TyT"/>
|
||||||
|
<constraint firstItem="SsX-0c-kRw" firstAttribute="leading" secondItem="pzY-d9-3Z5" secondAttribute="trailing" constant="8" id="yXo-zt-NvQ"/>
|
||||||
|
<constraint firstItem="7WX-Kv-Q7i" firstAttribute="leading" secondItem="VP8-Cw-QnG" secondAttribute="leading" constant="15" id="z6y-It-hYy"/>
|
||||||
|
</constraints>
|
||||||
|
</view>
|
||||||
|
<gestureRecognizers/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" constant="300" id="iDK-VU-jRi"/>
|
||||||
|
<constraint firstAttribute="height" constant="440" id="vKz-Fv-ZLf"/>
|
||||||
|
</constraints>
|
||||||
|
<blurEffect style="regular"/>
|
||||||
|
<userDefinedRuntimeAttributes>
|
||||||
|
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||||
|
<integer key="value" value="25"/>
|
||||||
|
</userDefinedRuntimeAttribute>
|
||||||
|
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
|
||||||
|
</userDefinedRuntimeAttributes>
|
||||||
|
<connections>
|
||||||
|
<outletCollection property="gestureRecognizers" destination="LgR-E7-y3z" appends="YES" id="xAw-L3-sm3"/>
|
||||||
|
</connections>
|
||||||
|
</visualEffectView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
<constraint firstItem="o5Z-in-kcg" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="0jF-Nq-kPe"/>
|
||||||
<constraint firstItem="70W-4V-tYr" firstAttribute="bottom" secondItem="wfy-db-euE" secondAttribute="top" id="Xn1-gS-YTJ"/>
|
<constraint firstItem="70W-4V-tYr" firstAttribute="bottom" secondItem="wfy-db-euE" secondAttribute="top" id="Xn1-gS-YTJ"/>
|
||||||
|
<constraint firstItem="o5Z-in-kcg" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="bHO-kd-35A"/>
|
||||||
<constraint firstItem="70W-4V-tYr" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="ddo-cc-64n"/>
|
<constraint firstItem="70W-4V-tYr" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="ddo-cc-64n"/>
|
||||||
<constraint firstItem="70W-4V-tYr" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="e9i-3F-kaI"/>
|
<constraint firstItem="70W-4V-tYr" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="e9i-3F-kaI"/>
|
||||||
<constraint firstAttribute="trailing" secondItem="70W-4V-tYr" secondAttribute="trailing" id="kDH-sv-91j"/>
|
<constraint firstAttribute="trailing" secondItem="70W-4V-tYr" secondAttribute="trailing" id="kDH-sv-91j"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
|
<outlet property="helpView" destination="o5Z-in-kcg" id="eha-6S-KGo"/>
|
||||||
<outlet property="screenView" destination="70W-4V-tYr" id="W9r-vA-9kk"/>
|
<outlet property="screenView" destination="70W-4V-tYr" id="W9r-vA-9kk"/>
|
||||||
<segue destination="cRQ-kQ-dxG" kind="presentation" identifier="disk" id="WX7-3F-M1R"/>
|
<segue destination="cRQ-kQ-dxG" kind="presentation" identifier="disk" id="WX7-3F-M1R"/>
|
||||||
<segue destination="BoP-db-djl" kind="presentation" identifier="settings" id="QXf-fV-uw4"/>
|
<segue destination="BoP-db-djl" kind="presentation" identifier="settings" id="QXf-fV-uw4"/>
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
|
<tapGestureRecognizer id="LgR-E7-y3z">
|
||||||
|
<connections>
|
||||||
|
<action selector="hideGestureHelp:" destination="BYZ-38-t0r" id="Rgz-KD-Scl"/>
|
||||||
|
</connections>
|
||||||
|
</tapGestureRecognizer>
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="346" y="381"/>
|
<point key="canvasLocation" x="344.80000000000001" y="380.54187192118229"/>
|
||||||
</scene>
|
</scene>
|
||||||
<!--Settings-->
|
<!--Settings-->
|
||||||
<scene sceneID="Lht-Fe-oRx">
|
<scene sceneID="Lht-Fe-oRx">
|
||||||
@ -359,6 +529,10 @@
|
|||||||
<image name="Interrupt" width="30" height="30"/>
|
<image name="Interrupt" width="30" height="30"/>
|
||||||
<image name="Reset" width="30" height="30"/>
|
<image name="Reset" width="30" height="30"/>
|
||||||
<image name="Settings" width="30" height="30"/>
|
<image name="Settings" width="30" height="30"/>
|
||||||
|
<image name="Swipe2Down" width="64" height="64"/>
|
||||||
|
<image name="Swipe2Left" width="64" height="64"/>
|
||||||
|
<image name="Swipe2Right" width="64" height="64"/>
|
||||||
|
<image name="Swipe2Up" width="64" height="64"/>
|
||||||
<image name="floppy30" width="30" height="30"/>
|
<image name="floppy30" width="30" height="30"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
@ -92,6 +92,7 @@ typedef enum : NSInteger {
|
|||||||
footerView.textColor = [UIColor darkGrayColor];
|
footerView.textColor = [UIColor darkGrayColor];
|
||||||
footerView.font = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]];
|
footerView.font = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]];
|
||||||
footerView.backgroundColor = [UIColor clearColor];
|
footerView.backgroundColor = [UIColor clearColor];
|
||||||
|
footerView.scrollEnabled = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)viewDidAppear:(BOOL)animated {
|
- (void)viewDidAppear:(BOOL)animated {
|
||||||
@ -147,6 +148,12 @@ typedef enum : NSInteger {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)changeAutoShowGestureHelp:(UISwitch*)sender {
|
||||||
|
if ([sender isKindOfClass:[UISwitch class]]) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:sender.on forKey:@"autoShowGestureHelp"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Table view data source
|
#pragma mark - Table view data source
|
||||||
|
|
||||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||||
@ -165,7 +172,7 @@ typedef enum : NSInteger {
|
|||||||
case SettingsSectionMachine:
|
case SettingsSectionMachine:
|
||||||
return machineList.count;
|
return machineList.count;
|
||||||
case SettingsSectionAbout:
|
case SettingsSectionAbout:
|
||||||
return aboutItems.count;
|
return aboutItems.count + 1;
|
||||||
default:
|
default:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -270,18 +277,12 @@ typedef enum : NSInteger {
|
|||||||
cell.accessoryType = (item == selectedEmulatorBundle) ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
|
cell.accessoryType = (item == selectedEmulatorBundle) ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
|
||||||
cell.selectionStyle = rowIsHeader ? UITableViewCellSelectionStyleNone : UITableViewCellSelectionStyleDefault;
|
cell.selectionStyle = rowIsHeader ? UITableViewCellSelectionStyleNone : UITableViewCellSelectionStyleDefault;
|
||||||
} else if (section == SettingsSectionAbout) {
|
} else if (section == SettingsSectionAbout) {
|
||||||
cell = [tableView dequeueReusableCellWithIdentifier:@"about" forIndexPath:indexPath];
|
if (indexPath.row >= aboutItems.count) {
|
||||||
NSDictionary<NSString*,NSString*> *item = aboutItems[indexPath.row];
|
cell = [self switchCellForTableView:tableView indexPath:indexPath action:@selector(changeAutoShowGestureHelp:) on:[defaults boolForKey:@"autoShowGestureHelp"]];
|
||||||
cell.textLabel.text = item[@"text"];
|
cell.textLabel.text = NSLocalizedString(@"Show Gesture Help", nil);
|
||||||
NSString *detailText = item[@"detailText"];
|
|
||||||
if ([detailText isEqualToString:@"$version"]) {
|
|
||||||
NSString *versionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
|
||||||
NSString *commitString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"GitVersion"];
|
|
||||||
cell.detailTextLabel.text = commitString.length > 0 ? [NSString stringWithFormat:@"%@ (%@)", versionString, commitString] : versionString;
|
|
||||||
} else {
|
} else {
|
||||||
cell.detailTextLabel.text = detailText;
|
cell = [self aboutCellForTableView:tableView indexPath:indexPath];
|
||||||
}
|
}
|
||||||
cell.accessoryType = item[@"link"] == nil ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator;
|
|
||||||
} else if (section == SettingsSectionDisplay) {
|
} else if (section == SettingsSectionDisplay) {
|
||||||
cell = [tableView dequeueReusableCellWithIdentifier:@"display" forIndexPath:indexPath];
|
cell = [tableView dequeueReusableCellWithIdentifier:@"display" forIndexPath:indexPath];
|
||||||
UISegmentedControl *filterControl = (UISegmentedControl*)[cell viewWithTag:128];
|
UISegmentedControl *filterControl = (UISegmentedControl*)[cell viewWithTag:128];
|
||||||
@ -297,6 +298,22 @@ typedef enum : NSInteger {
|
|||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (UITableViewCell*)aboutCellForTableView:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath {
|
||||||
|
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"about" forIndexPath:indexPath];
|
||||||
|
NSDictionary<NSString*,NSString*> *item = aboutItems[indexPath.row];
|
||||||
|
cell.textLabel.text = item[@"text"];
|
||||||
|
NSString *detailText = item[@"detailText"];
|
||||||
|
if ([detailText isEqualToString:@"$version"]) {
|
||||||
|
NSString *versionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||||
|
NSString *commitString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"GitVersion"];
|
||||||
|
cell.detailTextLabel.text = commitString.length > 0 ? [NSString stringWithFormat:@"%@ (%@)", versionString, commitString] : versionString;
|
||||||
|
} else {
|
||||||
|
cell.detailTextLabel.text = detailText;
|
||||||
|
}
|
||||||
|
cell.accessoryType = item[@"link"] == nil ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator;
|
||||||
|
return cell;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||||
@ -322,10 +339,17 @@ typedef enum : NSInteger {
|
|||||||
selectedEmulatorBundle = bundle;
|
selectedEmulatorBundle = bundle;
|
||||||
[tableView reloadSections:[NSIndexSet indexSetWithIndex:SettingsSectionSpeed] withRowAnimation:UITableViewRowAnimationAutomatic];
|
[tableView reloadSections:[NSIndexSet indexSetWithIndex:SettingsSectionSpeed] withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||||
} else if (indexPath.section == SettingsSectionAbout) {
|
} else if (indexPath.section == SettingsSectionAbout) {
|
||||||
// links in about
|
if (indexPath.row >= aboutItems.count) {
|
||||||
NSString *linkURL = aboutItems[indexPath.row][@"link"];
|
// show gesture help
|
||||||
if (linkURL != nil) {
|
[self dismissViewControllerAnimated:YES completion:^{
|
||||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:linkURL]];
|
[[AppDelegate sharedInstance] showGestureHelp:self];
|
||||||
|
}];
|
||||||
|
} else {
|
||||||
|
// links in about
|
||||||
|
NSString *linkURL = aboutItems[indexPath.row][@"link"];
|
||||||
|
if (linkURL != nil) {
|
||||||
|
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:linkURL]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,10 @@ API_AVAILABLE(ios(13.4))
|
|||||||
|
|
||||||
@property (weak, nonatomic) IBOutlet ScreenView *screenView;
|
@property (weak, nonatomic) IBOutlet ScreenView *screenView;
|
||||||
@property (nonatomic, getter=isKeyboardVisible) BOOL keyboardVisible;
|
@property (nonatomic, getter=isKeyboardVisible) BOOL keyboardVisible;
|
||||||
|
@property (weak, nonatomic) IBOutlet UIView *helpView;
|
||||||
|
|
||||||
|
- (IBAction)showGestureHelp:(id)sender;
|
||||||
|
- (IBAction)hideGestureHelp:(id)sender;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -69,6 +69,8 @@
|
|||||||
[self.view addGestureRecognizer:showSettingsGesture];
|
[self.view addGestureRecognizer:showSettingsGesture];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(emulatorDidShutDown:) name:[AppDelegate sharedEmulator].shutdownNotification object:nil];
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(emulatorDidShutDown:) name:[AppDelegate sharedEmulator].shutdownNotification object:nil];
|
||||||
|
|
||||||
|
[self scheduleHelpPresentationIfNeededAfterDelay:6.0];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)showSettings:(id)sender {
|
- (void)showSettings:(id)sender {
|
||||||
@ -80,6 +82,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||||
|
[self cancelHelpPresentation];
|
||||||
if ([sender isKindOfClass:[UIGestureRecognizer class]]) {
|
if ([sender isKindOfClass:[UIGestureRecognizer class]]) {
|
||||||
UISwipeGestureRecognizer *gestureRecognizer = (UISwipeGestureRecognizer*)sender;
|
UISwipeGestureRecognizer *gestureRecognizer = (UISwipeGestureRecognizer*)sender;
|
||||||
modalPanePresentationDirection = gestureRecognizer.direction;
|
modalPanePresentationDirection = gestureRecognizer.direction;
|
||||||
@ -240,6 +243,50 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - Gesture Help
|
||||||
|
|
||||||
|
- (void)showGestureHelp:(id)sender {
|
||||||
|
[self setGestureHelpHidden:NO];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)hideGestureHelp:(id)sender {
|
||||||
|
[self setGestureHelpHidden:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setGestureHelpHidden:(BOOL)hidden {
|
||||||
|
if (self.helpView.hidden == hidden) {
|
||||||
|
return;
|
||||||
|
} else if (!hidden) {
|
||||||
|
// prepare to show
|
||||||
|
self.helpView.alpha = 0.0;
|
||||||
|
self.helpView.hidden = NO;
|
||||||
|
}
|
||||||
|
[UIView animateWithDuration:0.2
|
||||||
|
animations:^{
|
||||||
|
self.helpView.alpha = hidden ? 0.0 : 1.0;
|
||||||
|
}
|
||||||
|
completion:^(BOOL finished) {
|
||||||
|
self.helpView.hidden = hidden;
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showGestureHelpIfNeeded:(id)sender {
|
||||||
|
// show help if no disks have been inserted
|
||||||
|
if (![AppDelegate sharedEmulator].anyDiskInserted) {
|
||||||
|
[self showGestureHelp:sender];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)scheduleHelpPresentationIfNeededAfterDelay:(NSTimeInterval)delay {
|
||||||
|
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"autoShowGestureHelp"]) {
|
||||||
|
[self performSelector:@selector(showGestureHelpIfNeeded:) withObject:self afterDelay:delay];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)cancelHelpPresentation {
|
||||||
|
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(showGestureHelpIfNeeded:) object:self];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Keyboard
|
#pragma mark - Keyboard
|
||||||
|
|
||||||
- (void)installKeyboardGestures {
|
- (void)installKeyboardGestures {
|
||||||
|