Skip to content

Commit

Permalink
modify tx detail ui & webview ui
Browse files Browse the repository at this point in the history
  • Loading branch information
iwbrhwfy committed Apr 26, 2018
1 parent 39e6bb4 commit f4c03e5
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 3,156 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -19,6 +19,7 @@ DerivedData/
*.perspectivev3
!default.perspectivev3
xcuserdata/
project.pbxproj

## Other
*.moved-aside
Expand Down
3,134 changes: 0 additions & 3,134 deletions loopr-ios.xcodeproj/project.pbxproj

This file was deleted.

8 changes: 8 additions & 0 deletions loopr-ios.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Expand Up @@ -139,6 +139,7 @@ class AssetTransactionDetailViewController: UIViewController {
titleLabel.font = UIFont.init(name: FontConfigManager.shared.getLight(), size: 30)
titleLabel.textColor = UIColor(red: 102/255, green: 102/255, blue: 102/255, alpha: 1)
amountLabel.font = UIFont.init(name: FontConfigManager.shared.getRegular(), size: 40)

amountLabel.textColor = Themes.isNight() ? UIColor.white : UIColor.black
amountInCurrencyLabel.font = UIFont.init(name: FontConfigManager.shared.getLight(), size: 20)
amountInCurrencyLabel.textColor = UIColor(red: 102/255, green: 102/255, blue: 102/255, alpha: 1)
Expand All @@ -152,25 +153,25 @@ class AssetTransactionDetailViewController: UIViewController {
} else if tx.type == .received {
etherUrl += tx.from
}
}
if let url = URL(string: etherUrl) {
let viewController = AssetTransactionWebViewController()
viewController.url = url
viewController.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(viewController, animated: true)
if let url = URL(string: etherUrl) {
let viewController = AssetTransactionWebViewController()
viewController.url = url
viewController.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(viewController, animated: true)
}
}
}

@objc func pressedButton2(_ sender: Any) {
var etherUrl = "https://etherscan.io/tx/"
if let tx = self.transaction {
etherUrl += tx.txHash
}
if let url = URL(string: etherUrl) {
let viewController = AssetTransactionWebViewController()
viewController.url = url
viewController.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(viewController, animated: true)
if let url = URL(string: etherUrl) {
let viewController = AssetTransactionWebViewController()
viewController.url = url
viewController.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(viewController, animated: true)
}
}
}

Expand Down
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" 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="13772"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand All @@ -32,20 +32,20 @@
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Received" translatesAutoresizingMaskIntoConstraints="NO" id="38X-Nk-VNp">
<rect key="frame" x="142" y="100" width="90" height="90"/>
<rect key="frame" x="142.5" y="116.5" width="90" height="90"/>
<constraints>
<constraint firstAttribute="height" constant="90" id="bfX-Kf-vW5"/>
<constraint firstAttribute="width" constant="90" id="djp-Up-PoI"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="49,459.304 LRC" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6s8-27-c3t">
<rect key="frame" x="76" y="239.5" width="223.5" height="36"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="49,459.304 LRC" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6s8-27-c3t">
<rect key="frame" x="16" y="274" width="343" height="36"/>
<fontDescription key="fontDescription" type="system" pointSize="30"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="≈ $4939.56" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iO9-rV-377">
<rect key="frame" x="142" y="298.5" width="91.5" height="21"/>
<rect key="frame" x="142.5" y="333" width="91.5" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
Expand All @@ -56,12 +56,13 @@
<constraint firstItem="38X-Nk-VNp" firstAttribute="centerX" secondItem="iO9-rV-377" secondAttribute="centerX" id="0KD-UR-1kC"/>
<constraint firstItem="Ew9-jM-zZY" firstAttribute="centerY" secondItem="fnl-2z-Ty3" secondAttribute="centerY" multiplier="0.2" id="Arw-Fb-fNT"/>
<constraint firstItem="Ew9-jM-zZY" firstAttribute="width" secondItem="i5M-Pr-FkT" secondAttribute="width" id="Dwm-hZ-Ok8"/>
<constraint firstItem="6s8-27-c3t" firstAttribute="centerY" secondItem="fnl-2z-Ty3" secondAttribute="centerY" multiplier="0.75" id="Lq2-fV-ls9"/>
<constraint firstItem="38X-Nk-VNp" firstAttribute="centerX" secondItem="6s8-27-c3t" secondAttribute="centerX" id="Qi3-pC-wFe"/>
<constraint firstItem="iO9-rV-377" firstAttribute="centerY" secondItem="fnl-2z-Ty3" secondAttribute="centerY" multiplier="0.9" id="aeq-Rp-ETB"/>
<constraint firstItem="6s8-27-c3t" firstAttribute="centerY" secondItem="fnl-2z-Ty3" secondAttribute="centerY" multiplier="0.85" id="Lq2-fV-ls9"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="6s8-27-c3t" secondAttribute="trailing" constant="16" id="OlF-Pe-ZZm"/>
<constraint firstItem="iO9-rV-377" firstAttribute="centerY" secondItem="fnl-2z-Ty3" secondAttribute="centerY" id="aeq-Rp-ETB"/>
<constraint firstItem="6s8-27-c3t" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="16" id="erK-2J-uYa"/>
<constraint firstItem="Ew9-jM-zZY" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="fwD-EG-zh0"/>
<constraint firstItem="38X-Nk-VNp" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="iUL-a8-0uI"/>
<constraint firstItem="38X-Nk-VNp" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="centerY" multiplier="0.3" id="jfv-y8-YID"/>
<constraint firstItem="38X-Nk-VNp" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="centerY" multiplier="0.35" id="jfv-y8-YID"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="34.5" y="124.5"/>
Expand Down
Expand Up @@ -18,7 +18,11 @@ class AssetTransactionWebViewController: UIViewController {
super.viewDidLoad()

// Do any additional setup after loading the view.

setBackButton()
self.navigationItem.title = "Etherscan.io"
view.theme_backgroundColor = ["#fff", "#000"]

let request = URLRequest(url: url!)
wkWebView.load(request)
}
Expand Down

0 comments on commit f4c03e5

Please sign in to comment.