Skip to content

Commit

Permalink
update mychannel images to round
Browse files Browse the repository at this point in the history
  • Loading branch information
jerlao committed Apr 11, 2016
1 parent 998476a commit 0252326
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 29 deletions.
4 changes: 3 additions & 1 deletion ChannelTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ class ChannelTableViewCell: UITableViewCell {
backgroundColor = UIColor.clearColor()
channelNameLabel.textColor = Theme.Colors.HighlightColor.color
channelTopicsLabel.textColor = Theme.Colors.HighlightLightColor.color
channelImageView.layer.cornerRadius = 6.0
channelImageView.layer.cornerRadius = channelImageView.bounds.height/2
channelImageView.layer.borderColor = Theme.Colors.SeparatorColor.color.CGColor
channelImageView.layer.borderWidth = 1

self.layoutMargins = UIEdgeInsetsZero
}
Expand Down
29 changes: 15 additions & 14 deletions ChannelTableViewCell.xib
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</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" rowHeight="99" id="KGk-i7-Jjw" customClass="ChannelTableViewCell" customModule="TeeVee" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="99"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="110" id="KGk-i7-Jjw" customClass="ChannelTableViewCell" customModule="TeeVee" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="110"/>
<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="98.5"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="109"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="5h5-mp-Pfr">
<rect key="frame" x="8" y="12" width="60" height="60"/>
<rect key="frame" x="12" y="6" width="70" height="70"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="6ri-a0-rW0"/>
<constraint firstAttribute="height" constant="60" id="W7s-3J-PUN"/>
<constraint firstAttribute="width" constant="70" id="6ri-a0-rW0"/>
<constraint firstAttribute="height" constant="70" id="W7s-3J-PUN"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oFk-84-jzy">
<rect key="frame" x="80" y="10" width="232" height="19.5"/>
<rect key="frame" x="94" y="12" width="218" height="20"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GJe-VF-s5G">
<rect key="frame" x="80" y="31.5" width="232" height="15"/>
<rect key="frame" x="94" y="34" width="218" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="oFk-84-jzy" secondAttribute="trailing" constant="8" id="7Wn-Xr-kHY"/>
<constraint firstItem="5h5-mp-Pfr" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="12" id="Her-CY-FfD"/>
<constraint firstItem="5h5-mp-Pfr" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="8" id="W0j-Fh-dOs"/>
<constraint firstItem="5h5-mp-Pfr" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="6" id="Her-CY-FfD"/>
<constraint firstItem="5h5-mp-Pfr" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="12" id="W0j-Fh-dOs"/>
<constraint firstItem="oFk-84-jzy" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="bAz-uK-r6s"/>
<constraint firstItem="GJe-VF-s5G" firstAttribute="leading" secondItem="oFk-84-jzy" secondAttribute="leading" id="gXt-kW-hb8"/>
<constraint firstItem="oFk-84-jzy" firstAttribute="top" secondItem="5h5-mp-Pfr" secondAttribute="top" constant="-2" id="iOi-Ee-Wsx"/>
<constraint firstItem="oFk-84-jzy" firstAttribute="top" secondItem="5h5-mp-Pfr" secondAttribute="top" constant="6" id="iOi-Ee-Wsx"/>
<constraint firstItem="GJe-VF-s5G" firstAttribute="top" secondItem="oFk-84-jzy" secondAttribute="bottom" constant="2" id="jGU-Kr-x9W"/>
<constraint firstAttribute="trailing" secondItem="GJe-VF-s5G" secondAttribute="trailing" constant="8" id="oLt-qh-VIK"/>
<constraint firstItem="GJe-VF-s5G" firstAttribute="leading" secondItem="5h5-mp-Pfr" secondAttribute="trailing" constant="12" id="wk3-mx-2Iy"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="5h5-mp-Pfr" secondAttribute="bottom" constant="12" id="yRZ-9w-pW8"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="5h5-mp-Pfr" secondAttribute="bottom" constant="6" id="yRZ-9w-pW8"/>
<constraint firstItem="oFk-84-jzy" firstAttribute="leading" secondItem="5h5-mp-Pfr" secondAttribute="trailing" constant="12" id="zSl-9h-jKW"/>
</constraints>
<variation key="default">
Expand All @@ -54,12 +54,13 @@
</mask>
</variation>
</tableViewCellContentView>
<inset key="separatorInset" minX="84" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="channelImageView" destination="5h5-mp-Pfr" id="OrZ-Ln-xWA"/>
<outlet property="channelNameLabel" destination="oFk-84-jzy" id="Szz-Qu-s7Y"/>
<outlet property="channelTopicsLabel" destination="GJe-VF-s5G" id="41l-sQ-iSG"/>
</connections>
<point key="canvasLocation" x="512" y="285.5"/>
<point key="canvasLocation" x="512" y="291"/>
</tableViewCell>
</objects>
</document>
27 changes: 15 additions & 12 deletions SmartStream/Base.lproj/MyChannels.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
Expand All @@ -25,19 +25,9 @@
<rect key="frame" x="0.0" y="28" width="600" height="200"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="TRO-hv-OcE" id="KlG-yP-TN1">
<rect key="frame" x="0.0" y="0.0" width="600" height="199.5"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="199"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kbD-ax-kgm">
<rect key="frame" x="209" y="161" width="182" height="30"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Recommended Channels">
<color key="titleColor" red="0.8784313725490196" green="0.8784313725490196" blue="0.8784313725490196" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="onCheckChannelTapped:" destination="TRO-hv-OcE" eventType="touchUpInside" id="Gmc-dz-Gx9"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="v8C-gH-ReY">
<rect key="frame" x="200" y="25" width="200" height="150"/>
<subviews>
Expand Down Expand Up @@ -73,6 +63,19 @@
<constraint firstItem="OSq-qf-uYY" firstAttribute="top" secondItem="v8C-gH-ReY" secondAttribute="top" id="yTe-8Y-b0X"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kbD-ax-kgm">
<rect key="frame" x="209" y="161" width="182" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="0bY-qU-NEJ"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Recommended Channels">
<color key="titleColor" red="0.8784313725490196" green="0.8784313725490196" blue="0.8784313725490196" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="onCheckChannelTapped:" destination="TRO-hv-OcE" eventType="touchUpInside" id="Gmc-dz-Gx9"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="v8C-gH-ReY" firstAttribute="centerY" secondItem="KlG-yP-TN1" secondAttribute="centerY" id="0dS-0o-7UK"/>
Expand Down
2 changes: 1 addition & 1 deletion SmartStream/MyChannelsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MyChannelsViewController: UIViewController {
tableView.registerNib(channelCellNib, forCellReuseIdentifier: channelCellID)
tableView.estimatedRowHeight = 100
tableView.rowHeight = UITableViewAutomaticDimension
tableView.separatorInset = UIEdgeInsetsZero
// tableView.separatorInset = UIEdgeInsetsZero

// Hide empty tableView rows
tableView.tableFooterView = UIView(frame: CGRectZero)
Expand Down
2 changes: 1 addition & 1 deletion Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct Theme {
case .PlayColor: return UIColor(red: 164/255, green: 179/255, blue: 112/255, alpha: 1)
case .EditColor: return UIColor(red: 113/255, green: 154/255, blue: 175/255, alpha: 1)
case .DeleteColor: return UIColor(red: 225/255, green: 79/255, blue: 79/255, alpha: 1)
case .SeparatorColor: return UIColor(red: 67/255, green: 71/255, blue: 86/255, alpha: 1)
case .SeparatorColor: return UIColor(red: 67/255, green: 71/255, blue: 86/255, alpha: 0.5)
}
}
}
Expand Down

0 comments on commit 0252326

Please sign in to comment.