ios - 截断 UITableViewCell iOS 13 的底部
问题描述
UITableView高度有问题——底部UILabel在iOS13.8被剪掉了
我已经设置了如下的行高,但它不起作用
WindowsTableView.RowHeight = UITableView.AutomaticDimension;
WindowsTableView.EstimatedRowHeight = 128;
可能有什么问题?我试图删除底部约束,但它不起作用
我的 .xib 文件的代码:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<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="TopLeft" layoutMarginsFollowReadableWidth="YES" selectionStyle="default" indentationWidth="10" rowHeight="168" id="cxk-wN-pdQ" customClass="ConfirmWindowCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="168"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="cxk-wN-pdQ" id="YTl-1W-gDM">
<rect key="frame" x="0.0" y="0.0" width="320" height="167"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" id="2303" translatesAutoresizingMaskIntoConstraints="NO" spacing="8">
<rect key="frame" x="20" y="20" width="280" height="127.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="DlC-6u-AXD" ambiguous="YES">
<rect key="frame" x="0.0" y="0.0" width="280" height="30.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="900-rg-zgb" ambiguous="YES">
<rect key="frame" x="0.0" y="0.0" width="42" height="30.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Номер машины" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="2" ambiguous="YES">
<rect key="frame" x="52" y="0.0" width="228" height="30.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
</stackView>
<stackView contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="1060" opaque="NO" ambiguous="YES">
<rect key="frame" x="0.0" y="38.5" width="280" height="34"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+7" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1079" ambiguous="YES">
<rect key="frame" x="0.0" y="0.0" width="20" height="34"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Телефон водителя" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="1062" ambiguous="YES">
<rect key="frame" x="30" y="0.0" width="250" height="34"/>
<textInputTraits key="textInputTraits"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
</textField>
</subviews>
</stackView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Не указан номер, хотя мог бы быть и указан вообще-то. Введите данные ещё раз." textAlignment="center" lineBreakMode="wordWrap" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="DKf-Sf-qvd" numberOfLines="0">
<rect key="frame" x="0.0" y="80.5" width="280" height="47"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint id="2304" firstItem="2303" firstAttribute="top" secondItem="YTl-1W-gDM" secondAttribute="top" constant="20" symbolic="YES"/>
<constraint id="2305" firstItem="2303" firstAttribute="leading" secondItem="YTl-1W-gDM" secondAttribute="leading" constant="20" symbolic="YES"/>
<constraint id="2307" firstAttribute="trailing" secondItem="2303" secondAttribute="trailing" constant="20" symbolic="YES"/>
<constraint id="3505" firstAttribute="bottom" secondItem="2303" secondAttribute="bottom" constant="20"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="CellView" destination="YTl-1W-gDM" id="name-outlet-YTl-1W-gDM"/>
<outlet property="ValidationLabel" destination="DKf-Sf-qvd" id="name-outlet-DKf-Sf-qvd"/>
<outlet property="DriverPhoneText" destination="1062" id="name-outlet-1062"/>
<outlet property="DriverPhoneStackView" destination="1060" id="name-outlet-1060"/>
<outlet property="PlateText" destination="2" id="name-outlet-2"/>
<outlet property="TimeLabel" destination="900-rg-zgb" id="name-outlet-900-rg-zgb"/>
</connections>
<point key="canvasLocation" x="499" y="445"/>
</tableViewCell>
</objects>
</document>
解决方案
推荐阅读
- c# - 如何转换表达式
> 到表达式 >? - android - xamarin Android:想要以编程方式在导航视图菜单项中创建组
- excel - Excel左右子串
- java - 懒惰地与供应商创建 java 流
- java - 地图之间的Java差异,包括值
- c# - 如何使用 WPF 的 famfamfam 标志图标获取特定的图标标志?
- android-emulator - 为什么关闭 Android 模拟器会挂起我的电脑
- python - TensorFlow 和词嵌入:传递字典
- java - Android在活动中制作滚动的两个独立列表视图
- caching - 致命错误:未捕获的错误:在 Prestashop 中找不到类“缓存”