Skip to content

Commit

Permalink
Merge branch 'GH-21-Meetup5-Improve-Todo-Cell-UI' of https://github.c…
Browse files Browse the repository at this point in the history
…om/chuva-io/TodoList into GH-20-Meetup5-Empty-State
  • Loading branch information
ivancr committed Oct 2, 2018
2 parents ebb0f8b + 3faceb2 commit bd50214
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 6 additions & 3 deletions TodoList/Views/ItemTableViewCell.swift
Expand Up @@ -4,7 +4,12 @@ final class ItemTableViewCell: UITableViewCell {

// MARK: - Properties
@IBOutlet private var stackView: UIStackView!
@IBOutlet private var stateImage: UIImageView!
@IBOutlet private var stateImage: UIImageView! {
didSet {
stateImage.adjustsImageSizeForAccessibilityContentSizeCategory = true
}
}

@IBOutlet private var titleLabel: UILabel! {
didSet {
titleLabel.numberOfLines = 0
Expand Down Expand Up @@ -70,8 +75,6 @@ final class ItemTableViewCell: UITableViewCell {
let heightConstraint = stackView.heightAnchor.constraint(greaterThanOrEqualToConstant: 44)
heightConstraint.priority = .defaultHigh
heightConstraint.isActive = true

selectionStyle = .none
}

private func titleAttributes(isCompleted: Bool) -> [NSAttributedStringKey: Any] {
Expand Down
7 changes: 3 additions & 4 deletions TodoList/Views/ItemTableViewCell.xib
@@ -1,12 +1,11 @@
<?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="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -37,7 +36,7 @@
</label>
</subviews>
</stackView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" image="todoIcon" adjustsImageSizeForAccessibilityContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="GcA-4j-WpI">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" image="todoIcon" translatesAutoresizingMaskIntoConstraints="NO" id="GcA-4j-WpI">
<rect key="frame" x="16" y="10" width="24" height="24"/>
<constraints>
<constraint firstAttribute="width" secondItem="GcA-4j-WpI" secondAttribute="height" multiplier="1:1" id="2Ca-NB-V39"/>
Expand Down

0 comments on commit bd50214

Please sign in to comment.