Skip to content

Commit

Permalink
Merge pull request #36 from clutter/long-messages
Browse files Browse the repository at this point in the history
Fix bug where long messages are cut off
  • Loading branch information
MichaelM1177 committed Jul 15, 2019
2 parents 0d5fba8 + 21375d7 commit baa4b4e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 25 deletions.
8 changes: 4 additions & 4 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PODS:
- Sections (0.8.0)
- SplitScreenScanner (7.0.1):
- SplitScreenScanner (7.0.2):
- Sections
- SwiftLint (0.28.0)
- SwiftLint (0.33.1)

DEPENDENCIES:
- SplitScreenScanner (from `../`)
Expand All @@ -19,8 +19,8 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Sections: efc268a207d0e7afba82d2a0efd6cdf61872b5d4
SplitScreenScanner: 6f933805460e0e08d2de6d3ae92059e9ee526234
SwiftLint: 088cfacb75b45970017e62b7524d506776d60148
SplitScreenScanner: 9965d9eb926f6e1ea31043079e389c153f8ea0f6
SwiftLint: 9fc1143bbacec37f94994a7d0d2a85b2154b6294

PODFILE CHECKSUM: 662fda703b72b77c2ece8658c02a5b890176b006

Expand Down
2 changes: 1 addition & 1 deletion SplitScreenScanner.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'SplitScreenScanner'
s.version = '7.0.1'
s.version = '7.0.2'
s.summary = 'Swift library for scanning barcodes with half the screen devoted to scan history'

# This description is used to generate tags and improve search results.
Expand Down
36 changes: 20 additions & 16 deletions SplitScreenScanner/Assets/ScanHistoryCell.xib
Original file line number Diff line number Diff line change
@@ -1,63 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<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 clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="68" id="uX6-tT-s2t" customClass="ScanHistoryCell" customModule="SplitScreenScanner">
<rect key="frame" x="0.0" y="0.0" width="375" height="64"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="98" id="uX6-tT-s2t" customClass="ScanHistoryCell" customModule="SplitScreenScanner">
<rect key="frame" x="0.0" y="0.0" width="375" height="98"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="uX6-tT-s2t" id="nlx-Rl-wO7">
<rect key="frame" x="0.0" y="0.0" width="375" height="63.5"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="97.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="RR3-7L-04H">
<rect key="frame" x="16" y="16" width="32" height="32"/>
<rect key="frame" x="16" y="33" width="32" height="32"/>
<constraints>
<constraint firstAttribute="width" secondItem="RR3-7L-04H" secondAttribute="height" multiplier="1:1" id="Y0h-YZ-Acp"/>
<constraint firstAttribute="height" constant="32" id="hlT-11-Pzl"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" alignment="top" spacing="8" baselineRelativeArrangement="YES" translatesAutoresizingMaskIntoConstraints="NO" id="95c-kA-r5u">
<rect key="frame" x="64" y="4" width="145" height="55.5"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="24" baselineRelativeArrangement="YES" translatesAutoresizingMaskIntoConstraints="NO" id="95c-kA-r5u">
<rect key="frame" x="64" y="8" width="295" height="81.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="252" horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="751" text="#0000123456" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mrx-Jp-vvK">
<rect key="frame" x="0.0" y="0.0" width="145" height="34.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="252" horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="751" text="#0000123456" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mrx-Jp-vvK">
<rect key="frame" x="0.0" y="0.0" width="145" height="25.5"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="21"/>
<color key="textColor" red="0.32156862749999998" green="0.3294117647" blue="0.3294117647" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Success" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VlW-7a-Zbq">
<rect key="frame" x="0.0" y="21" width="64.5" height="34.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Success" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VlW-7a-Zbq">
<rect key="frame" x="0.0" y="28" width="64.5" height="53.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.60784313725490191" green="0.61960784313725492" blue="0.61960784313725492" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="64" id="mcC-qW-VZ3"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="RR3-7L-04H" firstAttribute="centerY" secondItem="nlx-Rl-wO7" secondAttribute="centerY" id="GCe-i6-UmE"/>
<constraint firstAttribute="bottom" secondItem="95c-kA-r5u" secondAttribute="bottom" constant="4" id="N6e-oC-VRU"/>
<constraint firstAttribute="bottom" secondItem="95c-kA-r5u" secondAttribute="bottom" constant="8" id="N6e-oC-VRU"/>
<constraint firstItem="95c-kA-r5u" firstAttribute="leading" secondItem="RR3-7L-04H" secondAttribute="trailing" constant="16" id="QI9-Di-mLy"/>
<constraint firstAttribute="trailing" secondItem="95c-kA-r5u" secondAttribute="trailing" constant="16" id="UfT-2N-5qV"/>
<constraint firstItem="RR3-7L-04H" firstAttribute="leading" secondItem="nlx-Rl-wO7" secondAttribute="leading" constant="16" id="Vob-7g-Sw0"/>
<constraint firstItem="95c-kA-r5u" firstAttribute="top" secondItem="nlx-Rl-wO7" secondAttribute="top" constant="4" id="n8E-0j-HcF"/>
<constraint firstItem="95c-kA-r5u" firstAttribute="top" secondItem="nlx-Rl-wO7" secondAttribute="top" constant="8" id="n8E-0j-HcF"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="barcodeLabel" destination="Mrx-Jp-vvK" id="UO1-LT-7a9"/>
<outlet property="descriptionLabel" destination="VlW-7a-Zbq" id="Le6-AG-oPN"/>
<outlet property="iconImageView" destination="RR3-7L-04H" id="DIW-hx-GDk"/>
</connections>
<point key="canvasLocation" x="10.5" y="-154"/>
<point key="canvasLocation" x="10.4" y="-140.32983508245877"/>
</tableViewCell>
</objects>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class ScanHistoryTableViewController: UITableViewController {
tableView.tableFooterView = UIView()
tableView.separatorInset = .zero

tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 72

viewModel.createSections()
}

Expand Down Expand Up @@ -132,10 +135,6 @@ class ScanHistoryTableViewController: UITableViewController {
}
}
}

override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 72
}
}

private extension ScanHistoryTableViewController {
Expand Down

0 comments on commit baa4b4e

Please sign in to comment.