Browse Source

图片处理

南鑫林 5 years ago
parent
commit
4fdeac95ee
12 changed files with 26 additions and 13 deletions
  1. 2 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/Order/View/OrderProductTableViewCell.swift
  2. 2 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundProductCell.swift
  3. 3 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderCommentTableViewCell.swift
  4. 2 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderDetail/View/OrderDetailProductTableViewCell.swift
  5. 2 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/ProductDetailSkuView/ProductDetailSkuView.swift
  6. 2 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductDetailHotSell/ProductDetailHotSellCollectionViewCell.swift
  7. 3 4
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductMallBarChart/ProductMallBarChartCollectionViewCell.swift
  8. 2 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductMallRightSideleftPicture/ProductRightSideleftPictureCollectionViewCell.swift
  9. 2 2
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductMallSlidingLeftRight/ProductSlidingLeftRightCollectionViewCell.swift
  10. 2 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductSlidingTopBottom/ProductSlidingTopBottomCollectionViewCell.swift
  11. 2 3
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/TableViewCell/ProductHBigTableViewCell.swift
  12. 2 3
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/TableViewCell/ProductHSmallTableViewCell.swift

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/Order/View/OrderProductTableViewCell.swift

@@ -88,6 +88,8 @@ class OrderProductTableViewCell: UITableViewCell {
     private lazy var productImageView: UIImageView = {
         let productImageView = UIImageView()
         productImageView.image = kImage(name: "pic_preload")
+        productImageView.contentMode = .scaleAspectFill
+        productImageView.masksToBounds = true
         return productImageView
     }()
     

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundProductCell.swift

@@ -117,6 +117,8 @@ class OrderApplyRefundProductCell: UITableViewCell {
     private lazy var productImageView: UIImageView = {
         let productImageView = UIImageView()
         productImageView.image = kImage(name: "pic_preload")
+        productImageView.contentMode = .scaleAspectFill
+        productImageView.masksToBounds = true
         return productImageView
     }()
     

+ 3 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderCommentTableViewCell.swift

@@ -127,6 +127,9 @@ class OrderCommentTableViewCell: UITableViewCell {
     
     private lazy var iconImageView: UIImageView = {
         let iconImageView = UIImageView()
+        iconImageView.contentMode = .scaleAspectFit
+        iconImageView.contentMode = .scaleAspectFill
+        iconImageView.masksToBounds = true
         return iconImageView
     }()
     

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderDetail/View/OrderDetailProductTableViewCell.swift

@@ -88,6 +88,8 @@ class OrderDetailProductTableViewCell: UITableViewCell {
     
     private lazy var productImageView: UIImageView = {
         let productImageView = UIImageView()
+        productImageView.contentMode = .scaleAspectFill
+        productImageView.masksToBounds = true
         productImageView.image = kImage(name: "pic_preload")
         return productImageView
     }()

+ 2 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/ProductDetailSkuView/ProductDetailSkuView.swift

@@ -176,6 +176,8 @@ class ProductDetailSkuView: FWPopupView {
     private lazy var productImageView: UIImageView = {
         let productImageView = UIImageView()
         productImageView.image = kImage(name: "pic_preload")
+        productImageView.contentMode = .scaleAspectFill
+        productImageView.masksToBounds = true
         return productImageView
     }()
     
@@ -238,7 +240,6 @@ class ProductDetailSkuView: FWPopupView {
     
     private lazy var limitLabel: UILabel = {
         let limitLabel = UILabel()
-        limitLabel.text = "(每人限购3件)"
         limitLabel.textColor = k999999Color
         limitLabel.font = kRegularFont13
         return limitLabel

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductDetailHotSell/ProductDetailHotSellCollectionViewCell.swift

@@ -90,6 +90,8 @@ class ProductDetailHotSellCollectionViewCell: UICollectionViewCell {
     
     private lazy var iconImagView: UIImageView = {
         let iconImagView = UIImageView()
+        iconImagView.contentMode = .scaleAspectFill
+        iconImagView.masksToBounds = true
         iconImagView.image = kImage(name: "pic_preload")
         return iconImagView
     }()

+ 3 - 4
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductMallBarChart/ProductMallBarChartCollectionViewCell.swift

@@ -101,6 +101,9 @@ class ProductMallBarChartCollectionViewCell: UICollectionViewCell {
     
     private lazy var iconImagView: UIImageView = {
         let iconImagView = UIImageView()
+        iconImagView.contentMode = .scaleAspectFill
+        iconImagView.masksToBounds = true
+
         iconImagView.image = kImage(name: "pic_preload")
         return iconImagView
     }()
@@ -118,7 +121,6 @@ class ProductMallBarChartCollectionViewCell: UICollectionViewCell {
     
     private lazy var titleLabel: UILabel = {
         let titleLabel = UILabel()
-        titleLabel.text = "海南冰糖心木瓜 1个装"
         titleLabel.textColor = k333333Color
         titleLabel.font = kScaleMediumFont15
         titleLabel.textAlignment = .left
@@ -128,7 +130,6 @@ class ProductMallBarChartCollectionViewCell: UICollectionViewCell {
     
     private lazy var detailTitleLabel: UILabel = {
         let detailTitleLabel = UILabel()
-        detailTitleLabel.text = "酸甜可口营养无限"
         detailTitleLabel.textColor = k999999Color
         detailTitleLabel.font = kScaleRegularFont12
         detailTitleLabel.textAlignment = .left
@@ -137,7 +138,6 @@ class ProductMallBarChartCollectionViewCell: UICollectionViewCell {
     
     private lazy var sellNumberLabel: UILabel = {
         let sellNumberLabel = UILabel()
-        sellNumberLabel.text = "已售2400件"
         sellNumberLabel.textColor = k333333Color
         sellNumberLabel.font = kScaleRegularFont11
         return sellNumberLabel
@@ -145,7 +145,6 @@ class ProductMallBarChartCollectionViewCell: UICollectionViewCell {
     
     private lazy var sellPriceLabel: UILabel = {
         let sellPriceLabel = UILabel()
-        sellPriceLabel.text = "¥11.8"
         sellPriceLabel.textColor = kfe352bColor
         sellPriceLabel.font = kBoldFont15
         sellPriceLabel.textAlignment = .left

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductMallRightSideleftPicture/ProductRightSideleftPictureCollectionViewCell.swift

@@ -85,6 +85,8 @@ class ProductRightSideleftPictureCollectionViewCell: UICollectionViewCell {
     
     private lazy var iconImagView: UIImageView = {
         let iconImagView = UIImageView()
+        iconImagView.contentMode = .scaleAspectFill
+        iconImagView.masksToBounds = true
         iconImagView.image = kImage(name: "pic_preload")
         return iconImagView
     }()

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductMallSlidingLeftRight/ProductSlidingLeftRightCollectionViewCell.swift

@@ -84,13 +84,14 @@ class ProductSlidingLeftRightCollectionViewCell: UICollectionViewCell {
     
     private lazy var iconImagView: UIImageView = {
         let iconImagView = UIImageView()
+        iconImagView.contentMode = .scaleAspectFill
+        iconImagView.masksToBounds = true
         iconImagView.image = kImage(name: "pic_preload")
         return iconImagView
     }()
     
     private lazy var titleLabel: UILabel = {
         let titleLabel = UILabel()
-        titleLabel.text = "海南冰糖心木瓜 1个装"
         titleLabel.textColor = k333333Color
         titleLabel.font = kScaleMediumFont15
         titleLabel.textAlignment = .left
@@ -100,7 +101,6 @@ class ProductSlidingLeftRightCollectionViewCell: UICollectionViewCell {
     
     private lazy var detailTitleLabel: UILabel = {
         let detailTitleLabel = UILabel()
-        detailTitleLabel.text = "酸甜可口营养无限"
         detailTitleLabel.textColor = k999999Color
         detailTitleLabel.font = kScaleRegularFont12
         detailTitleLabel.textAlignment = .left

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductSlidingTopBottom/ProductSlidingTopBottomCollectionViewCell.swift

@@ -90,6 +90,8 @@ class ProductSlidingTopBottomCollectionViewCell: UICollectionViewCell {
     
     private lazy var iconImagView: UIImageView = {
         let iconImagView = UIImageView()
+        iconImagView.contentMode = .scaleAspectFill
+        iconImagView.masksToBounds = true
         iconImagView.image = kImage(name: "pic_preload")
         return iconImagView
     }()

+ 2 - 3
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/TableViewCell/ProductHBigTableViewCell.swift

@@ -100,12 +100,13 @@ class ProductHBigTableViewCell: UITableViewCell {
     
     private lazy var iconImagView: UIImageView = {
         let iconImagView = UIImageView()
+        iconImagView.contentMode = .scaleAspectFill
+        iconImagView.masksToBounds = true
         return iconImagView
     }()
     
     private lazy var titleLabel: UILabel = {
         let titleLabel = UILabel()
-        titleLabel.text = "海南冰糖心木瓜 1个装"
         titleLabel.textColor = k333333Color
         titleLabel.font = kScaleMediumFont18
         titleLabel.textAlignment = .left
@@ -115,7 +116,6 @@ class ProductHBigTableViewCell: UITableViewCell {
     
     private lazy var detailTitleLabel: UILabel = {
         let detailTitleLabel = UILabel()
-        detailTitleLabel.text = "酸甜可口营养无限"
         detailTitleLabel.textColor = k999999Color
         detailTitleLabel.font = kScaleRegularFont13
         detailTitleLabel.textAlignment = .left
@@ -124,7 +124,6 @@ class ProductHBigTableViewCell: UITableViewCell {
     
     private lazy var sellNumberLabel: UILabel = {
         let sellNumberLabel = UILabel()
-        sellNumberLabel.text = "已售2400件"
         sellNumberLabel.textColor = k333333Color
         sellNumberLabel.font = kScaleRegularFont12
         return sellNumberLabel

+ 2 - 3
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/TableViewCell/ProductHSmallTableViewCell.swift

@@ -88,13 +88,14 @@ class ProductHSmallTableViewCell: UITableViewCell {
     
     private lazy var iconImagView: UIImageView = {
         let iconImagView = UIImageView()
+        iconImagView.contentMode = .scaleAspectFill
+        iconImagView.masksToBounds = true
         iconImagView.image = kImage(name: "iconImagView")
         return iconImagView
     }()
     
     private lazy var titleLabel: UILabel = {
         let titleLabel = UILabel()
-        titleLabel.text = "海南冰糖心木瓜 1个装"
         titleLabel.textColor = k333333Color
         titleLabel.font = kScaleMediumFont15
         titleLabel.textAlignment = .left
@@ -104,7 +105,6 @@ class ProductHSmallTableViewCell: UITableViewCell {
     
     private lazy var detailTitleLabel: UILabel = {
         let detailTitleLabel = UILabel()
-        detailTitleLabel.text = "酸甜可口营养无限"
         detailTitleLabel.textColor = k999999Color
         detailTitleLabel.font = kScaleRegularFont12
         detailTitleLabel.textAlignment = .left
@@ -113,7 +113,6 @@ class ProductHSmallTableViewCell: UITableViewCell {
     
     private lazy var sellNumberLabel: UILabel = {
         let sellNumberLabel = UILabel()
-        sellNumberLabel.text = "已售2400件"
         sellNumberLabel.textColor = k333333Color
         sellNumberLabel.font = kScaleRegularFont11
         return sellNumberLabel