Skip to content

Commit

Permalink
优化了demo的ui界面在ios10和xcode8下的兼容性问题。
Browse files Browse the repository at this point in the history
JackJiang2011 committed Mar 6, 2017
1 parent aad862e commit 0bb27f9
Showing 5 changed files with 198 additions and 141 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_0" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -13,48 +17,60 @@
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="srart_bg.jpg" translatesAutoresizingMaskIntoConstraints="NO" id="5v1-wk-Bre">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<animations/>
</imageView>
<view contentMode="scaleToFill" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="69b-q1-tWX" userLabel="header">
<rect key="frame" x="0.0" y="69" width="321" height="194"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="69b-q1-tWX" userLabel="header">
<rect key="frame" x="0.0" y="69" width="320" height="194"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" image="logo_img.png" translatesAutoresizingMaskIntoConstraints="NO" id="rur-Kp-hPb">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo_img.png" translatesAutoresizingMaskIntoConstraints="NO" id="rur-Kp-hPb">
<rect key="frame" x="59" y="20" width="203" height="165"/>
<animations/>
<constraints>
<constraint firstAttribute="height" constant="165" id="lzq-0w-unE"/>
<constraint firstAttribute="width" constant="203" id="qNo-c0-3EN"/>
</constraints>
</imageView>
</subviews>
<animations/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="rur-Kp-hPb" firstAttribute="centerX" secondItem="69b-q1-tWX" secondAttribute="centerX" id="xIg-dX-9FH"/>
<constraint firstAttribute="height" constant="194" id="66w-gv-ITM"/>
<constraint firstItem="rur-Kp-hPb" firstAttribute="top" secondItem="69b-q1-tWX" secondAttribute="top" constant="20" id="DRI-aN-Tan"/>
<constraint firstItem="rur-Kp-hPb" firstAttribute="centerX" secondItem="69b-q1-tWX" secondAttribute="centerX" id="ghH-j3-kLH"/>
</constraints>
</view>
<view contentMode="scaleToFill" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="P3Z-qU-eK0" userLabel="copyright">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P3Z-qU-eK0" userLabel="copyright">
<rect key="frame" x="0.0" y="515" width="320" height="34"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="copyright_img.png" translatesAutoresizingMaskIntoConstraints="NO" id="3vY-9T-Mkr">
<rect key="frame" x="60" y="0.0" width="194" height="34"/>
<animations/>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="copyright_img.png" translatesAutoresizingMaskIntoConstraints="NO" id="3vY-9T-Mkr">
<rect key="frame" x="63" y="0.0" width="194" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="WNp-kn-JKa"/>
<constraint firstAttribute="width" constant="194" id="Y6D-GD-HLM"/>
</constraints>
</imageView>
</subviews>
<animations/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="3vY-9T-Mkr" firstAttribute="centerX" secondItem="P3Z-qU-eK0" secondAttribute="centerX" id="ILE-rx-X1d"/>
<constraint firstItem="3vY-9T-Mkr" firstAttribute="top" secondItem="P3Z-qU-eK0" secondAttribute="top" id="d8c-Q5-do4"/>
<constraint firstAttribute="height" constant="34" id="dLG-G9-2VF"/>
</constraints>
</view>
</subviews>
<animations/>
<color key="backgroundColor" white="0.1685763888888889" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.16857638955116272" green="0.16857638955116272" blue="0.16857638955116272" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="5v1-wk-Bre" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="GKZ-Kp-nnd"/>
<constraint firstItem="P3Z-qU-eK0" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="PuB-W6-91t"/>
<constraint firstAttribute="bottom" secondItem="P3Z-qU-eK0" secondAttribute="bottom" constant="19" id="QnF-aa-Dfo"/>
<constraint firstAttribute="bottom" secondItem="P3Z-qU-eK0" secondAttribute="bottom" constant="19" id="Sel-xs-x0E"/>
<constraint firstItem="5v1-wk-Bre" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="d6G-9h-mgh"/>
<constraint firstAttribute="bottom" secondItem="5v1-wk-Bre" secondAttribute="bottom" id="htn-R8-Kjh"/>
<constraint firstItem="69b-q1-tWX" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="lpi-Ex-CDV"/>
<constraint firstAttribute="trailing" secondItem="5v1-wk-Bre" secondAttribute="trailing" id="pWg-fA-6oC"/>
<constraint firstItem="69b-q1-tWX" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="69" id="5La-9R-l3u"/>
<constraint firstItem="P3Z-qU-eK0" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="7jz-uq-9I6"/>
<constraint firstItem="69b-q1-tWX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Axy-AX-9bI"/>
<constraint firstAttribute="bottom" secondItem="P3Z-qU-eK0" secondAttribute="bottom" constant="19" id="CWH-tJ-aui"/>
<constraint firstItem="5v1-wk-Bre" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="E9G-zZ-QIA"/>
<constraint firstItem="69b-q1-tWX" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="RKu-Pc-Me4"/>
<constraint firstAttribute="bottom" secondItem="5v1-wk-Bre" secondAttribute="bottom" id="W6a-ad-34H"/>
<constraint firstAttribute="trailing" secondItem="P3Z-qU-eK0" secondAttribute="trailing" id="WYB-kR-07N"/>
<constraint firstItem="P3Z-qU-eK0" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="eBA-zQ-bja"/>
<constraint firstAttribute="trailing" secondItem="69b-q1-tWX" secondAttribute="trailing" id="hCj-Vz-y9B"/>
<constraint firstAttribute="trailing" secondItem="5v1-wk-Bre" secondAttribute="trailing" id="kPE-qc-BMo"/>
<constraint firstItem="5v1-wk-Bre" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="ywG-EJ-3o9"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
<point key="canvasLocation" x="22" y="222"/>
</view>
</objects>
4 changes: 2 additions & 2 deletions src_all/demos/MobileIMSDK4iDemo/MobileIMSDK4iDemo/Info.plist
Original file line number Diff line number Diff line change
@@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.1.2</string>
<string>2.1.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>b151112.1</string>
<string>b151211.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina4_0" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LoginViewController">
@@ -17,16 +21,16 @@
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT" customClass="UIControl">
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DsX-DK-Qk7" userLabel="[layout] login UI">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DsX-DK-Qk7" userLabel="[layout] login UI">
<rect key="frame" x="20" y="0.0" width="280" height="157"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="rbcore.openmob.net" borderStyle="roundedRect" placeholder="Domain or ip address #" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="WTR-Ew-UbY" userLabel="编辑框-ip">
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="rbcore.52im.net" borderStyle="roundedRect" placeholder="Domain or ip address #" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="WTR-Ew-UbY" userLabel="编辑框-ip">
<rect key="frame" x="0.0" y="20" width="196" height="30"/>
<animations/>
<color key="textColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="textColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" returnKeyType="done"/>
<connections>
@@ -35,15 +39,15 @@
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9zM-5I-GHe" userLabel="port-separator">
<rect key="frame" x="202" y="24" width="15" height="21"/>
<animations/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="STHeitiSC-Medium" family="Heiti SC" pointSize="13"/>
<color key="textColor" red="0.40000000600000002" green="0.40000000600000002" blue="0.40000000600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.40000000600000002" green="0.40000000600000002" blue="0.40000000600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="7901" borderStyle="roundedRect" placeholder="Port #" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="xp2-z5-q3N" userLabel="文本框-port #">
<rect key="frame" x="214" y="20" width="66" height="30"/>
<animations/>
<color key="textColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="textColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="done"/>
<connections>
@@ -52,7 +56,7 @@
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="登陆用户名" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="xNV-q3-QSA" userLabel="文本框-登陆用户名">
<rect key="frame" x="0.0" y="58" width="136" height="30"/>
<animations/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" returnKeyType="done"/>
<connections>
@@ -61,7 +65,7 @@
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="登陆密码" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="EIl-0P-bp1" userLabel="文本框-登陆密码">
<rect key="frame" x="144" y="58" width="136" height="30"/>
<animations/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" returnKeyType="done" secureTextEntry="YES"/>
<connections>
@@ -70,55 +74,61 @@
</textField>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="dashed_line.png" translatesAutoresizingMaskIntoConstraints="NO" id="Kau-rb-ocb" userLabel="分隔线">
<rect key="frame" x="0.0" y="102" width="280" height="1"/>
<animations/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="-" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Glk-Zq-zDL">
<rect key="frame" x="0.0" y="119.5" width="136" height="21.5"/>
<animations/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<color key="shadowColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="shadowColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<size key="shadowOffset" width="0.0" height="1"/>
</label>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F2i-VI-sbK" userLabel="按钮-登陆">
<rect key="frame" x="144" y="113" width="136" height="36"/>
<animations/>
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<size key="titleShadowOffset" width="0.5" height="0.5"/>
<state key="normal" title="登陆">
<color key="titleColor" red="0.96862745100000003" green="0.97254901959999995" blue="0.96862745100000003" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.16857638890000001" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.96862745100000003" green="0.97254901959999995" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.16857638955116272" green="0.16857638955116272" blue="0.16857638955116272" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="signIn:" destination="-1" eventType="touchUpInside" id="yfu-ha-bEW"/>
</connections>
</button>
</subviews>
<animations/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="280" id="0b5-Dv-arL"/>
<constraint firstAttribute="height" constant="157" id="efL-YB-07J"/>
</constraints>
</view>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" alpha="0.69999999999999996" contentMode="center" image="copyright_img.png" translatesAutoresizingMaskIntoConstraints="NO" id="g6y-O3-PAI">
<rect key="frame" x="63" y="431" width="194" height="34"/>
<animations/>
<rect key="frame" x="63" y="519" width="194" height="34"/>
</imageView>
</subviews>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="DsX-DK-Qk7" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="7fu-dZ-bb8"/>
<constraint firstAttribute="bottom" secondItem="g6y-O3-PAI" secondAttribute="bottom" constant="15" id="Fh1-NZ-Xbf"/>
<constraint firstItem="DsX-DK-Qk7" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="H7R-lV-kHG"/>
<constraint firstItem="g6y-O3-PAI" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="qPD-jU-r3Z"/>
<constraint firstItem="DsX-DK-Qk7" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="qpM-rH-nma"/>
</constraints>
<simulatedScreenMetrics key="simulatedDestinationMetrics"/>
<connections>
<action selector="E_clickBgToHideKeyboard:" destination="-1" eventType="touchDown" id="MO4-Z4-HbO"/>
</connections>
<point key="canvasLocation" x="402" y="159"/>
<point key="canvasLocation" x="204" y="-35"/>
</view>
</objects>
<resources>
<image name="copyright_img.png" width="194" height="34"/>
<image name="dashed_line.png" width="568" height="1"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4_0.fullscreen"/>
</simulatedMetricsContainer>
</document>
195 changes: 113 additions & 82 deletions src_all/demos/MobileIMSDK4iDemo/MobileIMSDK4iDemo/MainViewController.xib

Large diffs are not rendered by default.

0 comments on commit 0bb27f9

Please sign in to comment.