瀏覽代碼

字段限制优化完成

南鑫林 5 年之前
父節點
當前提交
9ad61de18a

+ 2 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/FeaturedTopics/FeaturedTopicsCollectionViewCell.swift

@@ -54,7 +54,7 @@ class FeaturedTopicsCollectionViewCell: UICollectionViewCell {
         topicLabel.snp_makeConstraints { (make) in
             make.centerY.equalTo(iconImageView)
             make.left.equalTo(iconImageView.snp_right).offset(2)
-            make.right.lessThanOrEqualTo(numberPeopleLable.snp_left)
+            make.right.lessThanOrEqualTo(numberPeopleLable.snp_left).offset(-10)
             make.height.equalTo(23)
         }
         numberPeopleLable.snp_makeConstraints { (make) in
@@ -69,6 +69,7 @@ class FeaturedTopicsCollectionViewCell: UICollectionViewCell {
         picImageView.image = kImage(name: "default_pic")
         picImageView.cornerRadius = 4
         picImageView.masksToBounds = true
+        picImageView.contentMode = .scaleAspectFill
         return picImageView
     }()
     

+ 3 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/RecommendFollow/CommunityRecommendFollowCollectionViewCell.swift

@@ -68,7 +68,8 @@ class CommunityRecommendFollowCollectionViewCell: UICollectionViewCell {
         
         topicLabel.snp_makeConstraints { (make) in
             make.top.equalTo(titleButton.snp_bottom).offset(4)
-            make.centerX.equalToSuperview()
+            make.left.equalTo(10)
+            make.right.equalTo(-10)
             make.height.equalTo(19)
         }
         
@@ -105,6 +106,7 @@ class CommunityRecommendFollowCollectionViewCell: UICollectionViewCell {
         topicLabel.text = "#话题"
         topicLabel.textColor = k999999Color
         topicLabel.font = kRegularFont13
+        topicLabel.textAlignment = .center
         return topicLabel
     }()
     

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Main/CommunityViewController.swift

@@ -116,7 +116,7 @@ class CommunityViewController: BaseViewController {
                 topicStr: communityRecommendTopicModel?.name,
                 titleStr: communityRecommendDataModel?.title,
                 avatarStr: communityRecommendDataModel?.avatar,
-                nameStr: communityRecommendDataModel?.name,
+                nameStr: communityRecommendDataModel?.username,
                 H5UrlStr: communityRecommendDataModel?.h5url,
                 bean: communityRecommendDataModel?.willCollectBean,
                 postId: communityRecommendDataModel?.id,

+ 1 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/View/CommunityFeaturedTopicsHeaderView.swift

@@ -29,7 +29,7 @@ class CommunityFeaturedTopicsHeaderView: BaseView {
         topicLabel.snp_makeConstraints { (make) in
             make.top.equalTo(numberPeopleLabel.snp_bottom).offset(8)
             make.left.equalTo(14)
-            make.right.lessThanOrEqualTo(focusButton.snp_left).offset(5)
+            make.right.lessThanOrEqualTo(focusButton.snp_left).offset(-5)
             make.height.equalTo(33)
         }
         focusButton.snp_makeConstraints { (make) in
@@ -50,7 +50,6 @@ class CommunityFeaturedTopicsHeaderView: BaseView {
     
     private lazy var topicLabel: UILabel = {
         let topicLabel = UILabel()
-        topicLabel.text = "运动健身"
         topicLabel.textColor = kffffffColor
         topicLabel.font = kMediumFont24
         return topicLabel

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/Controller/CommunityRecommendController.swift

@@ -78,6 +78,7 @@ class CommunityRecommendController: BaseViewController {
         nameButton.snp.makeConstraints { (make) in
             make.centerY.equalTo(avatarButton)
             make.left.equalTo(avatarButton.snp_right).offset(4)
+            make.right.lessThanOrEqualTo(followButton.snp_left).offset(-10)
         }
         followButton.snp_makeConstraints { (make) in
             make.right.equalTo(navigationBar.rightButton.snp_left)

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityShareContent/CommunityShareContentViewController.swift

@@ -74,6 +74,7 @@ class CommunityShareContentViewController: BaseViewController {
         topicLabel.snp.makeConstraints { (make) in
             make.top.equalTo(logoImageView.snp.bottom).offset(66*kScaleWidth)
             make.left.equalTo(27*kScaleWidth)
+            make.right.equalTo(-14*kScaleWidth)
         }
         titleLabel.snp.makeConstraints { (make) in
             make.top.equalTo(topicLabel.snp.bottom).offset(15*kScaleWidth)

+ 5 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoCoverCollectionCell.swift

@@ -853,7 +853,11 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
             beanLabel.text = "\(self.videoItemMdl?.willCollectBean ?? 0)U米待收获"
             
             avatarButton.kf.setImage(with: kURLImage(name: self.videoItemMdl?.avatar ?? ""), for: .normal, placeholder: kImage(name: "default_avatar"))
-            personLabel.text = self.videoItemMdl?.username
+            if self.videoItemMdl?.username?.count ?? 0 <= 12 {
+                personLabel.text = self.videoItemMdl?.username
+            }else {
+                personLabel.text = "\(self.videoItemMdl?.username?.prefix(12) ?? "")" + "..."
+            }
             
             // 点赞
             if self.videoItemMdl?.isLike == 0 {

+ 0 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddAddress/View/PublishAddressPOICell.swift

@@ -105,7 +105,6 @@ class PublishAddressPOICell: UITableViewCell {
         titleLabel.textColor = k333333Color
         titleLabel.font = kMediumFont15
         titleLabel.textAlignment = .left
-        titleLabel.numberOfLines = 0
         return titleLabel
     }()