Skip to content

Commit 77c9188

Browse files
add example table list buttons
1 parent c1de9a7 commit 77c9188

7 files changed

Lines changed: 527 additions & 61 deletions

File tree

Example/ButtonClickStyle/UI/Button/JustPink/JustPinkButtonView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class JustPinkButtonView: BtnView {
2727
if !state.addBackgrondColor {
2828
backgroundColor = .clear
2929
}
30-
fillView.isHidden = !state.addBackgrondColor
3130

3231
if state.new {
3332
let color: UIColor = #colorLiteral(red: 0.568627451, green: 0.2784313725, blue: 1, alpha: 1)
@@ -97,6 +96,8 @@ class JustPinkButtonView: BtnView {
9796
mainDetailsView.setNeedsLayout()
9897
mainShadowView.setNeedsLayout()
9998

99+
fillView.isHidden = !state.addBackgrondColor
100+
100101
let viewAn = ButtonClickStyleView(
101102
state: state,
102103
frame: fr,

Example/ButtonClickStyle/UI/Cell/ButtonListCell/ButtonListCell.xib

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,87 +10,95 @@
1010
<objects>
1111
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
1212
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
13-
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" rowHeight="64" id="8Re-Fe-eX6" customClass="ButtonListCell" customModule="ButtonClickStyle_Example" customModuleProvider="target">
13+
<tableViewCell contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" rowHeight="64" id="8Re-Fe-eX6" customClass="ButtonListCell" customModule="ButtonClickStyle_Example" customModuleProvider="target">
1414
<rect key="frame" x="0.0" y="0.0" width="375" height="93"/>
1515
<autoresizingMask key="autoresizingMask"/>
16-
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="8Re-Fe-eX6" id="Nk4-un-IoO">
16+
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="8Re-Fe-eX6" id="Nk4-un-IoO">
1717
<rect key="frame" x="0.0" y="0.0" width="375" height="93"/>
1818
<autoresizingMask key="autoresizingMask"/>
1919
<subviews>
2020
<view clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zd1-Vk-dQd" userLabel=" ButtonList">
2121
<rect key="frame" x="0.0" y="0.0" width="375" height="93"/>
2222
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2323
<subviews>
24-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Alpha " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="59P-TW-ezt" userLabel="Alpha">
24+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Alpha " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="59P-TW-ezt" userLabel="Alpha">
2525
<rect key="frame" x="202" y="0.0" width="68" height="93"/>
2626
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
27-
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
27+
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
2828
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2929
</label>
30-
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pYM-X8-kdf" userLabel="Frame 3183352">
30+
<view alpha="0.59999999999999998" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pYM-X8-kdf" userLabel="Frame 3183352">
3131
<rect key="frame" x="270" y="-6" width="30" height="110"/>
3232
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
3333
<subviews>
3434
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="UU8-W8-GyW" userLabel="Rectangle 39">
3535
<rect key="frame" x="0.0" y="0.0" width="30" height="110"/>
3636
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
37-
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.050000000745058081" colorSpace="custom" customColorSpace="sRGB"/>
37+
<color key="backgroundColor" white="0.0" alpha="0.031042231533822674" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
3838
</view>
3939
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text=" ☑️" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mn2-NT-vtC" userLabel="☑️">
4040
<rect key="frame" x="0.0" y="6" width="30" height="93"/>
4141
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
42-
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
42+
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
4343
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4444
</label>
4545
</subviews>
4646
</view>
47-
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NBj-nH-j0l" userLabel="Frame 3183351">
47+
<view alpha="0.59999999999999998" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NBj-nH-j0l" userLabel="Frame 3183351">
4848
<rect key="frame" x="308" y="-6" width="30" height="110"/>
4949
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
5050
<subviews>
5151
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zd8-vU-BUU" userLabel="Rectangle 40">
5252
<rect key="frame" x="0.0" y="0.0" width="30" height="110"/>
5353
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
54-
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.050000000745058081" colorSpace="custom" customColorSpace="sRGB"/>
54+
<color key="backgroundColor" white="0.0" alpha="0.044088265686957125" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
5555
</view>
5656
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="🔵" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vl4-tD-BIU" userLabel="🔵">
5757
<rect key="frame" x="0.0" y="6" width="30" height="93"/>
5858
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
59-
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
59+
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
6060
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
6161
</label>
6262
</subviews>
6363
</view>
64-
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rsZ-zc-0ZK" userLabel="Frame 3183350">
64+
<view alpha="0.59999999999999998" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rsZ-zc-0ZK" userLabel="Frame 3183350">
6565
<rect key="frame" x="345" y="-6" width="30" height="110"/>
6666
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
6767
<subviews>
6868
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JYi-eC-upP" userLabel="Rectangle 41">
6969
<rect key="frame" x="0.0" y="0.0" width="30" height="110"/>
7070
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
71-
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.050000000745058081" colorSpace="custom" customColorSpace="sRGB"/>
71+
<color key="backgroundColor" white="0.0" alpha="0.061779010692031719" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
7272
</view>
7373
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text=" 🆕️" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IRK-Wx-7TP" userLabel="🆕️">
7474
<rect key="frame" x="0.0" y="6" width="30" height="93"/>
7575
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
76-
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
76+
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
7777
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
7878
</label>
7979
</subviews>
8080
</view>
8181
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fyx-Hq-UeM">
8282
<rect key="frame" x="0.0" y="0.0" width="375" height="93"/>
8383
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
84+
<fontDescription key="fontDescription" type="system" pointSize="12"/>
8485
</button>
85-
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YWd-Xu-ljI" customClass="JustPinkButtonView" customModule="ButtonClickStyle_Example" customModuleProvider="target">
86-
<rect key="frame" x="0.0" y="0.0" width="202" height="93"/>
87-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
88-
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
89-
</view>
9086
</subviews>
9187
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
9288
</view>
89+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YWd-Xu-ljI" customClass="JustPinkButtonView" customModule="ButtonClickStyle_Example" customModuleProvider="target">
90+
<rect key="frame" x="0.0" y="0.0" width="202" height="93"/>
91+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
92+
<constraints>
93+
<constraint firstAttribute="width" constant="202" id="1qX-GX-w20"/>
94+
</constraints>
95+
</view>
9396
</subviews>
97+
<constraints>
98+
<constraint firstItem="YWd-Xu-ljI" firstAttribute="leading" secondItem="Nk4-un-IoO" secondAttribute="leading" id="emI-Vc-Neu"/>
99+
<constraint firstItem="YWd-Xu-ljI" firstAttribute="top" secondItem="Nk4-un-IoO" secondAttribute="top" id="swe-cE-PRR"/>
100+
<constraint firstAttribute="bottom" secondItem="YWd-Xu-ljI" secondAttribute="bottom" id="wWe-4J-RH7"/>
101+
</constraints>
94102
</tableViewCellContentView>
95103
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
96104
<connections>

0 commit comments

Comments
 (0)