forked from HamzaGhazouani/HGPlaceholders
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Give support Placeholder Data to custom XIB - if the tableview is empty hide automatically to loading data placeholder
- Loading branch information
1 parent
d7e34a3
commit 9d23f24
Showing
8 changed files
with
89 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 44 additions & 12 deletions
56
Example/HGPlaceholders/TableViewExample/ExampleTableViewCell.xib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,71 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | ||
<device id="retina4_7" orientation="portrait"> | ||
<adaptation id="fullscreen"/> | ||
</device> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | ||
<device id="retina4_7" orientation="portrait" appearance="light"/> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="CustomPlaceholderCell" id="KGk-i7-Jjw" customClass="ExampleTableViewCell" customModule="HGPlaceholders_Example" customModuleProvider="target"> | ||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/> | ||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="CustomPlaceholderCell" rowHeight="342" id="KGk-i7-Jjw" customClass="ExampleTableViewCell" customModule="HGPlaceholders_Example" customModuleProvider="target"> | ||
<rect key="frame" x="0.0" y="0.0" width="320" height="342"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> | ||
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/> | ||
<rect key="frame" x="0.0" y="0.0" width="320" height="342"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<subviews> | ||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gpt-4x-Zox"> | ||
<rect key="frame" x="136" y="7" width="48" height="30"/> | ||
<rect key="frame" x="136" y="237" width="48" height="30"/> | ||
<state key="normal" title="Action!"> | ||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
</state> | ||
<connections> | ||
<action selector="sendPlaceholderAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="hgQ-Ct-rjF"/> | ||
</connections> | ||
</button> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JaH-BO-vhN"> | ||
<rect key="frame" x="20" y="150" width="280" height="32.5"/> | ||
<fontDescription key="fontDescription" type="boldSystem" pointSize="27"/> | ||
<nil key="textColor"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9UV-Gy-bEu"> | ||
<rect key="frame" x="110" y="20" width="100" height="100"/> | ||
<constraints> | ||
<constraint firstAttribute="width" secondItem="9UV-Gy-bEu" secondAttribute="height" multiplier="1:1" id="5fk-e9-vNH"/> | ||
<constraint firstAttribute="height" constant="100" id="R1s-eg-nCc"/> | ||
</constraints> | ||
</imageView> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xxf-xF-w4O"> | ||
<rect key="frame" x="20" y="192.5" width="280" height="14.5"/> | ||
<fontDescription key="fontDescription" type="system" pointSize="12"/> | ||
<nil key="textColor"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
<color key="backgroundColor" red="0.1897330284" green="0.38077324629999998" blue="0.87199062110000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
<constraints> | ||
<constraint firstItem="Gpt-4x-Zox" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="Zq9-TI-yDI"/> | ||
<constraint firstItem="Gpt-4x-Zox" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="gm8-7q-V6k"/> | ||
<constraint firstItem="Xxf-xF-w4O" firstAttribute="leading" secondItem="JaH-BO-vhN" secondAttribute="leading" id="7Er-3x-yy5"/> | ||
<constraint firstItem="Xxf-xF-w4O" firstAttribute="top" secondItem="JaH-BO-vhN" secondAttribute="bottom" constant="10" id="8ar-mS-oyN"/> | ||
<constraint firstItem="9UV-Gy-bEu" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="20" id="DOj-hB-1Et"/> | ||
<constraint firstItem="Gpt-4x-Zox" firstAttribute="top" secondItem="Xxf-xF-w4O" secondAttribute="bottom" constant="30" id="DRc-yk-xcJ"/> | ||
<constraint firstAttribute="trailing" secondItem="JaH-BO-vhN" secondAttribute="trailing" constant="20" id="Keh-t1-bbq"/> | ||
<constraint firstItem="JaH-BO-vhN" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="qAf-hq-58K"/> | ||
<constraint firstItem="JaH-BO-vhN" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="150" id="rgo-IU-yGa"/> | ||
<constraint firstItem="Gpt-4x-Zox" firstAttribute="centerX" secondItem="JaH-BO-vhN" secondAttribute="centerX" id="uK5-Ht-Idj"/> | ||
<constraint firstItem="Xxf-xF-w4O" firstAttribute="trailing" secondItem="JaH-BO-vhN" secondAttribute="trailing" id="wtw-hK-npn"/> | ||
<constraint firstItem="9UV-Gy-bEu" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="xzS-QG-ylY"/> | ||
</constraints> | ||
</tableViewCellContentView> | ||
<point key="canvasLocation" x="-121" y="51"/> | ||
<connections> | ||
<outlet property="actionButton" destination="Gpt-4x-Zox" id="BB1-YK-pIB"/> | ||
<outlet property="placeholderImageView" destination="9UV-Gy-bEu" id="Sc8-3n-UVj"/> | ||
<outlet property="subtitleLabel" destination="Xxf-xF-w4O" id="aST-uq-anp"/> | ||
<outlet property="titleLabel" destination="JaH-BO-vhN" id="rr4-7q-tvF"/> | ||
</connections> | ||
<point key="canvasLocation" x="-121.59999999999999" y="184.40779610194903"/> | ||
</tableViewCell> | ||
</objects> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters