- Added Button For Scrolling To Bottom #133
This commit is contained in:
parent
010bc23709
commit
507051e977
|
@ -28,10 +28,6 @@
|
|||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
|
|
21
Snikket/Assets.xcassets/chevron.down.imageset/Contents.json
vendored
Normal file
21
Snikket/Assets.xcassets/chevron.down.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "chevron.down@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
Snikket/Assets.xcassets/chevron.down.imageset/chevron.down@2x.png
vendored
Normal file
BIN
Snikket/Assets.xcassets/chevron.down.imageset/chevron.down@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 569 B |
|
@ -28,10 +28,6 @@
|
|||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<objects>
|
||||
<viewController title="Room Controller" id="uV2-vL-T54" customClass="MucChatViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Sim-Jc-r23">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="808"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sgc-HQ-Zz2">
|
||||
|
@ -24,13 +24,28 @@
|
|||
<segue destination="leg-mN-YAd" kind="embed" id="FoG-5E-8zb"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qmg-sW-dkA" customClass="RoundShadowButton" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="344" y="625" width="40" height="40"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="Twb-GC-ecD"/>
|
||||
<constraint firstAttribute="width" constant="40" id="mMy-vZ-u3i"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Button"/>
|
||||
<buttonConfiguration key="configuration" style="plain" image="chevron.down"/>
|
||||
<connections>
|
||||
<action selector="scrollToBottomTapped:" destination="uV2-vL-T54" eventType="touchUpInside" id="VCo-Rf-hGo"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="7WM-tQ-tL0"/>
|
||||
<constraints>
|
||||
<constraint firstItem="7WM-tQ-tL0" firstAttribute="trailing" secondItem="sgc-HQ-Zz2" secondAttribute="trailing" id="5zj-hd-0Be"/>
|
||||
<constraint firstItem="7WM-tQ-tL0" firstAttribute="bottom" secondItem="Qmg-sW-dkA" secondAttribute="bottom" constant="60" id="9tY-EV-jKc"/>
|
||||
<constraint firstItem="7WM-tQ-tL0" firstAttribute="bottom" secondItem="sgc-HQ-Zz2" secondAttribute="bottom" id="9vQ-SR-CUT"/>
|
||||
<constraint firstItem="sgc-HQ-Zz2" firstAttribute="top" secondItem="7WM-tQ-tL0" secondAttribute="top" id="KqV-2L-2ED"/>
|
||||
<constraint firstItem="sgc-HQ-Zz2" firstAttribute="leading" secondItem="7WM-tQ-tL0" secondAttribute="leading" id="VxO-NM-7eE"/>
|
||||
<constraint firstItem="7WM-tQ-tL0" firstAttribute="trailing" secondItem="Qmg-sW-dkA" secondAttribute="trailing" constant="30" id="dJY-ZD-mfK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="jz1-lz-vTl">
|
||||
|
@ -85,6 +100,7 @@
|
|||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||
<connections>
|
||||
<outlet property="containerView" destination="sgc-HQ-Zz2" id="4MZ-gD-QS6"/>
|
||||
<outlet property="scrollToBottomButton" destination="Qmg-sW-dkA" id="EfE-yv-5ew"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="GhF-oL-IbC" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
|
@ -101,12 +117,12 @@
|
|||
<objects>
|
||||
<tableViewController id="EpF-TK-mfh" customClass="MucChatOccupantsTableViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="xPb-sa-myB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="808"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="MucChatOccupantsTableViewCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="MucChatOccupantsTableViewCell" id="7wm-Ue-Wm8" customClass="MucChatOccupantsTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="24.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="44.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="7wm-Ue-Wm8" id="JkW-NK-c1c">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -245,15 +261,15 @@
|
|||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Subject" id="iYv-zL-tZT">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" textLabel="NK6-IG-GRa" style="IBUITableViewCellStyleDefault" id="MEa-vy-ELC">
|
||||
<rect key="frame" x="0.0" y="128" width="414" height="44"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" textLabel="NK6-IG-GRa" style="IBUITableViewCellStyleDefault" id="MEa-vy-ELC">
|
||||
<rect key="frame" x="0.0" y="128" width="414" height="82"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="MEa-vy-ELC" id="64p-68-kX3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="82"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="When the value of this property is false, the queue actively starts operations that are in the queue and ready to execute." textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NK6-IG-GRa">
|
||||
<rect key="frame" x="20" y="0.0" width="374" height="44"/>
|
||||
<rect key="frame" x="20" y="0.0" width="374" height="82"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
|
@ -268,7 +284,7 @@
|
|||
<string key="footerTitle">Push notification support depends on the XMPP server which you are using and may not work in some cases even if it's supported and enabled on the group chat</string>
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="02f-aw-3Zd" detailTextLabel="exK-ZH-jpA" style="IBUITableViewCellStyleValue1" id="KlQ-4F-rae">
|
||||
<rect key="frame" x="0.0" y="229.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="267.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KlQ-4F-rae" id="ufE-bo-qG2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="384.5" height="44"/>
|
||||
|
@ -292,7 +308,7 @@
|
|||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="DQk-sn-hKj" detailTextLabel="YT2-1I-RlM" style="IBUITableViewCellStyleValue1" id="xQZ-ou-qXC">
|
||||
<rect key="frame" x="0.0" y="273.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="311.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="xQZ-ou-qXC" id="LHJ-hk-TEJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="384.5" height="44"/>
|
||||
|
@ -316,7 +332,7 @@
|
|||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="4wI-c9-pBG" customClass="SwitchTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="317.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="355.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="4wI-c9-pBG" id="R5e-gd-jsF">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -349,7 +365,7 @@
|
|||
<tableViewSection headerTitle=" " id="2ZD-5S-4hK">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="wBw-1J-Xau" style="IBUITableViewCellStyleDefault" id="3IN-v0-ayC">
|
||||
<rect key="frame" x="0.0" y="448" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="486" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="3IN-v0-ayC" id="iXe-AG-FnD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="384.5" height="44"/>
|
||||
|
@ -373,7 +389,7 @@
|
|||
<tableViewSection headerTitle=" History" id="552-vb-Heg">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="wNk-Ce-zfI" style="IBUITableViewCellStyleDefault" id="kUN-Hr-2a1">
|
||||
<rect key="frame" x="0.0" y="542" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="580" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="kUN-Hr-2a1" id="oeh-ap-pGo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -430,7 +446,7 @@
|
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="RosterItemTableViewCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="RosterItemTableViewCell" rowHeight="48" id="mXn-Pc-kMI" customClass="RosterItemTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="24.5" width="414" height="48"/>
|
||||
<rect key="frame" x="0.0" y="44.5" width="414" height="48"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="mXn-Pc-kMI" id="bfL-M0-loC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="48"/>
|
||||
|
@ -533,6 +549,7 @@
|
|||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="chevron.down" width="16" height="9.5"/>
|
||||
<image name="defaultGroupchatAvatarDark" width="100" height="100"/>
|
||||
<image name="first" width="30" height="30"/>
|
||||
<image name="participants" width="25" height="25"/>
|
||||
|
|
|
@ -227,15 +227,32 @@
|
|||
<constraint firstAttribute="trailing" secondItem="fa9-4g-iNW" secondAttribute="trailing" constant="10" id="wUE-ll-MrO"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="k9G-H8-3Hb" customClass="RoundShadowButton" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="358" y="655" width="40" height="40"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="O5s-Tu-hic"/>
|
||||
<constraint firstAttribute="width" constant="40" id="a6B-NY-a5u"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Button"/>
|
||||
<buttonConfiguration key="configuration" style="plain" image="chevron.down" imagePadding="0.0">
|
||||
<directionalEdgeInsets key="contentInsets" top="20" leading="20" bottom="20" trailing="20"/>
|
||||
</buttonConfiguration>
|
||||
<connections>
|
||||
<action selector="scrollToBottomTapped:" destination="WP2-Cp-7ZE" eventType="touchUpInside" id="6kU-Zt-yfo"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="K7X-9F-pbS"/>
|
||||
<constraints>
|
||||
<constraint firstItem="K7X-9F-pbS" firstAttribute="bottom" secondItem="k9G-H8-3Hb" secondAttribute="bottom" constant="60" id="Lcy-t7-4dL"/>
|
||||
<constraint firstItem="0oA-5d-4WD" firstAttribute="leading" secondItem="K7X-9F-pbS" secondAttribute="leading" constant="20" id="Se8-QK-Ism"/>
|
||||
<constraint firstItem="K7X-9F-pbS" firstAttribute="bottom" secondItem="gYg-Wz-iZc" secondAttribute="bottom" id="UEL-s9-1Hy"/>
|
||||
<constraint firstItem="gYg-Wz-iZc" firstAttribute="leading" secondItem="K7X-9F-pbS" secondAttribute="leading" id="Vw6-gf-z0R"/>
|
||||
<constraint firstItem="0oA-5d-4WD" firstAttribute="top" secondItem="K7X-9F-pbS" secondAttribute="top" constant="10" id="hb2-it-kVe"/>
|
||||
<constraint firstItem="gYg-Wz-iZc" firstAttribute="top" secondItem="K7X-9F-pbS" secondAttribute="top" id="lTO-xK-Ffx"/>
|
||||
<constraint firstItem="K7X-9F-pbS" firstAttribute="trailing" secondItem="gYg-Wz-iZc" secondAttribute="trailing" id="mKL-x9-gDq"/>
|
||||
<constraint firstItem="K7X-9F-pbS" firstAttribute="trailing" secondItem="k9G-H8-3Hb" secondAttribute="trailing" constant="30" id="phr-KD-Mqa"/>
|
||||
<constraint firstItem="K7X-9F-pbS" firstAttribute="trailing" secondItem="0oA-5d-4WD" secondAttribute="trailing" constant="20" id="zna-7O-fWc"/>
|
||||
</constraints>
|
||||
</view>
|
||||
|
@ -281,6 +298,7 @@
|
|||
<connections>
|
||||
<outlet property="addContactView" destination="0oA-5d-4WD" id="0Oe-0Z-Fxi"/>
|
||||
<outlet property="containerView" destination="gYg-Wz-iZc" id="bHR-j9-Idy"/>
|
||||
<outlet property="scrollToBottomButton" destination="k9G-H8-3Hb" id="LvQ-cd-UTP"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="qn2-Sh-FRP" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
|
@ -1454,6 +1472,7 @@
|
|||
<resources>
|
||||
<image name="appLogo" width="1024" height="1024"/>
|
||||
<image name="checkmark.circle" width="13.333333015441895" height="13.333333015441895"/>
|
||||
<image name="chevron.down" width="16" height="9.5"/>
|
||||
<image name="defaultAvatar" width="100" height="100"/>
|
||||
<image name="first" width="30" height="30"/>
|
||||
<image name="gear" catalog="system" width="128" height="119"/>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<color key="separatorColor" name="conversationBackground"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="ChatTableViewSystemCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewSystemCell" rowHeight="33" id="9wb-BJ-QeF" customClass="ChatTableViewSystemCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="24.5" width="414" height="33"/>
|
||||
<rect key="frame" x="0.0" y="44.5" width="414" height="33"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="9wb-BJ-QeF" id="14Y-vA-IHJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="33"/>
|
||||
|
@ -46,7 +46,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="ChatTableViewMeCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewMeCell" rowHeight="33" id="GBK-nY-egT" customClass="ChatTableViewMeCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="57.5" width="414" height="33"/>
|
||||
<rect key="frame" x="0.0" y="77.5" width="414" height="33"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="GBK-nY-egT" id="kQM-yI-Mn0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="33"/>
|
||||
|
@ -73,7 +73,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="ChatTableViewCellContinuation" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewMessageContinuationCell" id="8Et-xM-dnP" customClass="ChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="90.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="110.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="8Et-xM-dnP" id="V41-Eh-z9O">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -136,7 +136,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="ChatTableViewCellContinuation2" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewMessageContinuationCell2" id="huG-Ws-60E" customClass="ChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="134.5" width="414" height="44"/>
|
||||
<rect key="frame" x="0.0" y="154.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="huG-Ws-60E" id="MkF-ub-5jO">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
|
@ -199,7 +199,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewLinkPreviewCell" rowHeight="71" id="RRh-Va-SRE" customClass="LinkPreviewChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="178.5" width="414" height="71"/>
|
||||
<rect key="frame" x="0.0" y="198.5" width="414" height="71"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="RRh-Va-SRE" id="b4O-zc-oXg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="71"/>
|
||||
|
@ -222,7 +222,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewAttachmentContinuationCell" rowHeight="71" id="RfX-hS-d2H" customClass="AttachmentChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="249.5" width="414" height="71"/>
|
||||
<rect key="frame" x="0.0" y="269.5" width="414" height="71"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="RfX-hS-d2H" id="dLL-EZ-lYx">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="71"/>
|
||||
|
@ -277,7 +277,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewAttachmentContinuationCell2" rowHeight="71" id="MUh-Ya-KMJ" customClass="AttachmentChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="320.5" width="414" height="71"/>
|
||||
<rect key="frame" x="0.0" y="340.5" width="414" height="71"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="MUh-Ya-KMJ" id="DIf-G5-2Wm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="71"/>
|
||||
|
@ -332,7 +332,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="ChatTableViewCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewMessageCell" rowHeight="60" id="Edg-Ze-o8C" customClass="ChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="391.5" width="414" height="60"/>
|
||||
<rect key="frame" x="0.0" y="411.5" width="414" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="Edg-Ze-o8C" id="017-Lx-5HC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="60"/>
|
||||
|
@ -436,7 +436,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="ChatTableViewCell2" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewMessageCell2" rowHeight="60" id="5md-uM-UrG" userLabel="ChatTableViewMessageCell2" customClass="ChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="451.5" width="414" height="60"/>
|
||||
<rect key="frame" x="0.0" y="471.5" width="414" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="5md-uM-UrG" id="Ti4-Ga-E6D">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="60"/>
|
||||
|
@ -536,7 +536,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewAttachmentCell" rowHeight="71" id="S8a-TQ-tLX" customClass="AttachmentChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="511.5" width="414" height="71"/>
|
||||
<rect key="frame" x="0.0" y="531.5" width="414" height="71"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="S8a-TQ-tLX" id="3eM-Pw-ok6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="71"/>
|
||||
|
@ -631,7 +631,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewAttachmentCell2" rowHeight="71" id="SxS-SO-af1" customClass="AttachmentChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="582.5" width="414" height="71"/>
|
||||
<rect key="frame" x="0.0" y="602.5" width="414" height="71"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="SxS-SO-af1" id="ngq-dH-Zkb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="71"/>
|
||||
|
@ -724,7 +724,7 @@
|
|||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ChatTableViewInvitationCell" rowHeight="78" id="kHO-eT-tka" customClass="InvitationChatTableViewCell" customModule="Snikket" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="653.5" width="414" height="78"/>
|
||||
<rect key="frame" x="0.0" y="673.5" width="414" height="78"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="kHO-eT-tka" id="ftW-8h-UsW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="78"/>
|
||||
|
|
|
@ -47,6 +47,7 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
|
|||
return self;
|
||||
}
|
||||
|
||||
@IBOutlet weak var scrollToBottomButton: RoundShadowButton!
|
||||
@IBOutlet weak var addContactView: UIView!
|
||||
|
||||
override func viewDidLoad() {
|
||||
|
@ -56,13 +57,7 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
|
|||
|
||||
super.viewDidLoad()
|
||||
|
||||
let recognizer = UITapGestureRecognizer(target: self, action: #selector(ChatViewController.showBuddyInfo));
|
||||
self.titleView.isUserInteractionEnabled = true;
|
||||
self.navigationController?.navigationBar.addGestureRecognizer(recognizer);
|
||||
addContactView.layer.cornerRadius = 10
|
||||
addContactView.isHidden = true
|
||||
|
||||
//initializeSharing();
|
||||
setupViews()
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(ChatViewController.avatarChanged), name: AvatarManager.AVATAR_CHANGED, object: nil);
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(accountStateChanged), name: XmppService.ACCOUNT_STATE_CHANGED, object: nil);
|
||||
|
@ -72,6 +67,26 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
|
|||
NotificationCenter.default.addObserver(self, selector: #selector(subscriptionRequest), name: Notification.Name("SUBSCRIPTION_REQUEST"), object: nil);
|
||||
}
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
guard let contentOffset = self.conversationLogController?.tableView.contentOffset else { return }
|
||||
if contentOffset.y > 400 {
|
||||
scrollToBottomButton.isHidden = false
|
||||
} else {
|
||||
scrollToBottomButton.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
func setupViews() {
|
||||
let recognizer = UITapGestureRecognizer(target: self, action: #selector(ChatViewController.showBuddyInfo));
|
||||
self.titleView.isUserInteractionEnabled = true;
|
||||
self.navigationController?.navigationBar.addGestureRecognizer(recognizer);
|
||||
|
||||
addContactView.layer.cornerRadius = 10
|
||||
addContactView.isHidden = true
|
||||
scrollToBottomButton.cornerRadius = 20
|
||||
scrollToBottomButton.isHidden = true
|
||||
}
|
||||
|
||||
@objc func subscriptionRequest() {
|
||||
if let contact = AppDelegate.subscriptionsRequest[account.stringValue], contact == self.jid.stringValue {
|
||||
self.addContactView.isHidden = false
|
||||
|
@ -81,6 +96,10 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
|
|||
}
|
||||
|
||||
|
||||
@IBAction func scrollToBottomTapped(_ sender: UIButton) {
|
||||
self.conversationLogController?.tableView.setContentOffset(.zero, animated: true)
|
||||
}
|
||||
|
||||
@IBAction func rejectSubscriptionTapped(_ sender: Any) {
|
||||
guard let client = XmppService.instance.getClient(for: account), let presenceModule: PresenceModule = client.modulesManager.getModule(PresenceModule.ID) else { return }
|
||||
presenceModule.unsubscribed(by: JID(jid, resource: nil))
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import UIKit
|
||||
|
||||
class ConversationLogController: UIViewController, ChatViewDataSourceDelegate {
|
||||
class ConversationLogController: UIViewController, ChatViewDataSourceDelegate, UIScrollViewDelegate {
|
||||
|
||||
private let firstRowIndexPath = IndexPath(row: 0, section: 0);
|
||||
|
||||
|
@ -45,6 +45,7 @@ class ConversationLogController: UIViewController, ChatViewDataSourceDelegate {
|
|||
tableView.rowHeight = UITableView.automaticDimension;
|
||||
tableView.estimatedRowHeight = 160.0;
|
||||
tableView.separatorStyle = .none;
|
||||
tableView.scrollsToTop = false
|
||||
tableView.transform = dataSource.inverted ? CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: 0) : CGAffineTransform.identity;
|
||||
|
||||
if let refreshControl = self.refreshControl {
|
||||
|
@ -54,6 +55,21 @@ class ConversationLogController: UIViewController, ChatViewDataSourceDelegate {
|
|||
conversationLogDelegate?.initialize(tableView: self.tableView);
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(showEditToolbar), name: NSNotification.Name("tableViewCellShowEditToolbar"), object: nil);
|
||||
|
||||
let scrollView = UIScrollView()
|
||||
scrollView.bounds = view.bounds
|
||||
scrollView.contentOffset.y = 1
|
||||
scrollView.contentSize.height = view.bounds.height + 1
|
||||
scrollView.delegate = self
|
||||
view.addSubview(scrollView)
|
||||
}
|
||||
|
||||
func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool {
|
||||
if self.dataSource.count != 0 {
|
||||
let indexpath = IndexPath(row: self.dataSource.count - 1, section: 0)
|
||||
self.tableView.scrollToRow(at: indexpath, at: .bottom, animated: true)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
|
|
|
@ -66,3 +66,6 @@
|
|||
|
||||
/* Class = "UILabel"; text = "None"; ObjectID = "YT2-1I-RlM"; */
|
||||
"YT2-1I-RlM.text" = "None";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Qmg-sW-dkA"; */
|
||||
"Qmg-sW-dkA.normalTitle" = "";
|
||||
|
|
|
@ -112,5 +112,8 @@
|
|||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "fa9-4g-iNW"; */
|
||||
"fa9-4g-iNW.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "k9G-H8-3Hb"; */
|
||||
"k9G-H8-3Hb.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "kNl-ad-SgK"; */
|
||||
"kNl-ad-SgK.normalTitle" = "";
|
||||
|
|
|
@ -66,3 +66,6 @@
|
|||
|
||||
/* Class = "UILabel"; text = "None"; ObjectID = "YT2-1I-RlM"; */
|
||||
"YT2-1I-RlM.text" = "None";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Qmg-sW-dkA"; */
|
||||
"Qmg-sW-dkA.normalTitle" = "";
|
||||
|
|
|
@ -112,5 +112,8 @@
|
|||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "fa9-4g-iNW"; */
|
||||
"fa9-4g-iNW.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "k9G-H8-3Hb"; */
|
||||
"k9G-H8-3Hb.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "kNl-ad-SgK"; */
|
||||
"kNl-ad-SgK.normalTitle" = "";
|
||||
|
|
|
@ -66,3 +66,6 @@
|
|||
|
||||
/* Class = "UILabel"; text = "None"; ObjectID = "YT2-1I-RlM"; */
|
||||
"YT2-1I-RlM.text" = "None";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Qmg-sW-dkA"; */
|
||||
"Qmg-sW-dkA.normalTitle" = "";
|
||||
|
|
|
@ -112,5 +112,8 @@
|
|||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "fa9-4g-iNW"; */
|
||||
"fa9-4g-iNW.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "k9G-H8-3Hb"; */
|
||||
"k9G-H8-3Hb.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "kNl-ad-SgK"; */
|
||||
"kNl-ad-SgK.normalTitle" = "";
|
||||
|
|
|
@ -66,3 +66,6 @@
|
|||
|
||||
/* Class = "UILabel"; text = "None"; ObjectID = "YT2-1I-RlM"; */
|
||||
"YT2-1I-RlM.text" = "None";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Qmg-sW-dkA"; */
|
||||
"Qmg-sW-dkA.normalTitle" = "";
|
||||
|
|
|
@ -112,5 +112,8 @@
|
|||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "fa9-4g-iNW"; */
|
||||
"fa9-4g-iNW.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "k9G-H8-3Hb"; */
|
||||
"k9G-H8-3Hb.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "kNl-ad-SgK"; */
|
||||
"kNl-ad-SgK.normalTitle" = "";
|
||||
|
|
|
@ -66,3 +66,6 @@
|
|||
|
||||
/* Class = "UILabel"; text = "None"; ObjectID = "YT2-1I-RlM"; */
|
||||
"YT2-1I-RlM.text" = "None";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Qmg-sW-dkA"; */
|
||||
"Qmg-sW-dkA.normalTitle" = "";
|
||||
|
|
|
@ -112,5 +112,8 @@
|
|||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "fa9-4g-iNW"; */
|
||||
"fa9-4g-iNW.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "k9G-H8-3Hb"; */
|
||||
"k9G-H8-3Hb.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "kNl-ad-SgK"; */
|
||||
"kNl-ad-SgK.normalTitle" = "";
|
||||
|
|
|
@ -41,6 +41,7 @@ class MucChatViewController: BaseChatViewControllerWithDataSourceAndContextMenuA
|
|||
}
|
||||
}
|
||||
|
||||
@IBOutlet weak var scrollToBottomButton: RoundShadowButton!
|
||||
let log: Logger = Logger();
|
||||
|
||||
override func viewDidLoad() {
|
||||
|
@ -65,6 +66,17 @@ class MucChatViewController: BaseChatViewControllerWithDataSourceAndContextMenuA
|
|||
NotificationCenter.default.addObserver(self, selector: #selector(MucChatViewController.avatarChanged), name: AvatarManager.AVATAR_CHANGED, object: nil);
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(accountStateChanged), name: XmppService.ACCOUNT_STATE_CHANGED, object: nil)
|
||||
|
||||
scrollToBottomButton.cornerRadius = 20
|
||||
scrollToBottomButton.isHidden = true
|
||||
}
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
guard let contentOffset = self.conversationLogController?.tableView.contentOffset else { return }
|
||||
if contentOffset.y > 400 {
|
||||
scrollToBottomButton.isHidden = false
|
||||
} else {
|
||||
scrollToBottomButton.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
|
@ -83,6 +95,10 @@ class MucChatViewController: BaseChatViewControllerWithDataSourceAndContextMenuA
|
|||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
@IBAction func scrollToBottomTapped(_ sender: RoundShadowButton) {
|
||||
self.conversationLogController?.tableView.setContentOffset(.zero, animated: true)
|
||||
}
|
||||
|
||||
func setupGroupName() {
|
||||
if let name = room?.name {
|
||||
titleView?.name = name
|
||||
|
|
|
@ -66,3 +66,6 @@
|
|||
|
||||
/* Class = "UILabel"; text = "None"; ObjectID = "YT2-1I-RlM"; */
|
||||
"YT2-1I-RlM.text" = "None";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "Qmg-sW-dkA"; */
|
||||
"Qmg-sW-dkA.normalTitle" = "";
|
||||
|
|
|
@ -112,5 +112,8 @@
|
|||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "fa9-4g-iNW"; */
|
||||
"fa9-4g-iNW.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "k9G-H8-3Hb"; */
|
||||
"k9G-H8-3Hb.normalTitle" = "";
|
||||
|
||||
/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "kNl-ad-SgK"; */
|
||||
"kNl-ad-SgK.normalTitle" = "";
|
||||
|
|
|
@ -35,3 +35,33 @@ class RoundButton: UIButton {
|
|||
layer.cornerRadius = self.frame.height / 2;
|
||||
}
|
||||
}
|
||||
|
||||
final class RoundShadowButton: UIButton {
|
||||
|
||||
private var shadowLayer: CAShapeLayer!
|
||||
|
||||
public var cornerRadius: CGFloat = 0 {
|
||||
didSet {
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
if shadowLayer == nil {
|
||||
shadowLayer = CAShapeLayer()
|
||||
shadowLayer.path = UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius).cgPath
|
||||
shadowLayer.fillColor = UIColor.white.cgColor
|
||||
|
||||
shadowLayer.shadowColor = UIColor.darkGray.cgColor
|
||||
shadowLayer.shadowPath = shadowLayer.path
|
||||
shadowLayer.shadowOffset = .zero
|
||||
shadowLayer.shadowOpacity = 0.6
|
||||
shadowLayer.shadowRadius = 8
|
||||
self.layer.cornerRadius = cornerRadius
|
||||
layer.insertSublayer(shadowLayer, at: 0)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue