Skip to content

Commit

Permalink
Fix transaction cell amount label
Browse files Browse the repository at this point in the history
  • Loading branch information
SwenVanZanten committed Sep 26, 2019
1 parent 6e816b4 commit 66b2ac7
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ binary "https://icepa.github.io/Tor.framework/Tor.json" "305.8.1"
github "HamzaGhazouani/HGPlaceholders" "0.4.0"
github "JohnEstropia/CoreStore" "6.3.2"
github "SwiftyJSON/SwiftyJSON" "5.0.0"
github "Swinject/Swinject" "2.6.2"
github "Swinject/Swinject" "2.7.1"
github "Swinject/SwinjectStoryboard" "2.2.0"
github "danielgindi/Charts" "v3.3.0"
github "evgenyneu/keychain-swift" "11.0.0"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ class TransparantNavigationBar: UINavigationBar {
// An empty implementation adversely affects performance during animation.
override func draw(_ rect: CGRect) {
super.draw(rect)

let font = UIFont.avenir(size: 19).medium()

self.titleTextAttributes = [kCTFontAttributeName: font] as [NSAttributedString.Key: Any]
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ import Eureka

class TransactionTableViewCell: Cell<String>, CellType {

@IBOutlet weak var amountLabel: UILabel!
let amountLabel: UILabel = UILabel()

override func setup() {}

override func update() {}

override func awakeFromNib() {
super.awakeFromNib()

amountLabel.font = UIFont.avenir(size: 14).demiBold()
accessoryView = amountLabel
}

func setTransaction(_ transaction: TxHistory, address: Contact?) {
setAccount(transaction, address: address)
setDateTime(transaction)
Expand Down Expand Up @@ -88,6 +95,7 @@ class TransactionTableViewCell: Cell<String>, CellType {
}

amountLabel.text = "\(prefix) \(transaction.amountValue.toXvgCurrency())"
amountLabel.sizeToFit()
}
}

Expand Down
36 changes: 12 additions & 24 deletions VergeiOS/Components/TableCellViews/TransactionTableViewCell.xib
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand All @@ -14,50 +12,40 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TransactionTableViewCell" textLabel="jmI-tJ-hUn" detailTextLabel="SuM-2X-Htx" imageView="uIn-Dk-gkQ" rowHeight="70" style="IBUITableViewCellStyleSubtitle" id="KGk-i7-Jjw" customClass="TransactionTableViewCell" customModule="VergeiOS" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="70"/>
<rect key="frame" x="0.0" y="0.0" width="328" height="70"/>
<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="69.5"/>
<rect key="frame" x="0.0" y="0.0" width="328" height="70"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Swen van Zanten" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="jmI-tJ-hUn">
<rect key="frame" x="46" y="15.5" width="111" height="19.5"/>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" text="Swen van Zanten" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jmI-tJ-hUn">
<rect key="frame" x="46" y="16.5" width="111" height="19.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" name="AvenirNext-DemiBold" family="Avenir Next" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="20 Sept 2018 22:10" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="SuM-2X-Htx">
<rect key="frame" x="46" y="37.5" width="91.5" height="14"/>
<autoresizingMask key="autoresizingMask"/>
<rect key="frame" x="46" y="38.5" width="91.5" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/>
<fontDescription key="fontDescription" name="AvenirNext-Medium" family="Avenir Next" pointSize="10"/>
<color key="textColor" name="SecondaryLight"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="+ 4.454.344,56 XVG" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="grk-sH-8uI" customClass="SecureLabel" customModule="VergeiOS" customModuleProvider="target">
<rect key="frame" x="165" y="0.0" width="155" height="70"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="AvenirNext-DemiBold" family="Avenir Next" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" image="Received" id="uIn-Dk-gkQ">
<rect key="frame" x="16" y="27" width="15" height="15"/>
<rect key="frame" x="16" y="27.5" width="15" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</imageView>
</subviews>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="accessoryView" destination="grk-sH-8uI" id="lPd-HW-Zhf"/>
<outlet property="amountLabel" destination="grk-sH-8uI" id="o7U-7B-fwq"/>
</connections>
<point key="canvasLocation" x="144" y="153.82308845577214"/>
</tableViewCell>
</objects>
<resources>
<image name="Received" width="15" height="15"/>
<namedColor name="SecondaryLight">
<color red="0.38823529411764707" green="0.47058823529411764" blue="0.52156862745098043" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.45098039215686275" green="0.5607843137254902" blue="0.62745098039215685" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
2 changes: 2 additions & 0 deletions VergeiOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
</dict>
Expand Down

0 comments on commit 66b2ac7

Please sign in to comment.