Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code reorganization #3

Merged
merged 9 commits into from
Feb 3, 2019
2 changes: 1 addition & 1 deletion Demo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work in XCode 9.4 - see 34f7beb

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it was changed to swift 4.2 and Xcode 10.1

Copy link
Member

@FZambia FZambia Feb 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does current code in master branch not working in 10.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, its doesn't work with new Xcode

// Override point for customization after application launch.
return true
}
Expand Down
107 changes: 104 additions & 3 deletions Demo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,24 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<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="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Demo" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Status:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p1N-9u-SWl">
<rect key="frame" x="16" y="53" width="80" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="80" id="DiD-7r-214"/>
<constraint firstAttribute="height" constant="21" id="S1Z-Ob-WBa"/>
</constraints>
<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="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dJq-5C-omx">
<rect key="frame" x="106" y="53" width="253" height="20.5"/>
<constraints>
<constraint firstAttribute="height" constant="20.5" id="edd-Ao-q1A"/>
</constraints>
<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="Message:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JvX-JC-e7I">
<rect key="frame" x="16" y="82" width="80" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="i5Z-9d-Gbr"/>
<constraint firstAttribute="width" constant="80" id="r7P-NM-C3F"/>
</constraints>
<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="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NnK-BI-God">
<rect key="frame" x="106" y="82" width="253" height="20.5"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20.5" id="7B6-bB-jlQ"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="New message" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="axm-wb-jAf">
<rect key="frame" x="16" y="139.5" width="287" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="Y95-WT-nd8"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ptu-cf-yEG">
<rect key="frame" x="313" y="139" width="46" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="6Oi-Oo-Ans"/>
<constraint firstAttribute="width" constant="46" id="IOX-U8-Swa"/>
</constraints>
<state key="normal" title="Send"/>
<connections>
<action selector="send:" destination="BYZ-38-t0r" eventType="touchUpInside" id="5eR-zY-KM1"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UO0-oE-0Vr">
<rect key="frame" x="16" y="185" width="343" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="K8V-Gm-of5"/>
</constraints>
<state key="normal" title="Connect"/>
<connections>
<action selector="connect:" destination="BYZ-38-t0r" eventType="touchUpInside" id="fRS-J8-hLD"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="axm-wb-jAf" firstAttribute="top" secondItem="NnK-BI-God" secondAttribute="bottom" constant="37" id="2dX-oO-eM0"/>
<constraint firstItem="p1N-9u-SWl" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="16" id="OjZ-GY-ZuL"/>
<constraint firstItem="JvX-JC-e7I" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="16" id="QZb-Uj-sS8"/>
<constraint firstItem="Ptu-cf-yEG" firstAttribute="top" secondItem="NnK-BI-God" secondAttribute="bottom" constant="36.5" id="UCk-ou-RzM"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="Ptu-cf-yEG" secondAttribute="trailing" constant="16" id="Xfd-8J-o98"/>
<constraint firstItem="JvX-JC-e7I" firstAttribute="top" secondItem="p1N-9u-SWl" secondAttribute="bottom" constant="8" id="aTG-M0-gff"/>
<constraint firstItem="p1N-9u-SWl" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="33" id="cf7-J6-8Mi"/>
<constraint firstItem="dJq-5C-omx" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="33" id="cy6-LL-19c"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="dJq-5C-omx" secondAttribute="trailing" constant="16" id="h3Z-oX-NkC"/>
<constraint firstItem="UO0-oE-0Vr" firstAttribute="top" secondItem="axm-wb-jAf" secondAttribute="bottom" constant="15.5" id="hWg-T0-dH2"/>
<constraint firstItem="dJq-5C-omx" firstAttribute="leading" secondItem="p1N-9u-SWl" secondAttribute="trailing" constant="10" id="lta-bv-1Jd"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="NnK-BI-God" secondAttribute="trailing" constant="16" id="pNu-Bu-Ugj"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="UO0-oE-0Vr" secondAttribute="trailing" constant="16" id="siN-HI-CMO"/>
<constraint firstItem="Ptu-cf-yEG" firstAttribute="leading" secondItem="axm-wb-jAf" secondAttribute="trailing" constant="10" id="uxj-0d-0lU"/>
<constraint firstItem="NnK-BI-God" firstAttribute="leading" secondItem="JvX-JC-e7I" secondAttribute="trailing" constant="10" id="y0n-WI-cr6"/>
<constraint firstItem="NnK-BI-God" firstAttribute="top" secondItem="dJq-5C-omx" secondAttribute="bottom" constant="8.5" id="z14-cT-gTg"/>
<constraint firstItem="axm-wb-jAf" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="16" id="zag-fQ-2Qu"/>
<constraint firstItem="UO0-oE-0Vr" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="16" id="zwT-cN-kvU"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<connections>
<outlet property="connectButton" destination="UO0-oE-0Vr" id="mJS-2T-8Av"/>
<outlet property="connectionStatus" destination="dJq-5C-omx" id="7qf-Tc-lHr"/>
<outlet property="lastMessage" destination="NnK-BI-God" id="fc8-en-aGv"/>
<outlet property="newMessage" destination="axm-wb-jAf" id="lrM-qo-zPW"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="136.80000000000001" y="122.78860569715144"/>
</scene>
</scenes>
</document>
Loading