File tree Expand file tree Collapse file tree
PennMobile/Home/Cells/News Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,9 @@ class NativeNewsViewController: UIViewController {
7878 for author in article. data. labsArticle. authors {
7979 authorLabel. text! += author. name + " , "
8080 }
81- authorLabel. text? . removeLast ( 2 )
81+ if authorLabel. text != " " {
82+ authorLabel. text? . removeLast ( 2 )
83+ }
8284 authorLabel. text! += " | " + article. data. labsArticle. published_at
8385 authorLabel. lineBreakMode = . byWordWrapping
8486 authorLabel. numberOfLines = 0
@@ -103,7 +105,9 @@ class NativeNewsViewController: UIViewController {
103105 for author in article. data. labsArticle. dominantMedia. authors {
104106 imageCaptionView. text! += author. name + " , "
105107 }
106- imageCaptionView. text? . removeLast ( 2 )
108+ if imageCaptionView. text != " " {
109+ imageCaptionView. text? . removeLast ( 2 )
110+ }
107111 imageCaptionView. lineBreakMode = . byWordWrapping
108112 imageCaptionView. numberOfLines = 0
109113 imageCaptionView. font = UIFont . preferredFont ( forTextStyle: . caption1, compatibleWith: . current)
You can’t perform that action at this time.
0 commit comments