Skip to content

Commit

Permalink
minimized
Browse files Browse the repository at this point in the history
  • Loading branch information
tsainez committed Mar 29, 2019
1 parent 9de8ff4 commit 079ca56
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 268 deletions.
12 changes: 4 additions & 8 deletions Strokes.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
CB40DF6D22285F2C0030F776 /* style.css in Resources */ = {isa = PBXBuildFile; fileRef = CB40DF6C22285F2C0030F776 /* style.css */; };
CB50566D2214DDAF00EC4EF0 /* CanvasController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB50566C2214DDAF00EC4EF0 /* CanvasController.swift */; };
CB811D422242C2C6001F270B /* demo.js in Resources */ = {isa = PBXBuildFile; fileRef = CB811D412242C2C6001F270B /* demo.js */; };
CB9B22182125EC8C00BB61FF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB9B22172125EC8C00BB61FF /* AppDelegate.swift */; };
Expand All @@ -21,7 +20,6 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
CB40DF6C22285F2C0030F776 /* style.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = style.css; sourceTree = "<group>"; };
CB50566C2214DDAF00EC4EF0 /* CanvasController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CanvasController.swift; sourceTree = "<group>"; };
CB811D412242C2C6001F270B /* demo.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = demo.js; sourceTree = "<group>"; };
CB9B22142125EC8C00BB61FF /* Strokes.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Strokes.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -56,7 +54,6 @@
CBE2FA3F22209DE200C7E9C9 /* jquery.min.js */,
CB811D412242C2C6001F270B /* demo.js */,
CBBF2A05221C81F5008B6216 /* index.html */,
CB40DF6C22285F2C0030F776 /* style.css */,
);
path = web;
sourceTree = "<group>";
Expand Down Expand Up @@ -161,7 +158,6 @@
buildActionMask = 2147483647;
files = (
CBBF2A06221C81F5008B6216 /* index.html in Resources */,
CB40DF6D22285F2C0030F776 /* style.css in Resources */,
CB9B22222125EC8D00BB61FF /* LaunchScreen.storyboard in Resources */,
CB811D422242C2C6001F270B /* demo.js in Resources */,
CBE2FA4022209DE200C7E9C9 /* jquery.min.js in Resources */,
Expand Down Expand Up @@ -256,7 +252,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -310,7 +306,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand All @@ -327,7 +323,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = U3HDXSVPJM;
INFOPLIST_FILE = Strokes/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -348,7 +344,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = U3HDXSVPJM;
INFOPLIST_FILE = Strokes/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
16 changes: 3 additions & 13 deletions Strokes/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -18,7 +18,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<searchBar contentMode="redraw" searchBarStyle="prominent" placeholder="Search for a character" translatesAutoresizingMaskIntoConstraints="NO" id="rrN-wW-vTg">
<searchBar contentMode="redraw" searchBarStyle="minimal" placeholder="Search for a character" translatesAutoresizingMaskIntoConstraints="NO" id="rrN-wW-vTg">
<rect key="frame" x="0.0" y="20" width="375" height="56"/>
<textInputTraits key="textInputTraits"/>
</searchBar>
Expand All @@ -32,25 +32,15 @@
<barButtonItem style="plain" systemItem="flexibleSpace" id="KFW-l3-PjN"/>
</items>
</toolbar>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1wr-xA-bMo">
<rect key="frame" x="0.0" y="76" width="375" height="547"/>
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="rrN-wW-vTg" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="LvE-q6-CN1"/>
<constraint firstItem="1wr-xA-bMo" firstAttribute="top" secondItem="rrN-wW-vTg" secondAttribute="bottom" id="OWk-ur-tbN"/>
<constraint firstItem="1wr-xA-bMo" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="RDF-Oo-XJV"/>
<constraint firstItem="1wr-xA-bMo" firstAttribute="trailing" secondItem="6Tk-OE-BBY" secondAttribute="trailing" id="SRB-Ut-9Id"/>
<constraint firstItem="wvf-Pt-JDV" firstAttribute="bottom" secondItem="6Tk-OE-BBY" secondAttribute="bottom" id="ZsC-mF-ZdI"/>
<constraint firstItem="1wr-xA-bMo" firstAttribute="top" secondItem="rrN-wW-vTg" secondAttribute="bottom" id="d3M-Wx-41u"/>
<constraint firstItem="rrN-wW-vTg" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" id="dm1-im-FuO"/>
<constraint firstItem="wvf-Pt-JDV" firstAttribute="trailing" secondItem="6Tk-OE-BBY" secondAttribute="trailing" id="esZ-y1-yni"/>
<constraint firstItem="wvf-Pt-JDV" firstAttribute="top" secondItem="1wr-xA-bMo" secondAttribute="bottom" id="h53-PQ-aBO"/>
<constraint firstItem="wvf-Pt-JDV" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="iti-8C-PM3"/>
<constraint firstItem="rrN-wW-vTg" firstAttribute="trailing" secondItem="6Tk-OE-BBY" secondAttribute="trailing" id="lYM-Ac-O5d"/>
<constraint firstItem="wvf-Pt-JDV" firstAttribute="top" secondItem="1wr-xA-bMo" secondAttribute="bottom" id="rWJ-zP-xl9"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
Expand Down
38 changes: 17 additions & 21 deletions Strokes/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="JLw-Av-oP2">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="JLw-Av-oP2">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Canvas-->
<!--Canvas Controller-->
<scene sceneID="cHT-Ac-qGh">
<objects>
<viewController id="JLw-Av-oP2" customClass="CanvasController" customModule="Strokes" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="KdU-nJ-bHQ">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Kc-IX-9Eq">
<rect key="frame" x="0.0" y="100" width="375" height="629"/>
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<wkWebViewConfiguration key="configuration">
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
<wkPreferences key="preferences"/>
</wkWebViewConfiguration>
</wkWebView>
<searchBar contentMode="redraw" searchBarStyle="minimal" placeholder="Search for a character" translatesAutoresizingMaskIntoConstraints="NO" id="bh0-4r-M4W">
<rect key="frame" x="0.0" y="44" width="375" height="56"/>
<textInputTraits key="textInputTraits" returnKeyType="search"/>
Expand Down Expand Up @@ -55,25 +47,32 @@
<barButtonItem style="plain" systemItem="flexibleSpace" id="dyF-K8-XzW"/>
</items>
</toolbar>
<wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Kc-IX-9Eq">
<rect key="frame" x="37.666666666666657" y="261" width="300" height="300"/>
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="300" id="05a-Si-krY"/>
<constraint firstAttribute="height" constant="300" id="QnE-IV-SY2"/>
</constraints>
<wkWebViewConfiguration key="configuration">
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
<wkPreferences key="preferences"/>
</wkWebViewConfiguration>
</wkWebView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="8Kc-IX-9Eq" firstAttribute="centerY" secondItem="EzX-QS-MrA" secondAttribute="centerY" id="5Y4-LV-uLm"/>
<constraint firstItem="oA3-en-7OY" firstAttribute="trailing" secondItem="EzX-QS-MrA" secondAttribute="trailing" id="6Fn-CE-qxD"/>
<constraint firstItem="bh0-4r-M4W" firstAttribute="trailing" secondItem="EzX-QS-MrA" secondAttribute="trailing" id="CRr-eI-mMo"/>
<constraint firstItem="oA3-en-7OY" firstAttribute="bottom" secondItem="EzX-QS-MrA" secondAttribute="bottom" id="O4f-iN-uc5"/>
<constraint firstItem="8Kc-IX-9Eq" firstAttribute="leading" secondItem="EzX-QS-MrA" secondAttribute="leading" id="OhN-eE-agy"/>
<constraint firstItem="oA3-en-7OY" firstAttribute="top" secondItem="8Kc-IX-9Eq" secondAttribute="bottom" id="XF5-wX-2Ol"/>
<constraint firstItem="8Kc-IX-9Eq" firstAttribute="top" secondItem="bh0-4r-M4W" secondAttribute="bottom" id="Ygt-Fm-8io"/>
<constraint firstItem="oA3-en-7OY" firstAttribute="leading" secondItem="EzX-QS-MrA" secondAttribute="leading" id="jEQ-ft-ybm"/>
<constraint firstItem="bh0-4r-M4W" firstAttribute="top" secondItem="EzX-QS-MrA" secondAttribute="top" id="jwX-jX-fRL"/>
<constraint firstItem="8Kc-IX-9Eq" firstAttribute="top" secondItem="bh0-4r-M4W" secondAttribute="bottom" id="nJo-kM-fbi"/>
<constraint firstItem="8Kc-IX-9Eq" firstAttribute="centerX" secondItem="EzX-QS-MrA" secondAttribute="centerX" id="s0U-37-7Hx"/>
<constraint firstItem="bh0-4r-M4W" firstAttribute="leading" secondItem="EzX-QS-MrA" secondAttribute="leading" id="t0a-7i-F70"/>
<constraint firstItem="oA3-en-7OY" firstAttribute="top" secondItem="8Kc-IX-9Eq" secondAttribute="bottom" id="wdn-lI-WYC"/>
<constraint firstItem="8Kc-IX-9Eq" firstAttribute="trailing" secondItem="EzX-QS-MrA" secondAttribute="trailing" id="x4m-Tr-fTT"/>
</constraints>
<viewLayoutGuide key="safeArea" id="EzX-QS-MrA"/>
</view>
<tabBarItem key="tabBarItem" title="Canvas" image="pencil" id="kqO-ai-DzY"/>
<connections>
<outlet property="searchBar" destination="bh0-4r-M4W" id="CW4-km-XI8"/>
<outlet property="webView" destination="8Kc-IX-9Eq" id="znu-qT-pph"/>
Expand All @@ -84,7 +83,4 @@
<point key="canvasLocation" x="-1746.4000000000001" y="-392.36453201970443"/>
</scene>
</scenes>
<resources>
<image name="pencil" width="30" height="30"/>
</resources>
</document>
16 changes: 7 additions & 9 deletions Strokes/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>LSApplicationCategoryType</key>
<string></string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand All @@ -27,8 +20,15 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand All @@ -42,8 +42,6 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
Expand Down
43 changes: 0 additions & 43 deletions Strokes/web/demo.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,17 @@
//var animationWriter;
var quizWriter;
var character = '水';
var isCharVisible;
var isOutlineVisible;

function changeCharacter(newCharacter) {
/*
quizWriter = HanziWriter.create('quiz-target', newCharacter, {
width: 300,
height: 300,
showOutline: true,
showCharacter: false,
showHintAfterMisses: 1
});
*/

quizWriter.setCharacter(newCharacter);
quizWriter.quiz();
window.quizWriter = quizWriter;
}

function updateCharacter() {
//$('#animation-target').html('');
//$('#quiz-target').html('');

/*
animationWriter = HanziWriter.create('animation-target', character, {
width: 300,
height: 300,
showOutline: shouldShowOutline('animation'),
showCharacter: false
});
*/

quizWriter = HanziWriter.create('quiz-target', character, {
width: 300,
height: 300,
showOutline: true,
//showOutline: shouldShowOutline('quiz'),
showCharacter: true,
showHintAfterMisses: 1
});
Expand All @@ -47,23 +21,6 @@ function updateCharacter() {
window.quizWriter = quizWriter;
}

function shouldShowOutline(demoType) {
return $('#' + demoType + '-show-outline').prop('checked');
}

$(function() {
updateCharacter();

$('.js-char-form').on('submit', function(evt) {
evt.preventDefault();
updateCharacter();
});


/*
$('#quiz-show-outline').on('click', function() {
var method = shouldShowOutline('quiz') ? 'showOutline' : 'hideOutline';
quizWriter[method]();
});
*/
});
Loading

0 comments on commit 079ca56

Please sign in to comment.