Skip to content

Commit

Permalink
Merged in fix/SBA_19AW-5 (pull request wangjwchn#4)
Browse files Browse the repository at this point in the history
SBA_19AW-5 遷移の不備修正(WLT,BNF)
  • Loading branch information
madoka3530 committed Apr 8, 2019
2 parents 4b78ad8 + da336f9 commit 375e4cd
Show file tree
Hide file tree
Showing 12 changed files with 220 additions and 118 deletions.
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 1812bdfd5f973a5435fe30dc05b382acb5415f2b

COCOAPODS: 1.5.3
COCOAPODS: 1.6.1
12 changes: 10 additions & 2 deletions Share Beauty App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@
C9906DD41F2CA70C00414722 /* LifeStyleEighthProductView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C9906DD31F2CA70C00414722 /* LifeStyleEighthProductView.xib */; };
DA0D5F1F22004470006703D5 /* LuxuryLegendaryEnmeiViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA0D5F1E22004470006703D5 /* LuxuryLegendaryEnmeiViewController.storyboard */; };
DA0D5F23220046BF006703D5 /* LuxuryLegendaryEnmeiViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA0D5F22220046BE006703D5 /* LuxuryLegendaryEnmeiViewController.swift */; };
DA208431223BB73400F26773 /* LatestMoisturizerEfficiencyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA208430223BB73400F26773 /* LatestMoisturizerEfficiencyView.swift */; };
DA208435223BB94B00F26773 /* LatestMoisturizerEfficiencyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA208434223BB94B00F26773 /* LatestMoisturizerEfficiencyView.xib */; };
DA22A5D5220AC3C300CF5FEE /* page2_visual_1.png in Resources */ = {isa = PBXBuildFile; fileRef = DA22A5D3220AC22A00CF5FEE /* page2_visual_1.png */; };
DA22A5D6220AC3C800CF5FEE /* page2_visual_2.png in Resources */ = {isa = PBXBuildFile; fileRef = DA22A5D4220AC23000CF5FEE /* page2_visual_2.png */; };
DA22A5D7220AC3CB00CF5FEE /* btn_close@4x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA22A5C1220ABFC500CF5FEE /* btn_close@4x.png */; };
Expand Down Expand Up @@ -1319,6 +1321,8 @@
DA0D5F1D220042FA006703D5 /* page1_visual.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = page1_visual.png; sourceTree = "<group>"; };
DA0D5F1E22004470006703D5 /* LuxuryLegendaryEnmeiViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LuxuryLegendaryEnmeiViewController.storyboard; sourceTree = "<group>"; };
DA0D5F22220046BE006703D5 /* LuxuryLegendaryEnmeiViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LuxuryLegendaryEnmeiViewController.swift; sourceTree = "<group>"; };
DA208430223BB73400F26773 /* LatestMoisturizerEfficiencyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LatestMoisturizerEfficiencyView.swift; sourceTree = "<group>"; };
DA208434223BB94B00F26773 /* LatestMoisturizerEfficiencyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LatestMoisturizerEfficiencyView.xib; sourceTree = "<group>"; };
DA22A5C1220ABFC500CF5FEE /* btn_close@4x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_close@4x.png"; sourceTree = "<group>"; };
DA22A5C4220ABFE900CF5FEE /* btn_next.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = btn_next.png; sourceTree = "<group>"; };
DA22A5C7220AC03500CF5FEE /* page2_lead.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = page2_lead.png; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2544,13 +2548,15 @@
C0998BF11DA63DE500220321 /* PagingProductView.xib */,
EBB3BCD81E9F685B0071FE0F /* ProductDetailSkinConcernView.swift */,
C07B48F91D8EB1E900F5D910 /* ProductDetailTag.swift */,
DA208430223BB73400F26773 /* LatestMoisturizerEfficiencyView.swift */,
C07B48FB1D8EB20600F5D910 /* ProductDetailTag.xib */,
C0E85A671E221F710035CCC4 /* ProductDetailTransitionView.swift */,
C0E85A691E221FAB0035CCC4 /* ProductDetailTransitionView.xib */,
E57BB3261E598C0100D4F5FB /* ProductLineCollectionViewCell.swift */,
C0E4DCBC1D71807500931B66 /* ProductListView.swift */,
C0E4DCBE1D71808F00931B66 /* ProductListView.xib */,
C0A335F11D8035DF006A8FD1 /* ProductView.swift */,
DA208434223BB94B00F26773 /* LatestMoisturizerEfficiencyView.xib */,
C0A335F21D8035DF006A8FD1 /* ProductView.xib */,
C0BC71791DCB41920038AE1A /* RecommendProductView.swift */,
C0BC717A1DCB41920038AE1A /* RecommendProductView.xib */,
Expand Down Expand Up @@ -3783,6 +3789,7 @@
B38F63C31F47682700176804 /* EEBackGround.png in Resources */,
DA22A5E3220AC40000CF5FEE /* page5_lead@4x.png in Resources */,
DEE83E661EB766EF000C7D8D /* LXTechAuraView.xib in Resources */,
DA208435223BB94B00F26773 /* LatestMoisturizerEfficiencyView.xib in Resources */,
E57BB3211E597BE000D4F5FB /* ProductLineViewController.storyboard in Resources */,
DE2C91811E9C682500B5FC4A /* graphPoint_down.png in Resources */,
C0D1953E1DE6E0FF00C8B88E /* WhiteLucentFeaturesView.xib in Resources */,
Expand Down Expand Up @@ -3902,7 +3909,7 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Share Beauty App/Pods-Share Beauty App-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-Share Beauty App/Pods-Share Beauty App-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AImage/AImage.framework",
"${BUILT_PRODUCTS_DIR}/APNGKit/APNGKit.framework",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
Expand All @@ -3925,7 +3932,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Share Beauty App/Pods-Share Beauty App-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Share Beauty App/Pods-Share Beauty App-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -4184,6 +4191,7 @@
ABB9EAC51FCCA3E800D22F9E /* EssentialEnergyEfficacy.swift in Sources */,
C0DA9AEE1DB8CC7E00692058 /* DPDUIView+Extension.swift in Sources */,
C94638D31F18CC45009D1480 /* LoadingView.swift in Sources */,
DA208431223BB73400F26773 /* LatestMoisturizerEfficiencyView.swift in Sources */,
DEBCF6C120746F25001762A9 /* WASOPeelFirstEfficacyResultView.swift in Sources */,
C0880CEC1E4B1E6A006A3713 /* Router.swift in Sources */,
C00D55501DC5D5C0008795D4 /* ScreenSaveViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,21 +255,21 @@
<rect key="frame" x="0.0" y="218.5" width="60" height="129"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i0h-jN-b85" customClass="BaseButton" customModule="Share_Beauty_App" customModuleProvider="target">
<rect key="frame" x="0.0" y="1" width="60" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="60" height="43"/>
<state key="normal" title="Button" image="features_smk_1.png"/>
<connections>
<action selector="onTapMakeUpMorning:" destination="yKP-cJ-zZz" eventType="touchUpInside" id="DUD-3d-ATL"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eVZ-4W-9Cd" customClass="BaseButton" customModule="Share_Beauty_App" customModuleProvider="target">
<rect key="frame" x="0.0" y="44" width="60" height="43"/>
<rect key="frame" x="0.0" y="43" width="60" height="43"/>
<state key="normal" title="Button" image="features_smk_2.png"/>
<connections>
<action selector="onTapMakeUpEvening:" destination="yKP-cJ-zZz" eventType="touchUpInside" id="qoE-bt-qEU"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tbg-YB-PQa" customClass="BaseButton" customModule="Share_Beauty_App" customModuleProvider="target">
<rect key="frame" x="0.0" y="87" width="60" height="43"/>
<rect key="frame" x="0.0" y="86" width="60" height="43"/>
<state key="normal" title="Button" image="features_smk_3.png"/>
<connections>
<action selector="onTapMakeUpNight:" destination="yKP-cJ-zZz" eventType="touchUpInside" id="4F2-e6-UEx"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ class IdealResultViewController: UIViewController, NavigationControllerAnnotatio
nextVc.productId = productId!
nextVc.relationProducts = mProducts.filter {$0.idealBeautyType == Const.idealBeautyTypeProduct}
self.delegate?.nextVc(nextVc)

} else {
let nextVc = UIViewController.GetViewControllerFromStoryboard("ProductDetailViewController", targetClass: ProductDetailViewController.self) as! ProductDetailViewController
nextVc.productId = productId!
Expand Down
10 changes: 10 additions & 0 deletions Share Beauty App/Controllers/ProductDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,7 @@ class ProductDetailViewController: UIViewController, NavigationControllerAnnotat
self.mIsUtmMask = true
} else if mIsLatestMoisturizer {
mCategoryButtonTechnologies.enabled = true
mCategoryButtonEfficacy.enabled = true
}
// } else if productId == 588{
// mCategoryButtonTechnologies.enabled = true
Expand Down Expand Up @@ -1592,6 +1593,15 @@ class ProductDetailViewController: UIViewController, NavigationControllerAnnotat
mVContent.isHidden = false
mVContent.addSubview(self.efficacyGSCScrollV)
mVCurrentSelect = self.efficacyGSCScrollV
}else if mIsLatestMoisturizer{
let nib = UINib(nibName: "LatestMoisturizerEfficiencyView", bundle: nil)
let views = nib.instantiate(withOwner: self, options: nil)

guard let techView = views[0] as? LatestMoisturizerEfficiencyView else { return }
techView.frame = mVContent.frame
techView.setView(productId: self.productId)
mVContent.addSubview(techView)
mVCurrentSelect = techView
}

case mCategoryButtonDefend:
Expand Down
2 changes: 1 addition & 1 deletion Share Beauty App/Views/Ideal/IdealResultCollectionView.xib
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14113"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand Down
4 changes: 2 additions & 2 deletions Share Beauty App/Views/Ideal/IdealSelectCell.xib
Original file line number Diff line number Diff line change
@@ -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" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="ipad9_7" orientation="landscape">
<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="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions Share Beauty App/Views/LX/LXProductEfficacyView.xib
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
Expand Down
145 changes: 145 additions & 0 deletions Share Beauty App/Views/LatestMoisturizerEfficiencyView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
//
// LatestMoisturizerTechView.swift
// Share Beauty App
//
// Created by ryu.ishiduka on 2018/09/27.
// Copyright © 2018年 AQUA Co., Ltd. All rights reserved.
//

import Foundation

class LatestMoisturizerEfficiencyView: UIView {

@IBOutlet weak var mScrollView: UIScrollView!
@IBOutlet weak var mFirstView: UIView!
@IBOutlet weak var mSecondView: UIView!
@IBOutlet weak var mThirdView: UIView!

@IBOutlet weak var mCaseOneView: UIView!
@IBOutlet weak var mCaseTwoView: UIView!

private var firstTitle: UILabel = UILabel()
private var firstSubText: UILabel = UILabel()

private var productId: Int = 0
private var isCase: Int = 0
private let caseOneList: [Int] = [602, 614, 605, 604]
private var textColor: UIColor = UIColor()

override func awakeFromNib() {
super.awakeFromNib()
}

func setView(productId: Int) {
self.productId = productId

if caseOneList.contains(self.productId) {
self.isCase = 1
self.textColor = UIColor(hex: "9c8170", alpha: 1)
} else {
self.isCase = 2
self.textColor = UIColor(hex: "b1457c", alpha: 1)
}
self.setThirdView()
}

private func setThirdView() {
let contryIdsA: [Int] = [21, 4] // EU, Middle East
let contryIdsB: [Int] = [1, 2, 3, 13] // US,Canada,BZ,Australia
let contryIdsC: [Int] = [5, 6, 7, 8, 9, 10, 4] // Asia
let contryIdsD: [Int] = [1, 3, 2, 17, 13, 21] // US,Brazil,Canada,India,Australia,Middle East
//LanguageConfigure.regionId = 1
//LanguageConfigure.countryId = 21


let thirdTitle: UILabel = UILabel()
thirdTitle.frame = CGRect(x: 0, y: 40, width: 0, height: 0)
thirdTitle.text = AppItemTable.getNameByItemId(itemId: 8105)
thirdTitle.font = UIFont(name: "Reader-Bold", size: 32)
thirdTitle.textAlignment = NSTextAlignment.center
thirdTitle.sizeToFit()
thirdTitle.centerX = mThirdView.centerX

var percentY: CGFloat = thirdTitle.bottom + 40
var percentDic: [Int:[String]] = [602:["85%", "80%", "85%"],
614:["89%", "80%", "86%"],
604:["00", "00", "00"],
605:["84%", "82%", "86%"],
606:["90%", "96%", "89%"],
607:["93%", "98%", "86%"],
608:["00", "00", "00"]]

var itemIdDic: [Int: Int] = [602: 8111,
614: 8111,
604: 100,
605: 8124,
606: 8143,
607: 8147,
608: 100]

if contryIdsA.contains(LanguageConfigure.countryId) {
percentDic.updateValue(["94%", "89%", "89%"], forKey: 604)
itemIdDic.updateValue(8116, forKey: 604)
print("country pattern is A")
}
if contryIdsB.contains(LanguageConfigure.countryId) {
percentDic.updateValue(["91%", "93%", "92%"], forKey: 604)
itemIdDic.updateValue(8120, forKey: 604)
print("country pattern is B")
}
if contryIdsC.contains(LanguageConfigure.countryId) {
percentDic.updateValue(["94%", "88%", "94%"], forKey: 608)
itemIdDic.updateValue(8151, forKey: 608)
print("country pattern is C")
}
if contryIdsD.contains(LanguageConfigure.countryId) {
percentDic.updateValue(["100%", "92%", "97%"], forKey: 608)
itemIdDic.updateValue(8155, forKey: 608)
print("country pattern is D")
}

for index in 0...2 {
let percentLabel = UILabel()
percentLabel.frame = CGRect(x: mThirdView.centerX - 250, y: percentY, width: 0, height: 0)
percentLabel.font = UIFont(name: "Reader-Bold", size: 80)
percentLabel.textColor = self.textColor

percentLabel.text = percentDic[self.productId]?[index]
percentLabel.sizeToFit()
percentY = percentLabel.bottom + 20

let description = UILabel()
description.frame = CGRect(x: percentLabel.right + 20, y: 0, width: 400, height: 0)
description.font = UIFont(name: "Reader", size: 18)
description.text = AppItemTable.getNameByItemId(itemId: itemIdDic[self.productId]! + index)
description.numberOfLines = 0
description.lineBreakMode = NSLineBreakMode.byWordWrapping
description.sizeToFit()
description.centerY = percentLabel.centerY - 5

mThirdView.addSubview(percentLabel)
mThirdView.addSubview(description)
}

let copyLabel: UILabel = UILabel()
copyLabel.frame = CGRect(x: 0, y: 0, width: 200, height: 0)
copyLabel.font = UIFont(name: "Reader", size: 11)
copyLabel.textColor = UIColor.lightGray
if productId == 614 {
copyLabel.text = AppItemTable.getNameByItemId(itemId: itemIdDic[self.productId]! + 4)
} else {
copyLabel.text = AppItemTable.getNameByItemId(itemId: itemIdDic[self.productId]! + 3)
}
copyLabel.numberOfLines = 0
copyLabel.lineBreakMode = NSLineBreakMode.byWordWrapping
copyLabel.textAlignment = NSTextAlignment.right
copyLabel.sizeToFit()
copyLabel.right = mThirdView.right - 50
copyLabel.bottom = mThirdView.bottom - 30



mThirdView.addSubview(thirdTitle)
mThirdView.addSubview(copyLabel)
}
}

0 comments on commit 375e4cd

Please sign in to comment.