Commit 39541fe2 by houweibin

1,新商品详情页。(部分API未提供,因此未接入,不在1.4版本更新计划中,该页面暂不显示出来,仍显示旧商品详情页面。)

parent 53bc6d92
......@@ -222,6 +222,19 @@
C08FDA2A1D9B583400EBDB0D /* KWMGiftCardVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C08FDA291D9B583400EBDB0D /* KWMGiftCardVC.m */; };
C091EE331DDB1FC500A382B9 /* KWMAppVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = C091EE321DDB1FC500A382B9 /* KWMAppVersion.m */; };
C091EE361DDEEA9400A382B9 /* KWMVariants.m in Sources */ = {isa = PBXBuildFile; fileRef = C091EE351DDEEA9400A382B9 /* KWMVariants.m */; };
C0A6B3BE1F01FC5300D85673 /* KWMFirstDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A6B3AB1F01FC5300D85673 /* KWMFirstDetailView.m */; };
C0A6B3BF1F01FC5300D85673 /* KWMFirstDetailView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0A6B3AC1F01FC5300D85673 /* KWMFirstDetailView.xib */; };
C0A6B3C01F01FC5300D85673 /* KWMProductColorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A6B3AE1F01FC5300D85673 /* KWMProductColorCell.m */; };
C0A6B3C11F01FC5300D85673 /* KWMProductColorCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0A6B3AF1F01FC5300D85673 /* KWMProductColorCell.xib */; };
C0A6B3C21F01FC5300D85673 /* KWMProductSizeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A6B3B11F01FC5300D85673 /* KWMProductSizeCell.m */; };
C0A6B3C31F01FC5300D85673 /* KWMProductSizeCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0A6B3B21F01FC5300D85673 /* KWMProductSizeCell.xib */; };
C0A6B3C41F01FC5300D85673 /* KWMSecondDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A6B3B41F01FC5300D85673 /* KWMSecondDetailView.m */; };
C0A6B3C51F01FC5300D85673 /* KWMSecondDetailView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0A6B3B51F01FC5300D85673 /* KWMSecondDetailView.xib */; };
C0A6B3C61F01FC5300D85673 /* KWMThirdDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A6B3B71F01FC5300D85673 /* KWMThirdDetailView.m */; };
C0A6B3C71F01FC5300D85673 /* KWMThirdDetailView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0A6B3B81F01FC5300D85673 /* KWMThirdDetailView.xib */; };
C0A6B3C81F01FC5300D85673 /* KWMNewProductVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A6B3BA1F01FC5300D85673 /* KWMNewProductVC.m */; };
C0A6B3C91F01FC5300D85673 /* KWMVariantsVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A6B3BC1F01FC5300D85673 /* KWMVariantsVC.m */; };
C0A6B3CA1F01FC5300D85673 /* NewProduct.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C0A6B3BD1F01FC5300D85673 /* NewProduct.storyboard */; };
C0AF039A1DD5BFB20060623F /* UIViewController+BackButtonHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AF03991DD5BFB20060623F /* UIViewController+BackButtonHandler.m */; };
C0AF039E1DD5C8EE0060623F /* KWMNeedAddressView.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AF039C1DD5C8EE0060623F /* KWMNeedAddressView.m */; };
C0AF039F1DD5C8EE0060623F /* KWMNeedAddressView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0AF039D1DD5C8EE0060623F /* KWMNeedAddressView.xib */; };
......@@ -710,6 +723,26 @@
C091EE321DDB1FC500A382B9 /* KWMAppVersion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMAppVersion.m; sourceTree = "<group>"; };
C091EE341DDEEA9400A382B9 /* KWMVariants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMVariants.h; sourceTree = "<group>"; };
C091EE351DDEEA9400A382B9 /* KWMVariants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMVariants.m; sourceTree = "<group>"; };
C0A6B3AA1F01FC5300D85673 /* KWMFirstDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMFirstDetailView.h; sourceTree = "<group>"; };
C0A6B3AB1F01FC5300D85673 /* KWMFirstDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMFirstDetailView.m; sourceTree = "<group>"; };
C0A6B3AC1F01FC5300D85673 /* KWMFirstDetailView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMFirstDetailView.xib; sourceTree = "<group>"; };
C0A6B3AD1F01FC5300D85673 /* KWMProductColorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMProductColorCell.h; sourceTree = "<group>"; };
C0A6B3AE1F01FC5300D85673 /* KWMProductColorCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMProductColorCell.m; sourceTree = "<group>"; };
C0A6B3AF1F01FC5300D85673 /* KWMProductColorCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMProductColorCell.xib; sourceTree = "<group>"; };
C0A6B3B01F01FC5300D85673 /* KWMProductSizeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMProductSizeCell.h; sourceTree = "<group>"; };
C0A6B3B11F01FC5300D85673 /* KWMProductSizeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMProductSizeCell.m; sourceTree = "<group>"; };
C0A6B3B21F01FC5300D85673 /* KWMProductSizeCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMProductSizeCell.xib; sourceTree = "<group>"; };
C0A6B3B31F01FC5300D85673 /* KWMSecondDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMSecondDetailView.h; sourceTree = "<group>"; };
C0A6B3B41F01FC5300D85673 /* KWMSecondDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMSecondDetailView.m; sourceTree = "<group>"; };
C0A6B3B51F01FC5300D85673 /* KWMSecondDetailView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMSecondDetailView.xib; sourceTree = "<group>"; };
C0A6B3B61F01FC5300D85673 /* KWMThirdDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMThirdDetailView.h; sourceTree = "<group>"; };
C0A6B3B71F01FC5300D85673 /* KWMThirdDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMThirdDetailView.m; sourceTree = "<group>"; };
C0A6B3B81F01FC5300D85673 /* KWMThirdDetailView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMThirdDetailView.xib; sourceTree = "<group>"; };
C0A6B3B91F01FC5300D85673 /* KWMNewProductVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMNewProductVC.h; sourceTree = "<group>"; };
C0A6B3BA1F01FC5300D85673 /* KWMNewProductVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMNewProductVC.m; sourceTree = "<group>"; };
C0A6B3BB1F01FC5300D85673 /* KWMVariantsVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMVariantsVC.h; sourceTree = "<group>"; };
C0A6B3BC1F01FC5300D85673 /* KWMVariantsVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMVariantsVC.m; sourceTree = "<group>"; };
C0A6B3BD1F01FC5300D85673 /* NewProduct.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NewProduct.storyboard; sourceTree = "<group>"; };
C0AF03981DD5BFB20060623F /* UIViewController+BackButtonHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+BackButtonHandler.h"; path = "EGO/UIViewController+BackButtonHandler.h"; sourceTree = "<group>"; };
C0AF03991DD5BFB20060623F /* UIViewController+BackButtonHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+BackButtonHandler.m"; path = "EGO/UIViewController+BackButtonHandler.m"; sourceTree = "<group>"; };
C0AF039B1DD5C8EE0060623F /* KWMNeedAddressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMNeedAddressView.h; sourceTree = "<group>"; };
......@@ -1251,6 +1284,7 @@
C034E6C31D6AECF9006EE129 /* UI */ = {
isa = PBXGroup;
children = (
C0A6B3A81F01FC5300D85673 /* NewProduct */,
C0243BAE1EFBD5A10013CFA7 /* Category */,
C0F586411E24F820001248E2 /* Product */,
C034E7B41D6B0805006EE129 /* Home */,
......@@ -1797,6 +1831,41 @@
path = Cell;
sourceTree = "<group>";
};
C0A6B3A81F01FC5300D85673 /* NewProduct */ = {
isa = PBXGroup;
children = (
C0A6B3A91F01FC5300D85673 /* Cell */,
C0A6B3B91F01FC5300D85673 /* KWMNewProductVC.h */,
C0A6B3BA1F01FC5300D85673 /* KWMNewProductVC.m */,
C0A6B3BB1F01FC5300D85673 /* KWMVariantsVC.h */,
C0A6B3BC1F01FC5300D85673 /* KWMVariantsVC.m */,
C0A6B3BD1F01FC5300D85673 /* NewProduct.storyboard */,
);
path = NewProduct;
sourceTree = "<group>";
};
C0A6B3A91F01FC5300D85673 /* Cell */ = {
isa = PBXGroup;
children = (
C0A6B3AA1F01FC5300D85673 /* KWMFirstDetailView.h */,
C0A6B3AB1F01FC5300D85673 /* KWMFirstDetailView.m */,
C0A6B3AC1F01FC5300D85673 /* KWMFirstDetailView.xib */,
C0A6B3AD1F01FC5300D85673 /* KWMProductColorCell.h */,
C0A6B3AE1F01FC5300D85673 /* KWMProductColorCell.m */,
C0A6B3AF1F01FC5300D85673 /* KWMProductColorCell.xib */,
C0A6B3B01F01FC5300D85673 /* KWMProductSizeCell.h */,
C0A6B3B11F01FC5300D85673 /* KWMProductSizeCell.m */,
C0A6B3B21F01FC5300D85673 /* KWMProductSizeCell.xib */,
C0A6B3B31F01FC5300D85673 /* KWMSecondDetailView.h */,
C0A6B3B41F01FC5300D85673 /* KWMSecondDetailView.m */,
C0A6B3B51F01FC5300D85673 /* KWMSecondDetailView.xib */,
C0A6B3B61F01FC5300D85673 /* KWMThirdDetailView.h */,
C0A6B3B71F01FC5300D85673 /* KWMThirdDetailView.m */,
C0A6B3B81F01FC5300D85673 /* KWMThirdDetailView.xib */,
);
path = Cell;
sourceTree = "<group>";
};
C0CC13FA1D7823B0007B5986 /* Cell */ = {
isa = PBXGroup;
children = (
......@@ -2129,11 +2198,13 @@
C02C7DB51E67B56D008DC29C /* KWMFilterHeaderView.xib in Resources */,
C0CCB3D21EEA765B00BC2FB8 /* KWMNormalFilterTab.xib in Resources */,
C034E8671D6B10A0006EE129 /* PhotoItemView.xib in Resources */,
C0A6B3C31F01FC5300D85673 /* KWMProductSizeCell.xib in Resources */,
C0DD533A1EE55190002D1E0C /* KWMSplashView.xib in Resources */,
8091DFA31D6E8CCA0020519C /* Guide.storyboard in Resources */,
80F82E4F1D701F82008B470B /* Brand.storyboard in Resources */,
C0F5869D1E25D3B6001248E2 /* KWMProductDetailView.xib in Resources */,
C034E69D1D6AEB12006EE129 /* LaunchScreen.storyboard in Resources */,
C0A6B3C11F01FC5300D85673 /* KWMProductColorCell.xib in Resources */,
80E844291D7FB1130042AED2 /* KWMRuleView.xib in Resources */,
C034E6F61D6AF197006EE129 /* KWMPickView.xib in Resources */,
C0F586771E24F820001248E2 /* KWMCollectionCell.xib in Resources */,
......@@ -2164,6 +2235,8 @@
C0DD53151EE54B96002D1E0C /* KWMSearchBrandView.xib in Resources */,
80C801511D78136400002306 /* KWMTBVSectionHeardView.xib in Resources */,
80F82E621D704E34008B470B /* KWMBrandCell.xib in Resources */,
C0A6B3CA1F01FC5300D85673 /* NewProduct.storyboard in Resources */,
C0A6B3BF1F01FC5300D85673 /* KWMFirstDetailView.xib in Resources */,
801230F81DD32B49008C7904 /* KWMInformationView.xib in Resources */,
C034E69A1D6AEB12006EE129 /* Assets.xcassets in Resources */,
C034E8691D6B10A0006EE129 /* PhotoBroswerVC.xib in Resources */,
......@@ -2173,8 +2246,10 @@
C0CCB3BA1EEA579900BC2FB8 /* KWMFilterView.xib in Resources */,
C0CCB3C21EEA59A200BC2FB8 /* KWMFilterViewCell.xib in Resources */,
C0CC14171D79826F007B5986 /* KWMAddressCell.xib in Resources */,
C0A6B3C71F01FC5300D85673 /* KWMThirdDetailView.xib in Resources */,
804771821D6D32A70086B4DC /* Login.storyboard in Resources */,
C0DD53241EE55062002D1E0C /* KWMCarCountView.xib in Resources */,
C0A6B3C51F01FC5300D85673 /* KWMSecondDetailView.xib in Resources */,
C0F5868B1E24F820001248E2 /* New.storyboard in Resources */,
C02C7DA81E66B2AE008DC29C /* KWMFilterCell.xib in Resources */,
);
......@@ -2259,17 +2334,21 @@
C034E84C1D6B10A0006EE129 /* UIImage+Extend.m in Sources */,
C0CC141A1D79847A007B5986 /* KWMSelectAddressVC.m in Sources */,
C034E7001D6AF205006EE129 /* KWMButton.m in Sources */,
C0A6B3C91F01FC5300D85673 /* KWMVariantsVC.m in Sources */,
C0F5867A1E24F820001248E2 /* KWMDoubleTitleView.m in Sources */,
C0A6B3C01F01FC5300D85673 /* KWMProductColorCell.m in Sources */,
8091DFBB1D6EC1DD0020519C /* KWMThreeView.m in Sources */,
C0DD53371EE55190002D1E0C /* KWMLoadingView.m in Sources */,
9B01488E1EF3B8760056D937 /* KWMSelectCurrencyCell.m in Sources */,
C03120B01EF2B26B00E49EFA /* KWMPayUtil.m in Sources */,
9BE61CFB1ECD56E70031D21E /* KWMDictioaryResult.m in Sources */,
C034E6D81D6AEF1B006EE129 /* KWMImageUtil.m in Sources */,
C0A6B3BE1F01FC5300D85673 /* KWMFirstDetailView.m in Sources */,
C048B8E21EF3C04B000DA7AF /* KWMBeforePayData.m in Sources */,
C03846941DB89EEB008C3BAB /* KWMCemaroseResult.m in Sources */,
C0F586951E25C17A001248E2 /* KWMProductDetailVC.m in Sources */,
C0F586871E24F820001248E2 /* KWMNewTypeSelectedVC.m in Sources */,
C0A6B3C61F01FC5300D85673 /* KWMThirdDetailView.m in Sources */,
80598D471D99193400BF0F97 /* KWMInformationVC.m in Sources */,
C034E7B91D6B0A8D006EE129 /* KWMHomeVC.m in Sources */,
C0CCB3BD1EEA589200BC2FB8 /* KWMFilter.m in Sources */,
......@@ -2303,6 +2382,7 @@
8091DFB31D6EADE60020519C /* KWMSecondView.m in Sources */,
C034E8501D6B10A0006EE129 /* UIView+Extend.m in Sources */,
C0CCB3CF1EEA765B00BC2FB8 /* KWMFilterTabItem.m in Sources */,
C0A6B3C81F01FC5300D85673 /* KWMNewProductVC.m in Sources */,
80ED0A4C1D93B99E00B28DF2 /* KWMShopCartData.m in Sources */,
C034E85C1D6B10A0006EE129 /* UIView+PBExtend.m in Sources */,
C0F5867E1E24F820001248E2 /* KWMNewGoodsCell.m in Sources */,
......@@ -2312,6 +2392,7 @@
C034E8421D6B10A0006EE129 /* NSArray+Extend.m in Sources */,
C034E85B1D6B10A0006EE129 /* LFRoundProgressView.m in Sources */,
80F82E611D704E34008B470B /* KWMBrandCell.m in Sources */,
C0A6B3C41F01FC5300D85673 /* KWMSecondDetailView.m in Sources */,
9B8298E61EF237FC00743438 /* NSDecimalNumber+Currency.m in Sources */,
C034E6F51D6AF197006EE129 /* KWMPickView.m in Sources */,
C034E8651D6B10A0006EE129 /* PhotoImageView.m in Sources */,
......@@ -2350,6 +2431,7 @@
C0DD53391EE55190002D1E0C /* KWMSplashView.m in Sources */,
80E844271D7FB0FF0042AED2 /* KWMRuleView.m in Sources */,
8031DA991D8268CD00349869 /* KWMForgetPasswordVC.m in Sources */,
C0A6B3C21F01FC5300D85673 /* KWMProductSizeCell.m in Sources */,
C0F586801E24F820001248E2 /* KWMNewTypeView.m in Sources */,
80ED0A481D93B82F00B28DF2 /* KWMShopCartItem+CoreDataClass.m in Sources */,
C034E84F1D6B10A0006EE129 /* UITableViewCell+Extend.m in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_like@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_like@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_like_1@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_like_1@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_new_share@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_new_share@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_product_14day@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_product_14day@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_product_gift@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_product_gift@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_product_real@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_product_real@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_selected_color@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_selected_color@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "test_home_cloth_2@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "test_home_cloth_2@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "test_product_detail@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "test_product_detail@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -8,6 +8,7 @@
#import "KWMCategoryVC.h"
#import "KWMProductDetailVC.h"
#import "KWMNewProductVC.h"
#import "KWMLeftCategoryCell.h"
#import "KWMRightProductCell.h"
#import "KWMBrandsTypeModel.h"
......@@ -130,7 +131,7 @@
#pragma mark - UICollectionViewDelegate
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
KWMProductDetailVC *productDetailVC = (KWMProductDetailVC *)[KWMProductDetailVC findControllerBy:[KWMProductDetailVC kwmTag] fromStoryboard:@"New"];
KWMNewProductVC *productDetailVC = (KWMNewProductVC *)[KWMNewProductVC findControllerBy:[KWMNewProductVC kwmTag] fromStoryboard:@"NewProduct"];
BUYProduct *product = (BUYProduct *)[self.refreshUtil.dataList objectAtIndex:indexPath.row];
productDetailVC.product = product;
[self.navigationController pushViewController:productDetailVC animated:YES];
......
//
// KWMProductDetailView.h
// iCemarose
//
// Created by HouWeiBin on 2017/1/11.
// Copyright © 2017年 kollway. All rights reserved.
//
#import "Buy/Buy.h"
@protocol KWMFirstDetailViewDelegate <NSObject>
- (void)kwm_onClickImage:(NSMutableArray *)imageArr currentIndex:(NSInteger)currentIndex;
- (void)kwm_onClickSizeBtn;
- (void)kwm_goToBrandVC;
@end
@interface KWMFirstDetailView : UIView
@property (weak, nonatomic) id<KWMFirstDetailViewDelegate>delegate;
-(void)setData:(BUYProduct *)product;
@end
//
// KWMProductDetailView.m
// iCemarose
//
// Created by HouWeiBin on 2017/1/11.
// Copyright © 2017年 kollway. All rights reserved.
//
#import "KWMFirstDetailView.h"
#import "KWMImageUtil.h"
#import "KWMStringUtil.h"
#import "KWMPageControl.h"
#import "YYWebImage/YYWebImage.h"
@interface KWMFirstDetailView ()<UIScrollViewDelegate>
@property(nonatomic,weak) IBOutlet UIView *vView;
@property(nonatomic,weak) IBOutlet UIScrollView *imageScrollView;
@property(nonatomic,weak) IBOutlet UIButton *btnBrand;
@property(nonatomic,weak) IBOutlet UILabel *lbName;
@property(nonatomic,weak) IBOutlet UILabel *lbPrice;
@property(nonatomic,weak) IBOutlet UILabel *lbOldPrice;
@property(nonatomic,weak) IBOutlet UILabel *lbDetail;
//单位label
@property(nonatomic,weak) IBOutlet UILabel *lbUnit;
@property(nonatomic,weak) IBOutlet KWMPageControl *pageControl;
@property (nonatomic) BUYProduct *product;
@property (nonatomic) NSMutableArray *imageArr;
@property (nonatomic) NSTimer *timer;
@property (nonatomic) BOOL isFirstScroll;
@property (nonatomic) BOOL isShowCNY;
- (IBAction)onClickSizeBtn:(id)sender;
- (IBAction)onClickBlandBtn:(id)sender;
@end
@implementation KWMFirstDetailView
- (id)init{
if (self=[super init]){
[self addView];
}
return self;
}
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
[self addView];
}
return self;
}
-(instancetype)initWithFrame:(CGRect)frame{
if (self =[super initWithFrame:frame]) {
[self addView];
}
return self;
}
-(void)awakeFromNib{
[super awakeFromNib];
}
-(void) addView{
[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class])
owner:self
options:nil];
NSLog(@"KWMProductDetailView%f%f",self.frame.size.width,self.frame.size.height);
self.vView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
[self addSubview:self.vView];
}
-(void) addTimer{
if ([self.timer isValid]) {
return;
}
self.timer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(doTimer) userInfo:nil repeats:YES];
[self.timer setFireDate:[NSDate new]];//开启
}
-(void) removeTimer{
//结束
if ([self.timer isValid]) {
[self.timer invalidate];
self.timer = nil;
}
}
//开始计时
-(void) doTimer{
if (self.isFirstScroll) {
self.isFirstScroll = NO;
return;
}
NSInteger currentIndex = self.pageControl.currentPage;
currentIndex ++;
currentIndex = currentIndex % self.pageControl.numberOfPages;
[self.imageScrollView setContentOffset:CGPointMake(UI_SCREEN_WIDTH * currentIndex, 0) animated:YES];
self.pageControl.currentPage = currentIndex;
}
-(void)setData:(BUYProduct *)product{
if(product == nil){
return;
}
self.isShowCNY = YES;
self.isFirstScroll = YES;
[self removeTimer];
self.product = product;
self.imageScrollView.delegate = self;
[self.imageScrollView setContentOffset:CGPointMake(0, 0) animated:NO];
for (UIView *subview in self.imageScrollView.subviews) {
[subview removeFromSuperview];
}
[self initImage:product];
[self initView:product];
//[self addTimer];
}
-(void)initImage:(BUYProduct *)product{
if(product == nil){
return;
}
NSInteger imageCount = product.imagesArray == nil? 0:product.imagesArray.count;
self.imageArr = [NSMutableArray array];
CGFloat w = UI_SCREEN_WIDTH;
CGFloat h = UI_SCREEN_WIDTH;
for( int i =0;i < imageCount;i++){
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(i*w, 0, w, h)];
imageView.tag = i;
imageView.contentMode = UIViewContentModeScaleAspectFit;
imageView.clipsToBounds = YES;
NSString *imageUrl = [KWMImageUtil getProductImageUrlByPosition:self.product ImageSize:BigImage Position:i];
[self.imageArr addObject:imageUrl];
NSURL *imageURL = [NSURL URLWithString:imageUrl];
UITapGestureRecognizer *imageTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onClickImage:)];
imageView.userInteractionEnabled = YES;
[imageView addGestureRecognizer:imageTap];
if(i + 1 == imageCount){
[imageView yy_setImageWithURL:imageURL placeholder:nil options:YYWebImageOptionProgressive completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) {
if(image && !error){
[self performSelector:@selector(addTimer) withObject:nil afterDelay:0.5f];
}
}];
}else{
[imageView yy_setImageWithURL:imageURL options:YYWebImageOptionProgressive];
}
[self.imageScrollView addSubview:imageView];
}
self.pageControl.numberOfPages = imageCount;
self.pageControl.currentPage = 0;
// [self.pageControl setValue:[UIImage imageNamed:@"ic_page_2"] forKey:@"_currentPageImage"];
// [self.pageControl setValue:[UIImage imageNamed:@"ic_page_1"] forKey:@"_pageImage"];
self.pageControl.defaultImage = [UIImage imageNamed:@"ic_page_1"];
self.pageControl.currentImage = [UIImage imageNamed:@"ic_page_2"];
self.imageScrollView.contentSize = CGSizeMake(w*imageCount,0);
self.imageScrollView.pagingEnabled = YES;
}
-(void)initView:(BUYProduct *)product{
if(product == nil){
return;
}
[self.btnBrand setTitle:product.vendor forState:UIControlStateNormal];
self.lbName.text = product.title;
BUYProductVariant *productVariant= product.variants.firstObject;
NSAttributedString *detailAttr = [[NSAttributedString alloc] initWithData:[self.product.htmlDescription dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
self.lbDetail.attributedText = detailAttr;
self.lbPrice.text = [KWMStringUtil price:productVariant.price];
if (productVariant.compareAtPrice) {
NSString *priceString = [NSString stringWithFormat:@"¥%@",[KWMStringUtil price:productVariant.compareAtPrice]];
NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:priceString attributes:attribtDic];
self.lbOldPrice.attributedText = attribtStr;
}else{
self.lbOldPrice.hidden = YES;
}
UITapGestureRecognizer *priceTap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onClickPrice:)];
UITapGestureRecognizer *priceTap2 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onClickPrice:)];
UITapGestureRecognizer *priceTap3 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onClickPrice:)];
[self.lbUnit addGestureRecognizer:priceTap1];
[self.lbPrice addGestureRecognizer:priceTap2];
[self.lbOldPrice addGestureRecognizer:priceTap3];
self.lbUnit.userInteractionEnabled = YES;
self.lbPrice.userInteractionEnabled = YES;
self.lbOldPrice.userInteractionEnabled = YES;
}
-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
NSInteger index = fabs(scrollView.contentOffset.x)/scrollView.frame.size.width;
[self.pageControl setCurrentPage:index];
}
-(void)onClickImage:(UITapGestureRecognizer *)tapGesture{
if(self.delegate!=nil){
UIView *view = [tapGesture view];
[self.delegate kwm_onClickImage:self.imageArr currentIndex:view.tag];
}
}
-(void)onClickPrice:(UITapGestureRecognizer *)tapGesture{
if(self.product == nil){
return;
}
self.isShowCNY = !self.isShowCNY;
BUYProductVariant *productVariant= self.product.variants.firstObject;
if(self.isShowCNY){
self.lbUnit.text = @"¥";
self.lbPrice.text = [KWMStringUtil price:productVariant.price];
if (productVariant.compareAtPrice) {
NSString *priceString = [NSString stringWithFormat:@"¥%@",[KWMStringUtil price:productVariant.compareAtPrice]];
NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:priceString attributes:attribtDic];
self.lbOldPrice.attributedText = attribtStr;
}
}else{
self.lbUnit.text = @"€";
self.lbPrice.text = productVariant.price.stringValue;
if (productVariant.compareAtPrice) {
NSString *priceString = [NSString stringWithFormat:@"€%@",productVariant.compareAtPrice.stringValue];
NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:priceString attributes:attribtDic];
self.lbOldPrice.attributedText = attribtStr;
}
}
}
-(void)onClickSizeBtn:(id)sender{
if(self.delegate!=nil){
[self.delegate kwm_onClickSizeBtn];
}
}
-(void)onClickBlandBtn:(id)sender{
if(self.delegate!=nil){
[self.delegate kwm_goToBrandVC];
}
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KWMFirstDetailView">
<connections>
<outlet property="btnBrand" destination="s6N-a3-C4Z" id="ips-Jp-qG3"/>
<outlet property="imageScrollView" destination="h8J-3U-wMB" id="MbO-M3-YVy"/>
<outlet property="lbName" destination="SQm-rY-OyA" id="Fux-pg-fca"/>
<outlet property="lbOldPrice" destination="Mql-V1-hiE" id="Sh1-Fz-sfU"/>
<outlet property="lbPrice" destination="gpT-Sg-ghu" id="FGd-AA-Yiv"/>
<outlet property="lbUnit" destination="wfT-JC-g9d" id="MSn-kd-aQ2"/>
<outlet property="pageControl" destination="M6v-TN-2WE" id="QPe-TI-LdG"/>
<outlet property="vView" destination="iN0-l3-epB" id="TQD-W9-jEg"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1H6-J2-jj4" userLabel="vContent">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lKe-L4-ROK" userLabel="vTop">
<rect key="frame" x="0.0" y="0.0" width="375" height="462"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h8J-3U-wMB">
<rect key="frame" x="0.0" y="43.5" width="375" height="375"/>
<constraints>
<constraint firstAttribute="width" secondItem="h8J-3U-wMB" secondAttribute="height" multiplier="1:1" id="xTw-hD-9tf"/>
</constraints>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<gestureRecognizers/>
<constraints>
<constraint firstItem="h8J-3U-wMB" firstAttribute="centerY" secondItem="lKe-L4-ROK" secondAttribute="centerY" id="ZGl-tQ-ba8"/>
<constraint firstAttribute="trailing" secondItem="h8J-3U-wMB" secondAttribute="trailing" id="meb-bD-9hK"/>
<constraint firstItem="h8J-3U-wMB" firstAttribute="leading" secondItem="lKe-L4-ROK" secondAttribute="leading" id="snn-ZQ-b7q"/>
</constraints>
</view>
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="M6v-TN-2WE" customClass="KWMPageControl">
<rect key="frame" x="168" y="462" width="39" height="10"/>
<constraints>
<constraint firstAttribute="height" constant="10" id="n7t-N5-xKa"/>
</constraints>
</pageControl>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ymw-Cg-156" userLabel="vBottom">
<rect key="frame" x="0.0" y="472" width="375" height="195"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iJa-Oj-Sd2" userLabel="商品数据">
<rect key="frame" x="0.0" y="0.0" width="375" height="130"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="s6N-a3-C4Z">
<rect key="frame" x="21" y="0.0" width="333" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="Toj-nJ-jse"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Light" family="PingFang SC" pointSize="21"/>
<state key="normal" title="品牌名 ">
<color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="onClickBlandBtn:" destination="-1" eventType="touchUpInside" id="MTC-eM-zpB"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="商品名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SQm-rY-OyA">
<rect key="frame" x="21" y="34.5" width="333" height="24"/>
<fontDescription key="fontDescription" name="PingFangSC-Light" family="PingFang SC" pointSize="17"/>
<color key="textColor" red="0.30588235294117649" green="0.30588235294117649" blue="0.30588235294117649" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wfT-JC-g9d">
<rect key="frame" x="21" y="66" width="9" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" red="0.94509803921568625" green="0.5725490196078431" blue="0.60392156862745094" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="暂无" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gpT-Sg-ghu">
<rect key="frame" x="40" y="62" width="80.5" height="28"/>
<constraints>
<constraint firstAttribute="width" constant="80" id="0Pv-kq-UND"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="20"/>
<color key="textColor" red="0.94509803921568625" green="0.5725490196078431" blue="0.60392156862745094" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥ 暂无" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mql-V1-hiE">
<rect key="frame" x="120.5" y="68.5" width="51.5" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" red="0.30588235294117649" green="0.30588235294117649" blue="0.30588235294117649" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yYc-Lx-XMx" userLabel="正品保证">
<rect key="frame" x="21" y="98" width="100" height="30"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_product_real" translatesAutoresizingMaskIntoConstraints="NO" id="NYM-Eo-x6g">
<rect key="frame" x="0.0" y="4" width="20" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="OYT-lj-ldV"/>
<constraint firstAttribute="width" constant="20" id="ioH-oW-AyC"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="正品保证" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rod-fs-hfy">
<rect key="frame" x="30" y="7.5" width="48" height="17"/>
<fontDescription key="fontDescription" name="PingFangSC-Light" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.15294117647058825" green="0.14901960784313725" blue="0.21176470588235294" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="Uq9-Wi-J6o"/>
<constraint firstItem="Rod-fs-hfy" firstAttribute="leading" secondItem="NYM-Eo-x6g" secondAttribute="trailing" constant="10" id="b31-SM-jpe"/>
<constraint firstItem="NYM-Eo-x6g" firstAttribute="centerY" secondItem="yYc-Lx-XMx" secondAttribute="centerY" id="crT-lD-GNY"/>
<constraint firstItem="Rod-fs-hfy" firstAttribute="centerY" secondItem="yYc-Lx-XMx" secondAttribute="centerY" constant="1" id="gxR-5L-P0f"/>
<constraint firstItem="NYM-Eo-x6g" firstAttribute="leading" secondItem="yYc-Lx-XMx" secondAttribute="leading" id="ly3-rC-rQu"/>
<constraint firstAttribute="width" constant="100" id="xEt-bo-Cd2"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="efc-dz-O7V" userLabel="14天退换">
<rect key="frame" x="121" y="98" width="100" height="30"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_product_14day" translatesAutoresizingMaskIntoConstraints="NO" id="jxm-XE-ewW">
<rect key="frame" x="0.0" y="4" width="24" height="22"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="6LP-3V-BBJ"/>
<constraint firstAttribute="height" constant="22" id="eN2-by-SKX"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="14天退换" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LIh-x6-zk9">
<rect key="frame" x="34" y="7.5" width="48" height="17"/>
<fontDescription key="fontDescription" name="PingFangSC-Light" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.1529411765" green="0.14901960780000001" blue="0.21176470589999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="jxm-XE-ewW" firstAttribute="centerY" secondItem="efc-dz-O7V" secondAttribute="centerY" id="AUa-Sp-tD4"/>
<constraint firstAttribute="width" constant="100" id="HRc-Gz-tHh"/>
<constraint firstAttribute="height" constant="30" id="VS6-0u-aNz"/>
<constraint firstItem="LIh-x6-zk9" firstAttribute="centerY" secondItem="efc-dz-O7V" secondAttribute="centerY" constant="1" id="dYp-Cg-gHz"/>
<constraint firstItem="jxm-XE-ewW" firstAttribute="leading" secondItem="efc-dz-O7V" secondAttribute="leading" id="g5c-fR-jZ0"/>
<constraint firstItem="LIh-x6-zk9" firstAttribute="leading" secondItem="jxm-XE-ewW" secondAttribute="trailing" constant="10" id="yLr-ro-h9P"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KO2-yq-cZe" userLabel="2000元包邮">
<rect key="frame" x="221" y="98" width="100" height="30"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_product_gift" translatesAutoresizingMaskIntoConstraints="NO" id="jgV-JY-DP2">
<rect key="frame" x="0.0" y="4" width="20" height="22"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="92b-73-mD7"/>
<constraint firstAttribute="height" constant="22" id="xUa-8f-nSX"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2000元包邮" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5FK-T9-Pfk">
<rect key="frame" x="30" y="7.5" width="65" height="17"/>
<fontDescription key="fontDescription" name="PingFangSC-Light" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.1529411765" green="0.14901960780000001" blue="0.21176470589999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="36e-VT-9xa"/>
<constraint firstItem="5FK-T9-Pfk" firstAttribute="centerY" secondItem="KO2-yq-cZe" secondAttribute="centerY" constant="1" id="Oc0-Fg-F2t"/>
<constraint firstItem="jgV-JY-DP2" firstAttribute="centerY" secondItem="KO2-yq-cZe" secondAttribute="centerY" id="ZBT-0p-cvS"/>
<constraint firstItem="jgV-JY-DP2" firstAttribute="leading" secondItem="KO2-yq-cZe" secondAttribute="leading" id="nMZ-Xp-beD"/>
<constraint firstItem="5FK-T9-Pfk" firstAttribute="leading" secondItem="jgV-JY-DP2" secondAttribute="trailing" constant="10" id="oAQ-tY-KxH"/>
<constraint firstAttribute="width" constant="100" id="pIA-hM-SK3"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="gpT-Sg-ghu" firstAttribute="bottom" secondItem="wfT-JC-g9d" secondAttribute="bottom" constant="3" id="0gt-hJ-gW7"/>
<constraint firstItem="Mql-V1-hiE" firstAttribute="leading" secondItem="gpT-Sg-ghu" secondAttribute="trailing" id="2kJ-k6-7uE"/>
<constraint firstItem="efc-dz-O7V" firstAttribute="leading" secondItem="yYc-Lx-XMx" secondAttribute="trailing" id="ApX-Ec-ekY"/>
<constraint firstAttribute="trailing" secondItem="s6N-a3-C4Z" secondAttribute="trailing" constant="21" id="BH6-4A-Psp"/>
<constraint firstItem="KO2-yq-cZe" firstAttribute="top" secondItem="efc-dz-O7V" secondAttribute="top" id="D1C-JX-jqh"/>
<constraint firstItem="yYc-Lx-XMx" firstAttribute="top" secondItem="gpT-Sg-ghu" secondAttribute="bottom" constant="8" id="DMl-f6-dk5"/>
<constraint firstItem="efc-dz-O7V" firstAttribute="top" secondItem="yYc-Lx-XMx" secondAttribute="top" id="LXH-4U-H7T"/>
<constraint firstItem="Mql-V1-hiE" firstAttribute="bottom" secondItem="wfT-JC-g9d" secondAttribute="bottom" id="LwR-CA-mq2"/>
<constraint firstItem="s6N-a3-C4Z" firstAttribute="leading" secondItem="iJa-Oj-Sd2" secondAttribute="leading" constant="21" id="Qm4-Ii-IA5"/>
<constraint firstItem="SQm-rY-OyA" firstAttribute="top" secondItem="s6N-a3-C4Z" secondAttribute="bottom" constant="4.5" id="TVX-ig-tsH"/>
<constraint firstItem="s6N-a3-C4Z" firstAttribute="top" secondItem="iJa-Oj-Sd2" secondAttribute="top" id="YxU-Rv-XEv"/>
<constraint firstItem="KO2-yq-cZe" firstAttribute="leading" secondItem="efc-dz-O7V" secondAttribute="trailing" id="ZGb-XR-j4Y"/>
<constraint firstItem="wfT-JC-g9d" firstAttribute="leading" secondItem="iJa-Oj-Sd2" secondAttribute="leading" constant="21" id="ZU3-uY-xmf"/>
<constraint firstAttribute="trailing" secondItem="SQm-rY-OyA" secondAttribute="trailing" constant="21" id="dX6-4X-Blu"/>
<constraint firstItem="wfT-JC-g9d" firstAttribute="top" secondItem="SQm-rY-OyA" secondAttribute="bottom" constant="7.5" id="gcI-jU-lhJ"/>
<constraint firstItem="yYc-Lx-XMx" firstAttribute="leading" secondItem="iJa-Oj-Sd2" secondAttribute="leading" constant="21" id="lTQ-qi-GT9"/>
<constraint firstAttribute="height" constant="130" id="nLX-8H-mni"/>
<constraint firstItem="SQm-rY-OyA" firstAttribute="leading" secondItem="iJa-Oj-Sd2" secondAttribute="leading" constant="21" id="njb-yV-RRh"/>
<constraint firstItem="gpT-Sg-ghu" firstAttribute="leading" secondItem="wfT-JC-g9d" secondAttribute="trailing" constant="10" id="o9j-pp-GRZ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wgu-cH-TXa" userLabel="选择尺码/颜色" customClass="KWMItemView">
<rect key="frame" x="0.0" y="140" width="375" height="50"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JBu-QP-lhJ" userLabel="line">
<rect key="frame" x="21" y="0.0" width="354" height="1"/>
<color key="backgroundColor" red="0.84705882349999995" green="0.85882352939999995" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="bxm-oi-0tI"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择尺码/颜色" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o3P-oH-Xcb">
<rect key="frame" x="21" y="16" width="78" height="17"/>
<fontDescription key="fontDescription" name="PingFangSC-Light" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.15294117647058825" green="0.14901960784313725" blue="0.21176470588235294" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Eqb-wS-Pj4" userLabel="line">
<rect key="frame" x="0.0" y="49" width="375" height="1"/>
<color key="backgroundColor" red="0.84705882349999995" green="0.85882352939999995" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="PfY-sI-qsS"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="button_mine_more" translatesAutoresizingMaskIntoConstraints="NO" id="rd9-oQ-6Yd">
<rect key="frame" x="348" y="18" width="7" height="14"/>
<constraints>
<constraint firstAttribute="width" constant="7" id="T6r-Kc-VLX"/>
<constraint firstAttribute="height" constant="14" id="VRI-kd-MTs"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="0kg-Iy-vvA"/>
<constraint firstItem="JBu-QP-lhJ" firstAttribute="leading" secondItem="wgu-cH-TXa" secondAttribute="leading" constant="21" id="MPS-lz-BYC"/>
<constraint firstAttribute="bottom" secondItem="Eqb-wS-Pj4" secondAttribute="bottom" id="Ndv-Cn-fC4"/>
<constraint firstAttribute="trailing" secondItem="rd9-oQ-6Yd" secondAttribute="trailing" constant="20" id="dD7-bY-9ky"/>
<constraint firstItem="Eqb-wS-Pj4" firstAttribute="leading" secondItem="wgu-cH-TXa" secondAttribute="leading" id="eDd-wd-YoB"/>
<constraint firstItem="o3P-oH-Xcb" firstAttribute="leading" secondItem="wgu-cH-TXa" secondAttribute="leading" constant="21" id="eYd-CZ-fBx"/>
<constraint firstItem="rd9-oQ-6Yd" firstAttribute="centerY" secondItem="wgu-cH-TXa" secondAttribute="centerY" id="ikC-7d-X6D"/>
<constraint firstAttribute="trailing" secondItem="JBu-QP-lhJ" secondAttribute="trailing" id="mGw-bx-abg"/>
<constraint firstAttribute="trailing" secondItem="Eqb-wS-Pj4" secondAttribute="trailing" id="tpb-ie-RnO"/>
<constraint firstItem="JBu-QP-lhJ" firstAttribute="top" secondItem="wgu-cH-TXa" secondAttribute="top" id="tvA-Og-VqH"/>
<constraint firstItem="o3P-oH-Xcb" firstAttribute="centerY" secondItem="wgu-cH-TXa" secondAttribute="centerY" id="yQh-5w-RUB"/>
</constraints>
<connections>
<outletCollection property="gestureRecognizers" destination="Bn3-BY-NZm" appends="YES" id="5YW-Qp-ioO"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zmi-gQ-S6i">
<rect key="frame" x="0.0" y="190" width="375" height="5"/>
<color key="backgroundColor" red="0.95294117647058818" green="0.95686274509803915" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="5" id="PpS-Jc-blA"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="wgu-cH-TXa" secondAttribute="trailing" id="1BE-r2-etn"/>
<constraint firstItem="wgu-cH-TXa" firstAttribute="top" secondItem="iJa-Oj-Sd2" secondAttribute="bottom" constant="10" id="3E1-qY-lsE"/>
<constraint firstItem="zmi-gQ-S6i" firstAttribute="leading" secondItem="Ymw-Cg-156" secondAttribute="leading" id="4Id-i3-1mG"/>
<constraint firstItem="zmi-gQ-S6i" firstAttribute="top" secondItem="wgu-cH-TXa" secondAttribute="bottom" id="4Ld-Pc-ZRB"/>
<constraint firstAttribute="trailing" secondItem="iJa-Oj-Sd2" secondAttribute="trailing" id="8a6-sG-pwj"/>
<constraint firstItem="iJa-Oj-Sd2" firstAttribute="top" secondItem="Ymw-Cg-156" secondAttribute="top" id="Vl5-q8-AzT"/>
<constraint firstAttribute="trailing" secondItem="zmi-gQ-S6i" secondAttribute="trailing" id="YBd-mU-bgi"/>
<constraint firstItem="iJa-Oj-Sd2" firstAttribute="leading" secondItem="Ymw-Cg-156" secondAttribute="leading" id="hhQ-sM-yEW"/>
<constraint firstItem="wgu-cH-TXa" firstAttribute="leading" secondItem="Ymw-Cg-156" secondAttribute="leading" id="oIc-Ag-UZg"/>
<constraint firstAttribute="bottom" secondItem="zmi-gQ-S6i" secondAttribute="bottom" id="pzL-8F-jyX"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="Ymw-Cg-156" firstAttribute="top" secondItem="M6v-TN-2WE" secondAttribute="bottom" id="5Y0-G8-3We"/>
<constraint firstAttribute="trailing" secondItem="Ymw-Cg-156" secondAttribute="trailing" id="6Mc-RC-ip7"/>
<constraint firstItem="M6v-TN-2WE" firstAttribute="top" secondItem="lKe-L4-ROK" secondAttribute="bottom" id="6oL-sd-1s7"/>
<constraint firstItem="lKe-L4-ROK" firstAttribute="top" secondItem="1H6-J2-jj4" secondAttribute="top" id="MVZ-Po-h2C"/>
<constraint firstAttribute="bottom" secondItem="Ymw-Cg-156" secondAttribute="bottom" id="Mef-7q-yrb"/>
<constraint firstItem="lKe-L4-ROK" firstAttribute="leading" secondItem="1H6-J2-jj4" secondAttribute="leading" id="bsW-GL-chq"/>
<constraint firstAttribute="trailing" secondItem="lKe-L4-ROK" secondAttribute="trailing" id="h7C-hB-wS6"/>
<constraint firstItem="Ymw-Cg-156" firstAttribute="leading" secondItem="1H6-J2-jj4" secondAttribute="leading" id="kHl-jZ-gRA"/>
<constraint firstItem="M6v-TN-2WE" firstAttribute="centerX" secondItem="1H6-J2-jj4" secondAttribute="centerX" id="mmR-Qc-1vL"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="1H6-J2-jj4" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Vwo-SW-Wdm"/>
<constraint firstAttribute="bottom" secondItem="1H6-J2-jj4" secondAttribute="bottom" id="keW-PS-saN"/>
<constraint firstAttribute="trailing" secondItem="1H6-J2-jj4" secondAttribute="trailing" id="t8x-Nz-EbA"/>
<constraint firstItem="1H6-J2-jj4" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="yGK-Vx-7gu"/>
</constraints>
<point key="canvasLocation" x="128.5" y="74.5"/>
</view>
<tapGestureRecognizer id="Bn3-BY-NZm">
<connections>
<action selector="onClickSizeBtn:" destination="-1" id="Xre-Rk-3w3"/>
</connections>
</tapGestureRecognizer>
</objects>
<resources>
<image name="button_mine_more" width="7" height="14"/>
<image name="ic_product_14day" width="26" height="23"/>
<image name="ic_product_gift" width="22" height="23"/>
<image name="ic_product_real" width="22" height="23"/>
</resources>
</document>
//
// KWMSizeCell.h
// iCemarose
//
// Created by HouWeiBin on 16/9/1.
// Copyright © 2016年 kollway. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Buy/Buy.h"
@interface KWMProductColorCell : UICollectionViewCell
@property(nonatomic) BOOL isSelect;
@end
//
// KWMSizeCell.m
// iCemarose
//
// Created by HouWeiBin on 16/9/1.
// Copyright © 2016年 kollway. All rights reserved.
//
#import "KWMProductColorCell.h"
#import "UIColor+SAMAdditions.h"
#import "UIView+Prettify.h"
@interface KWMProductColorCell()
@property(nonatomic,weak) IBOutlet UIImageView *ivProduct;
@property(nonatomic,weak) IBOutlet UIImageView *ivSelected;
@property(nonatomic,weak) IBOutlet UIView *vProduct;
@end
@implementation KWMProductColorCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
[self.ivProduct setBorder:1 cornerRadius:1 borderColor:[UIColor sam_colorWithHex:@"D8DBDE"]];
}
-(void)setIsSelect:(BOOL)isSelect{
_isSelect = isSelect;
[self.ivProduct setBorder:1 cornerRadius:1 borderColor:isSelect?[UIColor sam_colorWithHex:@"F1929A"]:[UIColor sam_colorWithHex:@"D8DBDE"]];
self.ivSelected.hidden = !isSelect;
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" restorationIdentifier="KWMSizeCell" reuseIdentifier="KWMProductColorCell" id="gTV-IL-0wX" customClass="KWMProductColorCell">
<rect key="frame" x="0.0" y="0.0" width="50" height="71"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="50" height="71"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LIy-sM-Sa7" userLabel="vView">
<rect key="frame" x="0.0" y="0.0" width="50" height="71"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YTc-7g-reg">
<rect key="frame" x="0.0" y="0.0" width="50" height="71"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5sQ-H3-h9f">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="test_home_cloth_2" translatesAutoresizingMaskIntoConstraints="NO" id="m0M-BD-5Uv">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_selected_color" translatesAutoresizingMaskIntoConstraints="NO" id="PXf-2y-qN1">
<rect key="frame" x="32" y="32" width="18" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="Agg-r9-9GB"/>
<constraint firstAttribute="width" constant="18" id="EUa-N1-Wxk"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="m0M-BD-5Uv" firstAttribute="leading" secondItem="5sQ-H3-h9f" secondAttribute="leading" id="7Bz-6x-aIi"/>
<constraint firstAttribute="width" secondItem="5sQ-H3-h9f" secondAttribute="height" multiplier="1:1" id="AzC-sE-H0H"/>
<constraint firstAttribute="bottom" secondItem="PXf-2y-qN1" secondAttribute="bottom" id="Dx6-u8-hyY"/>
<constraint firstItem="m0M-BD-5Uv" firstAttribute="top" secondItem="5sQ-H3-h9f" secondAttribute="top" id="FzR-wu-qtq"/>
<constraint firstAttribute="bottom" secondItem="m0M-BD-5Uv" secondAttribute="bottom" id="HCT-H9-Fmi"/>
<constraint firstAttribute="trailing" secondItem="m0M-BD-5Uv" secondAttribute="trailing" id="Y1a-27-8k3"/>
<constraint firstAttribute="trailing" secondItem="PXf-2y-qN1" secondAttribute="trailing" id="ofP-9e-h7Q"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="粉红色" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iFV-Ut-KXO">
<rect key="frame" x="0.0" y="54" width="50" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" red="0.22352941176470587" green="0.22352941176470587" blue="0.22352941176470587" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="iFV-Ut-KXO" firstAttribute="top" secondItem="5sQ-H3-h9f" secondAttribute="bottom" constant="4" id="4pJ-pB-JfD"/>
<constraint firstAttribute="trailing" secondItem="iFV-Ut-KXO" secondAttribute="trailing" id="DC4-97-QBY"/>
<constraint firstItem="iFV-Ut-KXO" firstAttribute="leading" secondItem="YTc-7g-reg" secondAttribute="leading" id="Lhk-cd-r40"/>
<constraint firstItem="5sQ-H3-h9f" firstAttribute="leading" secondItem="YTc-7g-reg" secondAttribute="leading" id="OA4-bt-zUG"/>
<constraint firstItem="5sQ-H3-h9f" firstAttribute="top" secondItem="YTc-7g-reg" secondAttribute="top" id="plR-Nw-yN0"/>
<constraint firstAttribute="trailing" secondItem="5sQ-H3-h9f" secondAttribute="trailing" id="xFp-3U-itD"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YTc-7g-reg" firstAttribute="leading" secondItem="LIy-sM-Sa7" secondAttribute="leading" id="K1Q-Ga-TFp"/>
<constraint firstAttribute="bottom" secondItem="YTc-7g-reg" secondAttribute="bottom" id="T7t-9G-sg0"/>
<constraint firstAttribute="trailing" secondItem="YTc-7g-reg" secondAttribute="trailing" id="rcu-u8-MfN"/>
<constraint firstItem="YTc-7g-reg" firstAttribute="top" secondItem="LIy-sM-Sa7" secondAttribute="top" id="sO8-jk-Hgj"/>
</constraints>
</view>
</subviews>
</view>
<constraints>
<constraint firstAttribute="trailing" secondItem="LIy-sM-Sa7" secondAttribute="trailing" id="3Dt-XH-3Dk"/>
<constraint firstItem="LIy-sM-Sa7" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="Gv2-S8-RjJ"/>
<constraint firstItem="LIy-sM-Sa7" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="R3f-Un-k6I"/>
<constraint firstAttribute="bottom" secondItem="LIy-sM-Sa7" secondAttribute="bottom" id="SCB-9p-0lM"/>
</constraints>
<connections>
<outlet property="ivProduct" destination="m0M-BD-5Uv" id="WFe-t0-yhM"/>
<outlet property="ivSelected" destination="PXf-2y-qN1" id="ei9-v0-z6q"/>
<outlet property="vProduct" destination="5sQ-H3-h9f" id="fkM-xP-spq"/>
</connections>
</collectionViewCell>
</objects>
<resources>
<image name="ic_selected_color" width="19" height="19"/>
<image name="test_home_cloth_2" width="140" height="140"/>
</resources>
</document>
//
// KWMSizeCell.h
// iCemarose
//
// Created by HouWeiBin on 16/9/1.
// Copyright © 2016年 kollway. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Buy/Buy.h"
@interface KWMProductSizeCell : UICollectionViewCell
//sdk
@property(nonatomic) BUYProductVariant *productVariant;
@property(nonatomic) BOOL isSelect;
@property(nonatomic) BOOL isSellOut;
@end
//
// KWMSizeCell.m
// iCemarose
//
// Created by HouWeiBin on 16/9/1.
// Copyright © 2016年 kollway. All rights reserved.
//
#import "KWMProductSizeCell.h"
#import "UIColor+SAMAdditions.h"
#import "UIView+Prettify.h"
@interface KWMProductSizeCell()
@property(nonatomic,weak) IBOutlet UILabel *lbSize;
@property(nonatomic,weak) IBOutlet UILabel *lbSellOutSize;
@property(nonatomic,weak) IBOutlet UIView *vContent;
@property(nonatomic,weak) IBOutlet UIView *vSellOut;
@end
@implementation KWMProductSizeCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
[self.lbSize setBorder:1 cornerRadius:1 borderColor:[UIColor sam_colorWithHex:@"393939"]];
[self.vSellOut setBorder:1 cornerRadius:1 borderColor:[UIColor sam_colorWithHex:@"393939"]];
}
-(void)setIsSelect:(BOOL)isSelect{
_isSelect = isSelect;
self.lbSize.textColor = isSelect?[UIColor whiteColor]:[UIColor sam_colorWithHex:@"393939"];
self.lbSize.backgroundColor = isSelect?[UIColor sam_colorWithHex:@"393939"]:[UIColor whiteColor];
}
-(void)setIsSellOut:(BOOL)isSellOut{
_isSelect = isSellOut;
self.vSellOut.hidden = isSellOut?NO:YES;
}
-(void)setProductVariant:(BUYProductVariant *)productVariant{
_productVariant = productVariant;
if(productVariant){
self.lbSize.text = productVariant.title;
self.lbSellOutSize.text = productVariant.title;
}
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" restorationIdentifier="KWMSizeCell" reuseIdentifier="KWMProductSizeCell" id="gTV-IL-0wX" customClass="KWMProductSizeCell">
<rect key="frame" x="0.0" y="0.0" width="93" height="38"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="93" height="38"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LIy-sM-Sa7" userLabel="vView">
<rect key="frame" x="1" y="1" width="91" height="36"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YTc-7g-reg">
<rect key="frame" x="0.0" y="0.0" width="91" height="36"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2A" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lcg-79-33S" userLabel="有货">
<rect key="frame" x="0.0" y="0.0" width="91" height="36"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" red="0.29803921568627451" green="0.34901960784313724" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0cT-rD-xfN" userLabel="缺货">
<rect key="frame" x="0.0" y="0.0" width="91" height="36"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cGu-OY-P4R" userLabel="size">
<rect key="frame" x="0.0" y="0.0" width="91" height="18"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3A" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="whv-2v-7Jq">
<rect key="frame" x="0.0" y="0.0" width="91" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" red="0.22352941176470587" green="0.22352941176470587" blue="0.22352941176470587" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dZq-jJ-iEe" userLabel="line">
<rect key="frame" x="22.5" y="8.5" width="45.5" height="1"/>
<color key="backgroundColor" red="0.94509803921568625" green="0.50980392156862742" blue="0.54117647058823526" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="fKL-jv-avn"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="whv-2v-7Jq" firstAttribute="top" secondItem="cGu-OY-P4R" secondAttribute="top" id="F83-Wt-SEu"/>
<constraint firstItem="whv-2v-7Jq" firstAttribute="leading" secondItem="cGu-OY-P4R" secondAttribute="leading" id="Jyt-in-reE"/>
<constraint firstItem="dZq-jJ-iEe" firstAttribute="centerX" secondItem="cGu-OY-P4R" secondAttribute="centerX" id="bqk-63-7jb"/>
<constraint firstAttribute="trailing" secondItem="whv-2v-7Jq" secondAttribute="trailing" id="diD-GC-atf"/>
<constraint firstAttribute="bottom" secondItem="whv-2v-7Jq" secondAttribute="bottom" id="maJ-HX-Qwr"/>
<constraint firstItem="dZq-jJ-iEe" firstAttribute="width" secondItem="cGu-OY-P4R" secondAttribute="width" multiplier="0.5" id="n2f-kj-OSA"/>
<constraint firstItem="dZq-jJ-iEe" firstAttribute="centerY" secondItem="cGu-OY-P4R" secondAttribute="centerY" id="rYK-at-zcZ"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="到货提醒" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a1x-nK-a5r">
<rect key="frame" x="0.0" y="18" width="91" height="18"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="10"/>
<color key="textColor" red="0.22352941176470587" green="0.22352941176470587" blue="0.22352941176470587" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="cGu-OY-P4R" firstAttribute="leading" secondItem="0cT-rD-xfN" secondAttribute="leading" id="6OR-DW-ehn"/>
<constraint firstAttribute="trailing" secondItem="cGu-OY-P4R" secondAttribute="trailing" id="9Xe-7j-CVp"/>
<constraint firstItem="cGu-OY-P4R" firstAttribute="height" secondItem="0cT-rD-xfN" secondAttribute="height" multiplier="0.5" id="P32-P7-2sr"/>
<constraint firstAttribute="trailing" secondItem="a1x-nK-a5r" secondAttribute="trailing" id="Thr-BQ-S1n"/>
<constraint firstItem="cGu-OY-P4R" firstAttribute="top" secondItem="0cT-rD-xfN" secondAttribute="top" id="UlT-El-Qs2"/>
<constraint firstAttribute="bottom" secondItem="a1x-nK-a5r" secondAttribute="bottom" id="WfI-SI-Zh4"/>
<constraint firstItem="a1x-nK-a5r" firstAttribute="top" secondItem="cGu-OY-P4R" secondAttribute="bottom" id="uvz-SI-Sqb"/>
<constraint firstItem="a1x-nK-a5r" firstAttribute="leading" secondItem="0cT-rD-xfN" secondAttribute="leading" id="vEN-Ay-DEB"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="lcg-79-33S" firstAttribute="leading" secondItem="YTc-7g-reg" secondAttribute="leading" id="6EG-T0-lgZ"/>
<constraint firstAttribute="trailing" secondItem="lcg-79-33S" secondAttribute="trailing" id="9UR-K6-fsl"/>
<constraint firstItem="lcg-79-33S" firstAttribute="top" secondItem="YTc-7g-reg" secondAttribute="top" id="9tK-2Q-PZC"/>
<constraint firstAttribute="trailing" secondItem="0cT-rD-xfN" secondAttribute="trailing" id="DLb-hP-LC6"/>
<constraint firstItem="0cT-rD-xfN" firstAttribute="top" secondItem="YTc-7g-reg" secondAttribute="top" id="W0M-5e-tcy"/>
<constraint firstAttribute="bottom" secondItem="0cT-rD-xfN" secondAttribute="bottom" id="glF-b2-Y4s"/>
<constraint firstAttribute="bottom" secondItem="lcg-79-33S" secondAttribute="bottom" id="k33-76-YPr"/>
<constraint firstItem="0cT-rD-xfN" firstAttribute="leading" secondItem="YTc-7g-reg" secondAttribute="leading" id="ncz-Oi-DQN"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YTc-7g-reg" firstAttribute="leading" secondItem="LIy-sM-Sa7" secondAttribute="leading" id="K1Q-Ga-TFp"/>
<constraint firstAttribute="bottom" secondItem="YTc-7g-reg" secondAttribute="bottom" id="T7t-9G-sg0"/>
<constraint firstAttribute="trailing" secondItem="YTc-7g-reg" secondAttribute="trailing" id="rcu-u8-MfN"/>
<constraint firstItem="YTc-7g-reg" firstAttribute="top" secondItem="LIy-sM-Sa7" secondAttribute="top" id="sO8-jk-Hgj"/>
</constraints>
</view>
</subviews>
</view>
<constraints>
<constraint firstAttribute="trailing" secondItem="LIy-sM-Sa7" secondAttribute="trailing" constant="1" id="3Dt-XH-3Dk"/>
<constraint firstItem="LIy-sM-Sa7" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="1" id="Gv2-S8-RjJ"/>
<constraint firstItem="LIy-sM-Sa7" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="1" id="R3f-Un-k6I"/>
<constraint firstAttribute="bottom" secondItem="LIy-sM-Sa7" secondAttribute="bottom" constant="1" id="SCB-9p-0lM"/>
</constraints>
<connections>
<outlet property="lbSellOutSize" destination="whv-2v-7Jq" id="Puz-QP-SoV"/>
<outlet property="lbSize" destination="lcg-79-33S" id="UeJ-vM-XlX"/>
<outlet property="vContent" destination="YTc-7g-reg" id="I12-4X-rYO"/>
<outlet property="vSellOut" destination="0cT-rD-xfN" id="y6g-ph-fbE"/>
</connections>
</collectionViewCell>
</objects>
</document>
//
// KWMSecondDetailView.h
// iCemarose
//
// Created by 陈荣科 on 16/9/6.
// Copyright © 2016年 kollway. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "KWMNewGoodsCell.h"
@class KWMSecondDetailView;
@protocol KWMSecondDetailViewDelegate <NSObject>
-(void)kwm_clickCollectionCell:(BUYProduct *)product;
-(void)kwm_loadNewPage:(BOOL)isSameBrand;
@end
@interface KWMSecondDetailView : UIView<UITableViewDataSource,UITableViewDelegate,KWMNewGoodsCellDelegate>
@property (weak, nonatomic) id<KWMSecondDetailViewDelegate>delegate;
@property (nonatomic) BOOL isLoadingSameBrand;
@property (nonatomic) BOOL isLoadingSameType;
@property (nonatomic) NSInteger pageSameBrand;
@property (nonatomic) NSInteger pageSameType;
@property (nonatomic) NSArray *sameBrandProducts;
@property (nonatomic) NSArray *sameTypeProducts;
@property (nonatomic) NSString *brand;
@property (nonatomic) NSInteger count;
//isSameBrand 是否同一品牌商品
-(void)setData:(NSArray *)products isSameBrand:(BOOL)isSameBrand;
-(void)setBrandString:(NSString *)brand;
-(void)clear;
@end
//
// KWMSecondDetailView.m
// iCemarose
//
// Created by 陈荣科 on 16/9/6.
// Copyright © 2016年 kollway. All rights reserved.
//
#import "KWMSecondDetailView.h"
#import "KWMTBVSectionHeardView.h"
@interface KWMSecondDetailView ()
@property(nonatomic,weak) IBOutlet UIView *vView;
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property(nonatomic,weak) IBOutlet UIPageControl *pageControl;
@end
@implementation KWMSecondDetailView
#define sclHeight (UI_SCREEN_HEITHT-20-20-40-90-64)
static NSString *idStr = @"KWMNewGoodsCell";
- (id)init{
if (self=[super init]){
[self addView];
}
return self;
}
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
[self addView];
}
return self;
}
-(instancetype)initWithFrame:(CGRect)frame{
if (self =[super initWithFrame:frame]) {
[self addView];
}
return self;
}
-(void)awakeFromNib{
[super awakeFromNib];
}
-(void) addView{
[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class])
owner:self
options:nil];
self.vView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
[self addSubview:self.vView];
[self initView];
}
- (void)initView{
self.isLoadingSameBrand = NO;
self.isLoadingSameType = NO;
[self.tableView registerNib:[UINib nibWithNibName:idStr bundle:nil] forCellReuseIdentifier:idStr];
}
- (void)setCount:(NSInteger)count{
_count = count+1;
if(count>0){
self.pageControl.numberOfPages = count;
//需要放在设置图片之前,不然会发生crash
self.pageControl.currentPage = self.count-1;
[self.pageControl setValue:[UIImage imageNamed:@"ic_page_3"] forKey:@"_currentPageImage"];
[self.pageControl setValue:[UIImage imageNamed:@"ic_page_1"] forKey:@"_pageImage"];
}
}
#pragma mark -- UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 0.01f;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
KWMNewGoodsCell *newGoodsCell = [tableView dequeueReusableCellWithIdentifier:idStr forIndexPath:indexPath];
if(!newGoodsCell){
[tableView registerNib:[UINib nibWithNibName:idStr bundle:nil] forCellReuseIdentifier:idStr];
newGoodsCell = [tableView dequeueReusableCellWithIdentifier:idStr forIndexPath:indexPath];
}
newGoodsCell.isDetail = YES;
newGoodsCell.delegate = self;
newGoodsCell.isSameBrand = indexPath.section == 0;
if(newGoodsCell.isSameBrand){//同品牌推荐
if(self.pageSameBrand <= 1){
[newGoodsCell setData:self.sameBrandProducts];
}else{
[newGoodsCell addData:self.sameBrandProducts];
}
}else{//同类型商品推荐
if(self.pageSameType <= 1){
[newGoodsCell setData:self.sameTypeProducts];
}else{
[newGoodsCell addData:self.sameTypeProducts];
}
}
return newGoodsCell;
}
#pragma mark -- KWMNewGoodsCellDelegate
- (void)kwm_selectCollectionCell:(BUYProduct *)product{
if ([self.delegate respondsToSelector:@selector(kwm_clickCollectionCell:)]) {
[self.delegate kwm_clickCollectionCell:(BUYProduct *)product];
}
}
-(void)kwm_onNexPage:(BOOL)isNewBrand{
if ([self.delegate respondsToSelector:@selector(kwm_loadNewPage:)]) {
[self.delegate kwm_loadNewPage:isNewBrand];
}
}
#pragma mark - UITableViewDataSource
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 173.0f;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
KWMTBVSectionHeardView *vTBVSectionHeard = [[KWMTBVSectionHeardView alloc] initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 60)];
if (section == 0) {
NSString *title;
if(self.brand == nil){
vTBVSectionHeard = [[KWMTBVSectionHeardView alloc] initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 40)];
title = @"其他商品";
}else{
title = [NSString stringWithFormat: @"%@\n其他商品", self.brand];
}
vTBVSectionHeard.lbSectionTitel.text = title;
}else{
vTBVSectionHeard = [[KWMTBVSectionHeardView alloc] initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 40)];
vTBVSectionHeard.lbSectionTitel.text = @"同类商品";
}
vTBVSectionHeard.ivMore.hidden = YES;
return vTBVSectionHeard;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if(section == 0 && self.brand != nil){
return 60;
}else{
return 40;
}
}
-(void)setData:(NSArray *)products isSameBrand:(BOOL)isSameBrand{
if(products == nil || products.count == 0){
return;
}
if(isSameBrand){
self.sameBrandProducts = products;
}else{
self.sameTypeProducts = products;
}
[self.tableView reloadData];
}
-(void)setBrandString:(NSString *)brand{
if(brand == nil){
return;
}
self.brand = brand;
}
-(void)clear{
self.brand = @"";
self.pageSameBrand = 0;
self.pageSameType = 0;
self.sameTypeProducts = nil;
self.sameBrandProducts = nil;
[self.tableView reloadData];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KWMSecondDetailView">
<connections>
<outlet property="pageControl" destination="BwV-ZY-R8O" id="okW-Mg-odg"/>
<outlet property="tableView" destination="ucu-il-bL5" id="B8R-bv-NfL"/>
<outlet property="vView" destination="iN0-l3-epB" id="XUL-L9-zWr"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" bounces="NO" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="ucu-il-bL5">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<outlet property="dataSource" destination="-1" id="5bl-79-mux"/>
<outlet property="delegate" destination="-1" id="KC1-U2-sJv"/>
</connections>
</tableView>
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="BwV-ZY-R8O" customClass="KWMPageControl">
<rect key="frame" x="168" y="627" width="39" height="10"/>
<constraints>
<constraint firstAttribute="height" constant="10" id="X2h-EH-VAs"/>
</constraints>
</pageControl>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="ucu-il-bL5" secondAttribute="bottom" id="6gL-Fu-UjZ"/>
<constraint firstItem="ucu-il-bL5" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="W8b-3w-t0w"/>
<constraint firstItem="BwV-ZY-R8O" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="aQS-gK-Dpy"/>
<constraint firstAttribute="trailing" secondItem="ucu-il-bL5" secondAttribute="trailing" id="cbe-Rz-Esu"/>
<constraint firstAttribute="bottom" secondItem="BwV-ZY-R8O" secondAttribute="bottom" constant="30" id="r41-Hr-Dx6"/>
<constraint firstItem="ucu-il-bL5" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="uCH-Vx-Jt8"/>
</constraints>
</view>
</objects>
</document>
//
// KWMThirdDetailView.h
// iCemarose
//
// Created by HouWeiBin on 2017/6/23.
// Copyright © 2017年 kollway. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface KWMThirdDetailView : UIView
@end
//
// KWMThirdDetailView.m
// iCemarose
//
// Created by HouWeiBin on 2017/6/23.
// Copyright © 2017年 kollway. All rights reserved.
//
#import "KWMThirdDetailView.h"
@interface KWMThirdDetailView()
@property (weak, nonatomic) IBOutlet UIView *vView;
@end
@implementation KWMThirdDetailView
-(id)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if(self){
[self initView];
}
return self;
}
-(instancetype)initWithCoder:(NSCoder *)aDecoder{
self = [super initWithCoder:aDecoder];
if (self) {
[self initView];
}
return self;
}
-(void)awakeFromNib{
[super awakeFromNib];
}
-(void)initView{
[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class])
owner:self
options:nil];
self.vView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
[self addSubview:self.vView];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KWMThirdDetailView">
<connections>
<outlet property="vView" destination="iN0-l3-epB" id="jbE-sN-LZF"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="375" height="530"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="phf-Yh-r1z">
<rect key="frame" x="0.0" y="0.0" width="375" height="530"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="TopLeft" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="test_product_detail" translatesAutoresizingMaskIntoConstraints="NO" id="uQ5-LY-iWo">
<rect key="frame" x="0.0" y="20" width="375" height="510"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wfB-x3-Yg3">
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cRM-ik-mZ1" userLabel="vLine">
<rect key="frame" x="50" y="19" width="275" height="1"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="lEz-sk-YTa"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="商品详情" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aOi-sB-YXp">
<rect key="frame" x="112" y="10" width="150" height="20"/>
<color key="backgroundColor" red="0.99607843139999996" green="0.99607843139999996" blue="0.99607843139999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="150" id="LGk-89-dnF"/>
<constraint firstAttribute="height" constant="20" id="nGt-cs-4Ts"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Light" family="PingFang SC" pointSize="14"/>
<color key="textColor" red="0.25863381410000003" green="0.25863381410000003" blue="0.25863381410000003" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<variation key="default">
<mask key="constraints">
<exclude reference="nGt-cs-4Ts"/>
</mask>
</variation>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="4wL-Lc-vYc"/>
<constraint firstItem="aOi-sB-YXp" firstAttribute="centerX" secondItem="wfB-x3-Yg3" secondAttribute="centerX" id="6si-bK-rmk"/>
<constraint firstItem="cRM-ik-mZ1" firstAttribute="leading" secondItem="wfB-x3-Yg3" secondAttribute="leading" constant="50" id="MYj-rD-ToW"/>
<constraint firstAttribute="trailing" secondItem="cRM-ik-mZ1" secondAttribute="trailing" constant="50" id="bbe-zy-vGP"/>
<constraint firstItem="aOi-sB-YXp" firstAttribute="centerY" secondItem="wfB-x3-Yg3" secondAttribute="centerY" id="hzp-4O-sWn"/>
<constraint firstItem="cRM-ik-mZ1" firstAttribute="centerY" secondItem="wfB-x3-Yg3" secondAttribute="centerY" id="nbm-hB-C01"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="wfB-x3-Yg3" firstAttribute="leading" secondItem="phf-Yh-r1z" secondAttribute="leading" id="FBm-GK-tHj"/>
<constraint firstItem="wfB-x3-Yg3" firstAttribute="top" secondItem="phf-Yh-r1z" secondAttribute="top" id="Nql-eH-b43"/>
<constraint firstAttribute="bottom" secondItem="uQ5-LY-iWo" secondAttribute="bottom" id="X2e-xf-iXK"/>
<constraint firstAttribute="trailing" secondItem="uQ5-LY-iWo" secondAttribute="trailing" id="bcI-Xc-CAy"/>
<constraint firstItem="uQ5-LY-iWo" firstAttribute="top" secondItem="phf-Yh-r1z" secondAttribute="top" constant="20" id="rC7-ik-Dfr"/>
<constraint firstItem="uQ5-LY-iWo" firstAttribute="leading" secondItem="phf-Yh-r1z" secondAttribute="leading" id="xwA-Ce-VsC"/>
<constraint firstAttribute="trailing" secondItem="wfB-x3-Yg3" secondAttribute="trailing" id="yGC-ga-jQO"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="phf-Yh-r1z" secondAttribute="trailing" id="4Wq-hy-RLx"/>
<constraint firstItem="phf-Yh-r1z" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="ebd-yK-Tec"/>
<constraint firstAttribute="bottom" secondItem="phf-Yh-r1z" secondAttribute="bottom" id="nDT-2t-8XL"/>
<constraint firstItem="phf-Yh-r1z" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="u0Z-64-52c"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>
<resources>
<image name="test_product_detail" width="375" height="534"/>
</resources>
</document>
//
// KWMNewProductVC.h
// iCemarose
//
// Created by HouWeiBin on 2017/6/23.
// Copyright © 2017年 kollway. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Buy/Buy.h>
#import "KWMBaseVC.h"
#import "KWMVariantsVC.h"
#import "KWMFirstDetailView.h"
#import "KWMSecondDetailView.h"
@interface KWMNewProductVC : KWMBaseVC<KWMFirstDetailViewDelegate,KWMVariantsVCDelegate>
@property(nonatomic) BUYProduct *product;
@property(nonatomic) NSNumber *productId;
@end
//
// KWMNewProductVC.m
// iCemarose
//
// Created by HouWeiBin on 2017/6/23.
// Copyright © 2017年 kollway. All rights reserved.
//
#import "KWMNewProductVC.h"
#import "KWMLoginVC.h"
#import "KWMBeforePayVC.h"
#import "KWMBrandCaramelVC.h"
#import "KWMShareVC.h"
#import "PhotoBroswerVC.h"
#import "KWMUserModel.h"
#import "KWMShoppingCart.h"
#import "KWMImageUtil.h"
#import "KWMStringUtil.h"
@interface KWMNewProductVC ()
@property (weak, nonatomic) IBOutlet KWMFirstDetailView *detailView1;
@property (weak, nonatomic) IBOutlet KWMSecondDetailView *detailView2;
@end
@implementation KWMNewProductVC
- (void)viewDidLoad {
[super viewDidLoad];
[self initView];
}
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES];
}
- (void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[self.navigationController setNavigationBarHidden:NO];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
-(void)initView{
self.productId = @(4746085766);
self.detailView1.delegate = self;
[self requestProductDetail];
[self requestBrandProducts:1];
[self requestCategoryProducts:1];
}
-(IBAction)onClickClose:(id)sender{
[self.navigationController popViewControllerAnimated:YES];
}
-(IBAction)onClickShare:(id)sender{
if(self.product){
KWMShareVC *shareVC = (KWMShareVC *)[KWMBaseVC findControllerBy:[KWMShareVC kwmTag] fromStoryboard:@"New"];
shareVC.shareUrl = [NSString stringWithFormat:@"https://www.cemarose.com/products/%@",self.product.handle];
shareVC.imageUrl = [KWMImageUtil getProductImageUrl:self.product ImageSize:SmallImage];
shareVC.productName = self.product.title;
CGSize size = [UIScreen mainScreen].bounds.size;
[self showPresentation:shareVC size:size tapOutsideClose:YES style:MZFormSheetPresentationTransitionStyleFade];
}
}
-(IBAction)onClickLike:(id)sender{
[self showToast:@"LIKE"];
}
#pragma mark -- KWMFirstDetailViewDelegate
-(void)kwm_onClickSizeBtn{
KWMVariantsVC *variantsVC = (KWMVariantsVC *)[KWMVariantsVC findControllerBy:[KWMVariantsVC kwmTag] fromStoryboard:@"NewProduct"];
variantsVC.product = self.product;
variantsVC.delegate = self;
CGSize size = [UIScreen mainScreen].bounds.size;
[self showPresentation:variantsVC size:size tapOutsideClose:YES style:MZFormSheetPresentationTransitionStyleFade];
}
-(void)kwm_goToBrandVC{
if(self.product && self.product.vendor){
KWMBrandCaramelVC *brandCaramelVC = (KWMBrandCaramelVC *)[KWMBrandCaramelVC findControllerBy:[KWMBrandCaramelVC kwmTag] fromStoryboard:@"Brand"];
NSString *brand = self.product.vendor;
brandCaramelVC.brand = brand;
brandCaramelVC.handle = [KWMStringUtil deleteOtherCharExceptLetterWithLine:brand];
brandCaramelVC.isSale = NO;
[self.navigationController pushViewController:brandCaramelVC animated:YES];
}
}
-(void)kwm_onClickImage:(NSMutableArray *)imageArr currentIndex:(NSInteger)currentIndex{
__weak KWMNewProductVC *weakSelf=self;
NSArray<NSString *> *imags = imageArr;
[PhotoBroswerVC show:self type:PhotoBroswerVCTypePush index:currentIndex isShowSaveBtn:YES photoModelBlock:^NSArray *{
NSArray *localImages = imags;
NSMutableArray *modelsM = [NSMutableArray arrayWithCapacity:localImages.count];
for (NSUInteger i = 0; i< localImages.count; i++) {
PhotoModel *pbModel=[[PhotoModel alloc] init];
pbModel.mid = i + 1;
//源frame
UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, weakSelf.view.frame.size.width, weakSelf.view.frame.size.height)];
pbModel.sourceImageView = imageV;
pbModel.image_HD_U = [[KWMAPIManager sharedManager] toAbsoluteUrl:localImages[i]];
[modelsM addObject:pbModel];
}
return modelsM;
}];
}
#pragma mark - KWMVariantsVCDelegate
- (void)kwm_addShopWithVariantId:(NSNumber *)identifier quantity:(NSInteger)quantity variant:(BUYProductVariant *) variant buyNow:(BOOL)buyNow callback:(void (^)(BOOL))callback {
__weak KWMNewProductVC *this = self;
if (!buyNow) {
[[KWMShoppingCart sharedInstance] increaseProductWithVariantId:identifier quantity:quantity callback:^(NSError *error, KWMCartResult *cart) {
if (cart.items.firstObject && !cart.items.firstObject.product_id) {
KWMShopCartModel *model = cart.items.firstObject;
BUYImageLink *il = this.product.images.firstObject;
// model.imageStr = [KWMImageUtil getProductImageUrl:this.product.identifier ImageSize:NormalImage];
model.imageStr = [KWMImageUtil getProductImageUrlByOriginalUrl:il.sourceURL.absoluteString ImageSize:NormalImage];
model.name = this.product.title;
model.brand = this.product.vendor;
model.size = variant.title;
// model.price = variant.price.floatValue;
model.price = variant.price;
model.product_id = this.product.identifier;
}
if (!error) {
[this showToast:@"添加成功"];
callback(YES);
}else{
[this showError:error];
callback(NO);
}
}];
return;
}
callback(YES);
KWMUserModel *useModel = [KWMUserModel shareUser];
if (!useModel.status) {
//登录
KWMLoginVC *loginVc = (KWMLoginVC *)[KWMBaseVC findControllerBy:[KWMLoginVC kwmTag] fromStoryboard:@"Login"];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:loginVc];
[self presentViewController:nav animated:YES completion:nil];
return;
}
[self showLoading];
[self.api tmpCartWithVariantId:identifier quantity:quantity success:^(NSURLSessionDataTask *task, NSString *cartCookie) {
[this hideLoading];
KWMBeforePayVC *beforePayVC = (KWMBeforePayVC *)[KWMBaseVC findControllerBy:[KWMBeforePayVC kwmTag] fromStoryboard:@"ShopCart"];
beforePayVC.cartCookie = cartCookie;
[this.navigationController pushViewController:beforePayVC animated:YES];
} failure:^(NSURLSessionDataTask *task, NSError *error) {
[this showError:error];
}];
}
#pragma mark - API BUYClient+Storefront
-(void)requestProductDetail{
if(!self.productId && !self.product){
return;
}
[self showLoading];
__weak KWMNewProductVC *weakSelf = self;
[self.client getProductById:self.productId?:self.product.identifier completion:^(BUYProduct * _Nullable product, NSError * _Nullable error) {
[weakSelf hideLoading];
if(error){
[weakSelf showError:error];
}else if(product){
weakSelf.product = product;
[weakSelf.detailView1 setData:product];
}
}];
}
-(void)requestBrandProducts:(NSInteger)page{
// if(!self.product){
// return;
// }
NSString *handle = @"girls";
self.detailView2.isLoadingSameBrand = YES;
__weak KWMNewProductVC *weakSelf = self;
[self.client getCollectionByHandle:handle completion:^(BUYCollection * _Nullable collection, NSError * _Nullable error) {
if(collection && !error){
[weakSelf.client getProductsPage:page inCollection:collection.identifier completion:^(NSArray<BUYProduct *> * _Nullable products, NSUInteger page, BOOL reachedEnd, NSError * _Nullable error) {
weakSelf.detailView2.isLoadingSameBrand = NO;
[weakSelf.detailView2 setData:products isSameBrand:YES];
}];
}else{
weakSelf.detailView2.isLoadingSameBrand = NO;
}
}];
}
-(void)requestCategoryProducts:(NSInteger)page{
// if(!self.product){
// return;
// }
NSString *handle = @"girls";
self.detailView2.isLoadingSameType = YES;
__weak KWMNewProductVC *weakSelf = self;
[self.client getCollectionByHandle:handle completion:^(BUYCollection * _Nullable collection, NSError * _Nullable error) {
if(collection && !error){
[weakSelf.client getProductsPage:page inCollection:collection.identifier completion:^(NSArray<BUYProduct *> * _Nullable products, NSUInteger page, BOOL reachedEnd, NSError * _Nullable error) {
weakSelf.detailView2.isLoadingSameType = NO;
[weakSelf.detailView2 setData:products isSameBrand:NO];
}];
}else{
weakSelf.detailView2.isLoadingSameType = NO;
}
}];
}
@end
//
// KWMSelectSizeViewController.h
// iCemarose
//
// Created by HouWeiBin on 17/6/26.
// Copyright © 2017年 kollway. All rights reserved.
//
// 原来的有点乱,重新整理一下,逻辑不复杂,还是跟原来一样,选完存好,然后回调到delegate.因为原selectSizeVC的逻辑到时候可能会再次被修改,所以,这个页面的版本时,需要注意下,逻辑是否需要更新。
#import "KWMBaseVC.h"
#import "Buy/Buy.h"
#import "KWMSizeCell.h"
#import "KWMShopCartData.h"
#import "KWMVariants.h"
@protocol KWMVariantsVCDelegate <NSObject>
- (void)kwm_addShopWithVariantId:(NSNumber *) identifier quantity:(NSInteger) quantity variant:(BUYProductVariant *) variant buyNow:(BOOL) buyNow callback:(void(^)(BOOL)) callback;
@end
@interface KWMVariantsVC : KWMBaseVC<UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
@property (weak, nonatomic) id<KWMVariantsVCDelegate> delegate;
//請求api拿到的admin 規格列表,主要使用到其中的庫存剩餘字段
@property (nonatomic) NSArray<KWMVariants *> *adminVariantArray;
@property (nonatomic) NSArray<BUYProductVariant *> *variantArray;
@property (nonatomic) KWMShopCartModel *shopCartModel;
@property (nonatomic) BUYProduct *product;
@end
//
// KWMSelectSizeViewController.m
// iCemarose
//
// Created by HouWeiBin on 17/6/26.
// Copyright © 2016年 kollway. All rights reserved.
//
#import "KWMVariantsVC.h"
#import "KWMProductSizeCell.h"
#import "KWMProductColorCell.h"
#import "KWMCurrencyUtil.h"
#import "BUYProductVariant+Currency.h"
#import "UIColor+SAMAdditions.h"
@interface KWMVariantsVC ()
@property(nonatomic,weak) IBOutlet NSLayoutConstraint *vContentHeight;
@property (weak, nonatomic) IBOutlet UICollectionView *cvVariants;
@property(nonatomic) IBOutlet UILabel *lbPrice;
@property(nonatomic) IBOutlet UILabel *lbCount;
@property(nonatomic) NSInteger count;
@property(nonatomic) NSDecimalNumber *totalPrice;
@property(nonatomic) BUYProductVariant *selectVariant;
@property(nonatomic) KWMVariants *selectAdminVariant;
@end
@implementation KWMVariantsVC
+(NSString *)kwmTag{
return @"KWMVariantsVC";
}
-(void)viewDidLoad{
[super viewDidLoad];
[self initView];
}
-(NSDecimalNumber *)totalPrice{
if(_totalPrice){
return _totalPrice;
}
return [NSDecimalNumber decimalNumberWithString:@"0"];
}
-(NSArray<BUYProductVariant *> *)variantArray{
if(_variantArray){
return _variantArray;
}
return [NSArray array];
}
-(void)setAdminVariantArray:(NSArray<KWMVariants *> *)adminVariantArray{
_adminVariantArray = adminVariantArray;
if(adminVariantArray && self.selectVariant){
for(KWMVariants *variant in adminVariantArray){
if(self.selectVariant.identifier.integerValue == variant.id.integerValue){
self.selectAdminVariant = variant;
}
}
}
}
-(void)setProduct:(BUYProduct *)product{
_product = product;
if(!_variantArray && product){
self.variantArray = product.variantsArray;
}
}
-(void)setShopCartModel:(KWMShopCartModel *)shopCartModel{
_shopCartModel = shopCartModel;
if(shopCartModel && self.variantArray){
for (BUYProductVariant *variant in self.variantArray){
if([shopCartModel.size isEqualToString:variant.title]){
self.selectVariant = variant;
self.count = shopCartModel.quantity;
}
}
}
}
-(void)initView{
[self initUI];
[self initCollectionView];
[self initContentHeight];
}
-(void)initUI{
if(self.selectVariant){
self.totalPrice = [self.selectVariant.price decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithDecimal:@(self.count).decimalValue]];
}
self.lbCount.text = [NSString stringWithFormat:@"%ld",(long)self.count];
self.lbPrice.text = [[KWMCurrencyUtil sharedInstance] priceFormatted:self.totalPrice];
}
-(void)initCollectionView{
[self.cvVariants registerNib:[UINib nibWithNibName:NSStringFromClass([KWMProductColorCell class]) bundle:nil] forCellWithReuseIdentifier:NSStringFromClass([KWMProductColorCell class])];
[self.cvVariants registerNib:[UINib nibWithNibName:NSStringFromClass([KWMProductSizeCell class]) bundle:nil] forCellWithReuseIdentifier:NSStringFromClass([KWMProductSizeCell class])];
[self.cvVariants registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"UICollectionViewHeader"];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];
layout.minimumLineSpacing = 12;
layout.sectionInset = UIEdgeInsetsMake(0, 35, 0, 35);
layout.headerReferenceSize = CGSizeMake(UI_SCREEN_WIDTH, 45);
self.cvVariants.collectionViewLayout = layout;
}
//初始化佈局高度
-(void)initContentHeight{
if(self.product != nil && self.product.variantsArray!=nil){
NSInteger sizesHeight = 0;
{
NSInteger cellCount = self.product.variantsArray.count;
if(cellCount <=0){
return;
}
NSInteger cellWidth = (UI_SCREEN_WIDTH - (30 + 30) - (10*3)) / 3;
NSInteger cellHeight = cellWidth * 0.4;
NSInteger lineCount = (cellCount +2) / 3;
sizesHeight = lineCount * cellHeight + 12 *(lineCount - 1) + 45;
}
NSInteger colorsHeight = 0;
{
NSInteger cellCount = 8;
NSInteger cellWidth = 50;
NSInteger cellHeight = 70;
NSInteger lineItmesNum = (UI_SCREEN_WIDTH - 70 - 12) / (12 + cellWidth);
NSInteger lineCount = (cellCount + lineItmesNum -1) / lineItmesNum;
colorsHeight = lineCount * cellHeight + 12 *(lineCount - 1) + 45;
}
NSInteger contentHeight = 173 + sizesHeight + colorsHeight;
NSInteger maxHeight = UI_SCREEN_HEITHT * 0.8;
self.vContentHeight.constant = fminl(contentHeight,maxHeight);
}
}
-(IBAction)onClickAdd:(id)sender{
if(self.selectVariant){
if(self.selectAdminVariant && self.count + 1 > self.selectAdminVariant.inventoryQuantity.integerValue){
[self showToast:@"商品剩余数量不足"];
return;
}
self.count ++;
[self initUI];
}else{
[self showToast:@"请选择您想要的规格"];
}
}
-(IBAction)onClickReduce:(id)sender{
if(self.selectVariant){
self.count = self.count == 1?:self.count-1;
[self initUI];
}else{
[self showToast:@"请选择您想要的规格"];
}
}
/**
* 点击加入购物车
*
* @param sender <#sender description#>
*/
-(IBAction)onClickComplete:(UIButton *)sender{
if (self.selectVariant == nil || self.count==0) {
[self showToast:@"请选择您想要的规格"];
return;
}
if (self.product && !self.product.JSONDictionary){
[self showToast:@"该商品信息缺失"];
return;
}
BOOL buyNow = sender.tag == 1;
__weak id this = self;
[self showLoading];
if (self.delegate) {
[self.delegate kwm_addShopWithVariantId:self.selectVariant.identifier quantity:self.count variant:self.selectVariant buyNow:buyNow callback:^(BOOL success) {
[self hideLoading];
if(success) {
[this dismissViewControllerAnimated:YES completion:nil];
}
}];
}
}
-(IBAction)onClickBg:(id)sender{
[self dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark -- UICollectionViewDataSource UICollectionViewDelegate
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
return 2;
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
if(section == 0){
return self.variantArray.count;
}else{
return 8;
}
}
//创建头视图
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
viewForSupplementaryElementOfKind:(NSString *)kind
atIndexPath:(NSIndexPath *)indexPath {
UICollectionReusableView *headView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"UICollectionViewHeader" forIndexPath:indexPath];
NSString *sizeTitle = @"尺寸";
if(self.selectAdminVariant && self.selectAdminVariant.inventoryQuantity.integerValue <= 5){
sizeTitle = [NSString stringWithFormat:@"尺寸 (仅剩%@件)",self.selectAdminVariant.inventoryQuantity.stringValue];
}
[headView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
UILabel *headerLabel = [[UILabel alloc]initWithFrame:CGRectMake(35, 15, UI_SCREEN_WIDTH-80,30)];
headerLabel.textColor = [UIColor sam_colorWithHex:@"393939"];
headerLabel.font = [UIFont systemFontOfSize:12.5];
headerLabel.text = indexPath.section == 0?sizeTitle:@"颜色";
[headView addSubview:headerLabel];
return headView;
}
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section == 0){
KWMProductSizeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([KWMProductSizeCell class]) forIndexPath:indexPath];
BUYProductVariant *variant = [self.variantArray objectAtIndex:indexPath.row];
KWMVariants *adminVariant = nil;
if(self.adminVariantArray && self.adminVariantArray.count>indexPath.row){
for(KWMVariants *mAdminVariant in self.adminVariantArray){
if(variant.identifier.integerValue == mAdminVariant.id.integerValue){
adminVariant = mAdminVariant;
}
}
}
BOOL isSelect = [self isSelect:variant];
BOOL isSellOut = [self isSellOut:variant adminVariant:adminVariant];
cell.isSelect = isSelect;
cell.isSellOut = isSellOut;
cell.productVariant = variant;
return cell;
}else{
KWMProductColorCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([KWMProductColorCell class]) forIndexPath:indexPath];
cell.isSelect = indexPath.row == 1;
return cell;
}
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section == 0){
NSInteger width = (UI_SCREEN_WIDTH - (30 + 30) - (10*3)) / 3;
NSInteger height = width * 0.4;
return (CGSize){width,height};
}else{
return (CGSize){50,70};
}
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section == 0){
BUYProductVariant *variant = [self.variantArray objectAtIndex:indexPath.row];
KWMVariants *adminVariant = nil;
if(self.adminVariantArray && self.adminVariantArray.count>indexPath.row){
for(KWMVariants *mAdminVariant in self.adminVariantArray){
if(variant.identifier.integerValue == mAdminVariant.id.integerValue){
adminVariant = mAdminVariant;
}
}
}
BOOL isSellOut = [self isSellOut:variant adminVariant:adminVariant];
if(isSellOut){
return;
}
if(!self.selectVariant || self.selectVariant.identifierValue != variant.identifierValue){
self.count = 1;
}
self.selectVariant = variant;
self.selectAdminVariant = adminVariant;
[self.cvVariants reloadData];
[self initUI];
}
}
#pragma mark -- API KWMAPIManager getAdminProduct
-(void)requestAdminProduct:(NSNumber *)productId{
if(productId == nil){
return;
}
__weak KWMVariantsVC *weakSelf = self;
void(^failure)(NSURLSessionDataTask *,NSError *) = ^(NSURLSessionDataTask *task,NSError *error){
[weakSelf showError:error];
};
void(^success)(NSURLSessionDataTask *,KWMProductResult *) = ^(NSURLSessionDataTask *task,KWMProductResult *result){
if(result!=nil && result.product!=nil){
KWMProduct* adminProduct = (KWMProduct *)result.product;
NSArray<KWMVariants *> *adminVariants = adminProduct.variants;
weakSelf.adminVariantArray = adminVariants;
[weakSelf.cvVariants reloadData];
}
};
[self.api getAdminProduct:nil productId:productId success:success failure:failure];
}
#pragma mark --ProductVariantUtil
-(BOOL)isSellOut:(BUYProductVariant *)variant adminVariant:(KWMVariants *)adminVariant{
BOOL isSellOut = NO;
if(variant){
isSellOut = variant.availableValue;
}
if(adminVariant && !isSellOut){
isSellOut = adminVariant.inventoryQuantity.integerValue == 0;
}
return isSellOut;
}
-(BOOL)isSelect:(BUYProductVariant *)variant{
if(variant && self.selectVariant){
return variant.identifier.integerValue == self.selectVariant.identifier.integerValue;
};
return NO;
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--新商品详情-->
<scene sceneID="fO1-9n-Cyi">
<objects>
<viewController storyboardIdentifier="KWMNewProductVC" hidesBottomBarWhenPushed="YES" useStoryboardIdentifierAsRestorationIdentifier="YES" id="Vzq-D6-e57" userLabel="新商品详情" customClass="KWMNewProductVC" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Pjy-Ny-sa9"/>
<viewControllerLayoutGuide type="bottom" id="5rs-FM-Imo"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="IxM-8o-F8K">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kgb-zB-eBa">
<rect key="frame" x="0.0" y="20" width="375" height="30"/>
<subviews>
<view alpha="0.5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BOo-eV-XG1">
<rect key="frame" x="0.0" y="0.0" width="375" height="30"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rOq-W5-pGL" userLabel="返回">
<rect key="frame" x="18" y="0.0" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="SGb-fZ-yeP"/>
<constraint firstAttribute="height" constant="30" id="oKg-42-WkV"/>
</constraints>
<state key="normal" image="button_close"/>
<connections>
<action selector="onClickClose:" destination="Vzq-D6-e57" eventType="touchUpInside" id="d9S-j8-Ks4"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GyL-XU-Wjr" userLabel="分享">
<rect key="frame" x="292" y="6" width="22" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="WAd-Ea-6Ih"/>
<constraint firstAttribute="width" constant="22" id="pvF-z2-BcF"/>
</constraints>
<state key="normal" image="ic_new_share"/>
<connections>
<action selector="onClickShare:" destination="Vzq-D6-e57" eventType="touchUpInside" id="7zQ-Jy-RgY"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jLv-Vv-7Vi" userLabel="喜欢">
<rect key="frame" x="334" y="4" width="19" height="22"/>
<state key="normal" image="ic_like"/>
<connections>
<action selector="onClickLike:" destination="Vzq-D6-e57" eventType="touchUpInside" id="MAt-Kp-nD0"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="BOo-eV-XG1" firstAttribute="top" secondItem="kgb-zB-eBa" secondAttribute="top" id="8cl-dn-I5o"/>
<constraint firstItem="GyL-XU-Wjr" firstAttribute="centerY" secondItem="kgb-zB-eBa" secondAttribute="centerY" id="Ltj-mk-fJP"/>
<constraint firstItem="jLv-Vv-7Vi" firstAttribute="centerY" secondItem="kgb-zB-eBa" secondAttribute="centerY" id="WAN-4s-tI4"/>
<constraint firstItem="rOq-W5-pGL" firstAttribute="centerY" secondItem="kgb-zB-eBa" secondAttribute="centerY" id="XpS-mY-aeh"/>
<constraint firstItem="rOq-W5-pGL" firstAttribute="leading" secondItem="kgb-zB-eBa" secondAttribute="leading" constant="18" id="YFh-BG-OWt"/>
<constraint firstItem="jLv-Vv-7Vi" firstAttribute="leading" secondItem="GyL-XU-Wjr" secondAttribute="trailing" constant="20" id="fdV-Ka-uBj"/>
<constraint firstAttribute="trailing" secondItem="jLv-Vv-7Vi" secondAttribute="trailing" constant="22" id="jTo-3x-wfd"/>
<constraint firstItem="BOo-eV-XG1" firstAttribute="leading" secondItem="kgb-zB-eBa" secondAttribute="leading" id="qRf-xm-atP"/>
<constraint firstAttribute="bottom" secondItem="BOo-eV-XG1" secondAttribute="bottom" id="uam-hn-aQd"/>
<constraint firstAttribute="height" constant="30" id="vlJ-Bg-nSx"/>
<constraint firstAttribute="trailing" secondItem="BOo-eV-XG1" secondAttribute="trailing" id="xjI-ha-DFF"/>
</constraints>
</view>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" translatesAutoresizingMaskIntoConstraints="NO" id="T6J-Gp-5iu">
<rect key="frame" x="0.0" y="50" width="375" height="567"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X5Y-fo-qOg">
<rect key="frame" x="-0.5" y="0.0" width="375" height="1520"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2KH-pA-K5l" customClass="KWMFirstDetailView">
<rect key="frame" x="0.0" y="0.0" width="375" height="550"/>
<color key="backgroundColor" red="0.84705882349999995" green="0.85882352939999995" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="550" id="Glf-Jb-iqu"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pyO-1P-iAa" customClass="KWMSecondDetailView">
<rect key="frame" x="0.0" y="550" width="375" height="440"/>
<color key="backgroundColor" red="0.82745098039999998" green="0.83921568629999999" blue="0.85098039219999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="440" id="SH3-J6-rwf"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yY4-we-Oux" customClass="KWMThirdDetailView">
<rect key="frame" x="0.0" y="990" width="375" height="530"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.81960784310000001" blue="0.74117647060000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="530" id="54s-uW-LSA"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="yY4-we-Oux" firstAttribute="top" secondItem="pyO-1P-iAa" secondAttribute="bottom" id="04S-ES-xRD"/>
<constraint firstAttribute="trailing" secondItem="yY4-we-Oux" secondAttribute="trailing" id="4ES-7M-OJq"/>
<constraint firstItem="2KH-pA-K5l" firstAttribute="top" secondItem="X5Y-fo-qOg" secondAttribute="top" id="8uT-aR-dQJ"/>
<constraint firstAttribute="bottom" secondItem="yY4-we-Oux" secondAttribute="bottom" id="Di8-tX-XHf"/>
<constraint firstItem="yY4-we-Oux" firstAttribute="leading" secondItem="X5Y-fo-qOg" secondAttribute="leading" id="JA6-VG-FgH"/>
<constraint firstItem="pyO-1P-iAa" firstAttribute="top" secondItem="2KH-pA-K5l" secondAttribute="bottom" id="LRX-8F-hu0"/>
<constraint firstItem="2KH-pA-K5l" firstAttribute="leading" secondItem="X5Y-fo-qOg" secondAttribute="leading" id="Mxu-Xv-sPL"/>
<constraint firstAttribute="trailing" secondItem="pyO-1P-iAa" secondAttribute="trailing" id="WDZ-oF-tpJ"/>
<constraint firstAttribute="trailing" secondItem="2KH-pA-K5l" secondAttribute="trailing" id="etv-Gx-qLz"/>
<constraint firstItem="pyO-1P-iAa" firstAttribute="leading" secondItem="X5Y-fo-qOg" secondAttribute="leading" id="rsZ-aZ-dnV"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="X5Y-fo-qOg" firstAttribute="top" secondItem="T6J-Gp-5iu" secondAttribute="top" id="71V-OE-Ofi"/>
<constraint firstAttribute="bottom" secondItem="X5Y-fo-qOg" secondAttribute="bottom" id="HoY-1Q-AcT"/>
<constraint firstItem="X5Y-fo-qOg" firstAttribute="leading" secondItem="T6J-Gp-5iu" secondAttribute="leading" id="h6q-Q9-Ege"/>
<constraint firstItem="X5Y-fo-qOg" firstAttribute="width" secondItem="T6J-Gp-5iu" secondAttribute="width" id="hDJ-lJ-uUw"/>
<constraint firstAttribute="trailing" secondItem="X5Y-fo-qOg" secondAttribute="trailing" id="pEC-kc-M4x"/>
</constraints>
</scrollView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aqB-2y-BKU" userLabel="底部">
<rect key="frame" x="0.0" y="617" width="375" height="50"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p6D-hx-qVB" userLabel="购物车">
<rect key="frame" x="0.0" y="0.0" width="80" height="50"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gbx-rg-A8B">
<rect key="frame" x="29" y="14" width="22" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="LNO-nm-wog"/>
<constraint firstAttribute="width" constant="22" id="ou3-wY-jk0"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<inset key="contentEdgeInsets" minX="7" minY="5" maxX="0.0" maxY="0.0"/>
<state key="normal" title="0" backgroundImage="btn_ nav_shop cart">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" constant="80" id="0qC-Tw-VN0"/>
<constraint firstItem="gbx-rg-A8B" firstAttribute="centerX" secondItem="p6D-hx-qVB" secondAttribute="centerX" id="fWx-g7-oy7"/>
<constraint firstItem="gbx-rg-A8B" firstAttribute="centerY" secondItem="p6D-hx-qVB" secondAttribute="centerY" id="fet-ki-2vJ"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YFr-wz-mgl">
<rect key="frame" x="80" y="0.0" width="147.5" height="50"/>
<color key="backgroundColor" red="0.94509803921568625" green="0.5725490196078431" blue="0.60392156862745094" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<state key="normal" title="立即购买">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oPf-c2-z7n">
<rect key="frame" x="227.5" y="0.0" width="147.5" height="50"/>
<color key="backgroundColor" red="0.14117647058823529" green="0.14117647058823529" blue="0.14117647058823529" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<state key="normal" title="加入购物车">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jxc-tQ-Uvl" userLabel="line">
<rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
<color key="backgroundColor" red="0.84705882352941175" green="0.85882352941176465" blue="0.87058823529411766" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="dEf-Kf-tOU"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="p6D-hx-qVB" firstAttribute="leading" secondItem="aqB-2y-BKU" secondAttribute="leading" id="9CF-cd-J2w"/>
<constraint firstAttribute="trailing" secondItem="oPf-c2-z7n" secondAttribute="trailing" id="Iie-17-jiS"/>
<constraint firstAttribute="trailing" secondItem="Jxc-tQ-Uvl" secondAttribute="trailing" id="KMf-E2-2Eb"/>
<constraint firstAttribute="bottom" secondItem="oPf-c2-z7n" secondAttribute="bottom" id="QCf-h9-wdW"/>
<constraint firstItem="Jxc-tQ-Uvl" firstAttribute="leading" secondItem="aqB-2y-BKU" secondAttribute="leading" id="RKe-Wt-6Io"/>
<constraint firstItem="Jxc-tQ-Uvl" firstAttribute="top" secondItem="aqB-2y-BKU" secondAttribute="top" id="UAc-9x-8KP"/>
<constraint firstAttribute="height" constant="50" id="WhH-yK-gHq"/>
<constraint firstItem="YFr-wz-mgl" firstAttribute="leading" secondItem="p6D-hx-qVB" secondAttribute="trailing" id="Z0o-FF-rB3"/>
<constraint firstItem="p6D-hx-qVB" firstAttribute="top" secondItem="aqB-2y-BKU" secondAttribute="top" id="fu6-hx-f4P"/>
<constraint firstItem="YFr-wz-mgl" firstAttribute="top" secondItem="aqB-2y-BKU" secondAttribute="top" id="j1Q-pi-pXT"/>
<constraint firstItem="oPf-c2-z7n" firstAttribute="width" secondItem="YFr-wz-mgl" secondAttribute="width" id="mIU-GL-6wk"/>
<constraint firstAttribute="bottom" secondItem="YFr-wz-mgl" secondAttribute="bottom" id="tzq-Bv-AW5"/>
<constraint firstAttribute="bottom" secondItem="p6D-hx-qVB" secondAttribute="bottom" id="xmU-d2-ftF"/>
<constraint firstItem="oPf-c2-z7n" firstAttribute="top" secondItem="aqB-2y-BKU" secondAttribute="top" id="zGa-rZ-bYk"/>
<constraint firstItem="oPf-c2-z7n" firstAttribute="leading" secondItem="YFr-wz-mgl" secondAttribute="trailing" id="zYC-I5-kAq"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="aqB-2y-BKU" secondAttribute="trailing" id="2B4-2I-dss"/>
<constraint firstItem="kgb-zB-eBa" firstAttribute="top" secondItem="Pjy-Ny-sa9" secondAttribute="bottom" id="3J0-tF-Mna"/>
<constraint firstItem="aqB-2y-BKU" firstAttribute="leading" secondItem="IxM-8o-F8K" secondAttribute="leading" id="6I6-ul-bGF"/>
<constraint firstAttribute="bottom" secondItem="aqB-2y-BKU" secondAttribute="bottom" id="97w-S0-S0x"/>
<constraint firstAttribute="trailing" secondItem="T6J-Gp-5iu" secondAttribute="trailing" id="B5K-Fj-FOR"/>
<constraint firstItem="T6J-Gp-5iu" firstAttribute="leading" secondItem="IxM-8o-F8K" secondAttribute="leading" id="DZE-DY-3SX"/>
<constraint firstAttribute="trailing" secondItem="kgb-zB-eBa" secondAttribute="trailing" id="FyY-BZ-73X"/>
<constraint firstItem="kgb-zB-eBa" firstAttribute="leading" secondItem="IxM-8o-F8K" secondAttribute="leading" id="KfD-qL-WSj"/>
<constraint firstItem="aqB-2y-BKU" firstAttribute="top" secondItem="T6J-Gp-5iu" secondAttribute="bottom" id="kEG-am-iPo"/>
<constraint firstItem="T6J-Gp-5iu" firstAttribute="top" secondItem="Pjy-Ny-sa9" secondAttribute="bottom" constant="30" id="nNS-e6-C1V"/>
</constraints>
</view>
<connections>
<outlet property="detailView1" destination="2KH-pA-K5l" id="ynO-by-UfZ"/>
<outlet property="detailView2" destination="pyO-1P-iAa" id="scJ-Iv-fnz"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="uHF-Hi-PUR" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-298.39999999999998" y="68.815592203898049"/>
</scene>
<!--选择规格-->
<scene sceneID="V5g-Le-Who">
<objects>
<viewController storyboardIdentifier="KWMVariantsVC" useStoryboardIdentifierAsRestorationIdentifier="YES" id="ynx-GL-rEc" userLabel="选择规格" customClass="KWMVariantsVC" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="gGw-Nt-jDi"/>
<viewControllerLayoutGuide type="bottom" id="qc8-5Y-jmQ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="FcM-Ya-Fa9">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vHl-zd-90x" userLabel="bg">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<connections>
<action selector="onClickBg:" destination="ynx-GL-rEc" eventType="touchUpInside" id="cIV-IB-cGW"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fdk-xz-fYd">
<rect key="frame" x="0.0" y="326" width="375" height="341"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="tSf-47-Vo5">
<rect key="frame" x="0.0" y="0.0" width="375" height="168"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="K9q-sw-y7y">
<size key="itemSize" width="50" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="35" minY="10" maxX="35" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="pbX-zp-NVe">
<rect key="frame" x="35" y="10" width="50" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<autoresizingMask key="autoresizingMask"/>
</view>
</collectionViewCell>
</cells>
<connections>
<outlet property="dataSource" destination="ynx-GL-rEc" id="DUJ-dN-ymd"/>
<outlet property="delegate" destination="ynx-GL-rEc" id="FBu-gM-1Jh"/>
</connections>
</collectionView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zhl-Qy-ueI" userLabel="vCount">
<rect key="frame" x="138" y="183" width="100" height="25"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_count_bg" translatesAutoresizingMaskIntoConstraints="NO" id="DfC-Cu-fsO">
<rect key="frame" x="0.0" y="0.0" width="100" height="25"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fSB-sd-cd2">
<rect key="frame" x="0.0" y="0.0" width="24" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="Bvq-dq-h3z"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<state key="normal" title="-">
<color key="titleColor" red="0.29803921570000003" green="0.34901960780000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="onClickReduce:" destination="ynx-GL-rEc" eventType="touchUpInside" id="ixD-z9-vNT"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="P9s-sD-HEm">
<rect key="frame" x="76" y="0.0" width="24" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="oF4-QI-Cfg"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<state key="normal" title="+">
<color key="titleColor" red="0.29803921570000003" green="0.34901960780000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="onClickAdd:" destination="ynx-GL-rEc" eventType="touchUpInside" id="Q7p-IO-n2k"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GZ8-oT-VCl">
<rect key="frame" x="46" y="4" width="8" height="18"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12.5"/>
<color key="textColor" red="0.29803921570000003" green="0.34901960780000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="GZ8-oT-VCl" firstAttribute="centerX" secondItem="zhl-Qy-ueI" secondAttribute="centerX" id="K40-Mf-ce8"/>
<constraint firstItem="fSB-sd-cd2" firstAttribute="top" secondItem="zhl-Qy-ueI" secondAttribute="top" id="Uc6-Ix-95U"/>
<constraint firstAttribute="bottom" secondItem="DfC-Cu-fsO" secondAttribute="bottom" id="VoT-QR-h6K"/>
<constraint firstAttribute="bottom" secondItem="P9s-sD-HEm" secondAttribute="bottom" id="XM2-BU-qao"/>
<constraint firstItem="DfC-Cu-fsO" firstAttribute="top" secondItem="zhl-Qy-ueI" secondAttribute="top" id="aoy-fs-jux"/>
<constraint firstAttribute="height" constant="25" id="bsB-2Q-000"/>
<constraint firstItem="P9s-sD-HEm" firstAttribute="top" secondItem="zhl-Qy-ueI" secondAttribute="top" id="e3s-4V-Bl3"/>
<constraint firstAttribute="trailing" secondItem="DfC-Cu-fsO" secondAttribute="trailing" id="oRf-dv-BWT"/>
<constraint firstItem="fSB-sd-cd2" firstAttribute="leading" secondItem="zhl-Qy-ueI" secondAttribute="leading" id="sDi-NS-I5W"/>
<constraint firstItem="GZ8-oT-VCl" firstAttribute="centerY" secondItem="zhl-Qy-ueI" secondAttribute="centerY" id="sjm-It-QG4"/>
<constraint firstAttribute="trailing" secondItem="P9s-sD-HEm" secondAttribute="trailing" id="tOt-pQ-Rlr"/>
<constraint firstAttribute="bottom" secondItem="fSB-sd-cd2" secondAttribute="bottom" id="tja-8r-cVG"/>
<constraint firstItem="DfC-Cu-fsO" firstAttribute="leading" secondItem="zhl-Qy-ueI" secondAttribute="leading" id="vtF-A2-a7u"/>
<constraint firstAttribute="width" constant="100" id="zNB-EG-Osd"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sxh-ev-heN" userLabel="vPrice">
<rect key="frame" x="0.0" y="223" width="375" height="118"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥ 0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0UA-fW-OwV">
<rect key="frame" x="157.5" y="15" width="60.5" height="28"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="20"/>
<color key="textColor" red="0.94509803920000002" green="0.57254901960000004" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bv0-if-YIV">
<rect key="frame" x="40" y="53" width="295" height="50"/>
<subviews>
<button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="C4u-xt-2s1">
<rect key="frame" x="0.0" y="0.0" width="118" height="50"/>
<state key="normal" title="快速购买">
<color key="titleColor" red="0.22352941179999999" green="0.22352941179999999" blue="0.22352941179999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="P3A-dC-QQI">
<rect key="frame" x="118" y="0.0" width="177" height="50"/>
<color key="backgroundColor" red="0.14117647059999999" green="0.14117647059999999" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<state key="normal" title="加入购物车">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="onClickComplete:" destination="ynx-GL-rEc" eventType="touchUpInside" id="DCK-hx-KcK"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="P3A-dC-QQI" firstAttribute="width" secondItem="C4u-xt-2s1" secondAttribute="width" multiplier="1.5" id="4bJ-EC-NQb"/>
<constraint firstAttribute="bottom" secondItem="P3A-dC-QQI" secondAttribute="bottom" id="66c-RJ-30R"/>
<constraint firstItem="P3A-dC-QQI" firstAttribute="leading" secondItem="C4u-xt-2s1" secondAttribute="trailing" id="NDd-7u-iPm"/>
<constraint firstItem="C4u-xt-2s1" firstAttribute="leading" secondItem="bv0-if-YIV" secondAttribute="leading" id="R3u-XO-teD"/>
<constraint firstAttribute="height" constant="50" id="VQW-Mm-ItT"/>
<constraint firstItem="P3A-dC-QQI" firstAttribute="top" secondItem="bv0-if-YIV" secondAttribute="top" id="Ykh-gC-Jvc"/>
<constraint firstAttribute="trailing" secondItem="P3A-dC-QQI" secondAttribute="trailing" id="oPD-Ka-MpD"/>
<constraint firstAttribute="bottom" secondItem="C4u-xt-2s1" secondAttribute="bottom" id="oie-vU-VTd"/>
<constraint firstItem="C4u-xt-2s1" firstAttribute="top" secondItem="bv0-if-YIV" secondAttribute="top" id="qVo-Gd-ffm"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yqA-9X-I58">
<rect key="frame" x="40" y="53" width="295" height="50"/>
<color key="backgroundColor" red="0.14117647059999999" green="0.14117647059999999" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="TFf-97-WRX"/>
</constraints>
<state key="normal" title="完成">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="onClickComplete:" destination="ynx-GL-rEc" eventType="touchUpInside" id="4ZO-AC-BqJ"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jc3-QB-OR0" userLabel="line">
<rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
<color key="backgroundColor" red="0.84705882349999995" green="0.85882352939999995" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Ocr-fh-Ton"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="118" id="013-dJ-riX"/>
<constraint firstItem="0UA-fW-OwV" firstAttribute="centerX" secondItem="sxh-ev-heN" secondAttribute="centerX" id="05A-0R-22N"/>
<constraint firstAttribute="height" constant="118" id="1HT-QP-c7B"/>
<constraint firstItem="Jc3-QB-OR0" firstAttribute="top" secondItem="sxh-ev-heN" secondAttribute="top" id="26B-zl-TpI"/>
<constraint firstItem="bv0-if-YIV" firstAttribute="leading" secondItem="sxh-ev-heN" secondAttribute="leading" constant="40" id="4Ut-u6-EsE"/>
<constraint firstItem="0UA-fW-OwV" firstAttribute="top" secondItem="sxh-ev-heN" secondAttribute="top" constant="15" id="WGA-Vh-7Gx"/>
<constraint firstAttribute="bottom" secondItem="yqA-9X-I58" secondAttribute="bottom" constant="15" id="ech-21-s6C"/>
<constraint firstItem="Jc3-QB-OR0" firstAttribute="leading" secondItem="sxh-ev-heN" secondAttribute="leading" id="mXu-3S-dFR"/>
<constraint firstAttribute="trailing" secondItem="bv0-if-YIV" secondAttribute="trailing" constant="40" id="nOV-8w-vZ9"/>
<constraint firstAttribute="trailing" secondItem="Jc3-QB-OR0" secondAttribute="trailing" id="rNd-Fe-yzL"/>
<constraint firstItem="yqA-9X-I58" firstAttribute="leading" secondItem="sxh-ev-heN" secondAttribute="leading" constant="40" id="uap-xf-rNR"/>
<constraint firstAttribute="bottom" secondItem="bv0-if-YIV" secondAttribute="bottom" constant="15" id="woW-9W-nta"/>
<constraint firstAttribute="trailing" secondItem="yqA-9X-I58" secondAttribute="trailing" constant="40" id="yp8-hq-Zx6"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="013-dJ-riX"/>
</mask>
</variation>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="sxh-ev-heN" firstAttribute="leading" secondItem="fdk-xz-fYd" secondAttribute="leading" id="4SX-Wa-4tu"/>
<constraint firstItem="zhl-Qy-ueI" firstAttribute="centerX" secondItem="fdk-xz-fYd" secondAttribute="centerX" id="6Mu-0b-EWN"/>
<constraint firstAttribute="trailing" secondItem="sxh-ev-heN" secondAttribute="trailing" id="96L-ZQ-kE0"/>
<constraint firstItem="sxh-ev-heN" firstAttribute="top" secondItem="zhl-Qy-ueI" secondAttribute="bottom" constant="15" id="FrA-6J-Hsa"/>
<constraint firstAttribute="bottom" secondItem="sxh-ev-heN" secondAttribute="bottom" id="Gdh-8R-vZa"/>
<constraint firstItem="tSf-47-Vo5" firstAttribute="leading" secondItem="fdk-xz-fYd" secondAttribute="leading" id="GoW-Ar-eRM"/>
<constraint firstAttribute="trailing" secondItem="tSf-47-Vo5" secondAttribute="trailing" id="Tq3-NE-ROM"/>
<constraint firstAttribute="height" constant="341" id="YBc-tS-Vne"/>
<constraint firstItem="zhl-Qy-ueI" firstAttribute="top" secondItem="tSf-47-Vo5" secondAttribute="bottom" constant="15" id="px1-er-Sze"/>
<constraint firstItem="tSf-47-Vo5" firstAttribute="top" secondItem="fdk-xz-fYd" secondAttribute="top" id="r3b-zs-9Ut"/>
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TiG-qk-9ZW" userLabel="vRemind">
<rect key="frame" x="0.0" y="285" width="375" height="41"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请在此处输入手机号开通提醒" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="uif-0O-1UL">
<rect key="frame" x="35" y="0.0" width="230" height="40"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<textInputTraits key="textInputTraits"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kgi-gc-ZIG">
<rect key="frame" x="275" y="0.0" width="100" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="huH-7f-bjq"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<state key="normal" title="确定">
<color key="titleColor" red="0.94509803920000002" green="0.57254901960000004" blue="0.60392156860000001" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="onClickRemind:" destination="ynx-GL-rEc" eventType="touchUpInside" id="X4B-KP-aNT"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UJ5-b7-sK5">
<rect key="frame" x="274" y="10" width="1" height="20"/>
<color key="backgroundColor" red="0.84705882349999995" green="0.85882352939999995" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="3KC-AG-jOo"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FTE-Oi-B9X" userLabel="vLine">
<rect key="frame" x="0.0" y="40" width="375" height="1"/>
<color key="backgroundColor" red="0.84705882349999995" green="0.85882352939999995" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Eo1-vW-iUE"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="FTE-Oi-B9X" firstAttribute="leading" secondItem="TiG-qk-9ZW" secondAttribute="leading" id="0K4-GA-Frh"/>
<constraint firstItem="FTE-Oi-B9X" firstAttribute="top" secondItem="Kgi-gc-ZIG" secondAttribute="bottom" id="0yE-V6-cA6"/>
<constraint firstItem="UJ5-b7-sK5" firstAttribute="top" secondItem="TiG-qk-9ZW" secondAttribute="top" constant="10" id="6cD-Rf-6e3"/>
<constraint firstAttribute="bottom" secondItem="FTE-Oi-B9X" secondAttribute="bottom" id="EKF-92-EIE"/>
<constraint firstItem="Kgi-gc-ZIG" firstAttribute="top" secondItem="TiG-qk-9ZW" secondAttribute="top" id="RL5-br-sb0"/>
<constraint firstAttribute="trailing" secondItem="Kgi-gc-ZIG" secondAttribute="trailing" id="VY8-eg-1Vu"/>
<constraint firstItem="Kgi-gc-ZIG" firstAttribute="leading" secondItem="UJ5-b7-sK5" secondAttribute="trailing" id="W59-cP-FY8"/>
<constraint firstItem="uif-0O-1UL" firstAttribute="top" secondItem="TiG-qk-9ZW" secondAttribute="top" id="Xad-nD-XCt"/>
<constraint firstAttribute="height" constant="41" id="fG1-rr-EPU"/>
<constraint firstItem="FTE-Oi-B9X" firstAttribute="top" secondItem="uif-0O-1UL" secondAttribute="bottom" id="jZF-e1-h4N"/>
<constraint firstItem="FTE-Oi-B9X" firstAttribute="top" secondItem="UJ5-b7-sK5" secondAttribute="bottom" constant="10" id="kMC-cz-yUc"/>
<constraint firstItem="Kgi-gc-ZIG" firstAttribute="leading" secondItem="uif-0O-1UL" secondAttribute="trailing" constant="10" id="pNo-51-Psm"/>
<constraint firstItem="uif-0O-1UL" firstAttribute="leading" secondItem="TiG-qk-9ZW" secondAttribute="leading" constant="35" id="yRD-wu-O4U"/>
<constraint firstAttribute="trailing" secondItem="FTE-Oi-B9X" secondAttribute="trailing" id="zL7-BA-qHP"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="vHl-zd-90x" secondAttribute="trailing" id="6Su-re-kzG"/>
<constraint firstItem="fdk-xz-fYd" firstAttribute="top" secondItem="TiG-qk-9ZW" secondAttribute="bottom" id="KZO-B8-qIK"/>
<constraint firstAttribute="trailing" secondItem="fdk-xz-fYd" secondAttribute="trailing" id="kSN-FT-NaO"/>
<constraint firstItem="vHl-zd-90x" firstAttribute="top" secondItem="FcM-Ya-Fa9" secondAttribute="top" id="lDR-mG-00h"/>
<constraint firstItem="qc8-5Y-jmQ" firstAttribute="top" secondItem="fdk-xz-fYd" secondAttribute="bottom" id="lko-ph-zJP"/>
<constraint firstItem="fdk-xz-fYd" firstAttribute="leading" secondItem="FcM-Ya-Fa9" secondAttribute="leading" id="mFg-8v-raH"/>
<constraint firstAttribute="bottom" secondItem="vHl-zd-90x" secondAttribute="bottom" id="mnh-yu-sbQ"/>
<constraint firstItem="TiG-qk-9ZW" firstAttribute="width" secondItem="fdk-xz-fYd" secondAttribute="width" id="q69-c0-KOs"/>
<constraint firstItem="TiG-qk-9ZW" firstAttribute="leading" secondItem="FcM-Ya-Fa9" secondAttribute="leading" id="z0o-6b-ARO"/>
<constraint firstItem="vHl-zd-90x" firstAttribute="leading" secondItem="FcM-Ya-Fa9" secondAttribute="leading" id="zee-C0-Fxb"/>
</constraints>
</view>
<connections>
<outlet property="cvVariants" destination="tSf-47-Vo5" id="xOX-ap-ajm"/>
<outlet property="lbCount" destination="GZ8-oT-VCl" id="LiQ-6e-76f"/>
<outlet property="lbPrice" destination="0UA-fW-OwV" id="ifJ-78-Kc8"/>
<outlet property="vContentHeight" destination="YBc-tS-Vne" id="qU7-CX-T7w"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="MKE-1G-zhs" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="885.60000000000002" y="164.16791604197903"/>
</scene>
</scenes>
<resources>
<image name="btn_ nav_shop cart" width="21" height="22"/>
<image name="button_close" width="16" height="15"/>
<image name="ic_count_bg" width="100" height="25"/>
<image name="ic_like" width="19" height="17"/>
<image name="ic_new_share" width="16" height="18"/>
</resources>
</document>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment