-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1331 from wakmusic/1330-faq-numberoflines
- Loading branch information
Showing
7 changed files
with
78 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
Projects/Features/MyInfoFeature/Sources/Views/AnswerTableViewCell.swift
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
Projects/Features/MyInfoFeature/Sources/Views/FAQAnswerTableViewCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import DesignSystem | ||
import FaqDomainInterface | ||
import UIKit | ||
|
||
final class FAQAnswerTableViewCell: UITableViewCell { | ||
@IBOutlet weak var answerLabel: UILabel! | ||
|
||
override func awakeFromNib() { | ||
super.awakeFromNib() | ||
if Thread.isMainThread { | ||
MainActor.assumeIsolated { | ||
answerLabel.font = DesignSystemFontFamily.Pretendard.medium.font(size: 14) | ||
answerLabel.setTextWithAttributes(kernValue: -0.5, lineSpacing: 6) | ||
} | ||
} else { | ||
Task { @MainActor in | ||
answerLabel.font = DesignSystemFontFamily.Pretendard.medium.font(size: 14) | ||
answerLabel.setTextWithAttributes(kernValue: -0.5, lineSpacing: 6) | ||
} | ||
} | ||
} | ||
} | ||
|
||
extension FAQAnswerTableViewCell { | ||
public func update(model: FaqEntity) { | ||
answerLabel.text = model.answer | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
Projects/Features/MyInfoFeature/Sources/Views/FAQQuestionTableViewCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import DesignSystem | ||
import FaqDomainInterface | ||
import UIKit | ||
|
||
final class FAQQuestionTableViewCell: UITableViewCell { | ||
@IBOutlet weak var categoryLabel: UILabel! | ||
@IBOutlet weak var titleLabel: UILabel! | ||
@IBOutlet weak var expandImageView: UIImageView! | ||
|
||
override func awakeFromNib() { | ||
super.awakeFromNib() | ||
if Thread.isMainThread { | ||
MainActor.assumeIsolated { | ||
categoryLabel.font = DesignSystemFontFamily.Pretendard.light.font(size: 12) | ||
categoryLabel.setTextWithAttributes(kernValue: -0.5) | ||
titleLabel.font = DesignSystemFontFamily.Pretendard.medium.font(size: 16) | ||
titleLabel.setTextWithAttributes(kernValue: -0.5, lineSpacing: 5) | ||
} | ||
} else { | ||
Task { @MainActor in | ||
categoryLabel.font = DesignSystemFontFamily.Pretendard.light.font(size: 12) | ||
categoryLabel.setTextWithAttributes(kernValue: -0.5) | ||
titleLabel.font = DesignSystemFontFamily.Pretendard.medium.font(size: 16) | ||
titleLabel.setTextWithAttributes(kernValue: -0.5, lineSpacing: 5) | ||
} | ||
} | ||
} | ||
} | ||
|
||
extension FAQQuestionTableViewCell { | ||
func update(model: FaqEntity) { | ||
categoryLabel.text = model.category | ||
titleLabel.text = model.question | ||
expandImageView.image = model.isOpen ? DesignSystemAsset.Navigation.fold.image : DesignSystemAsset.Navigation | ||
.close.image | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
Projects/Features/MyInfoFeature/Sources/Views/QuestionTableViewCell.swift
This file was deleted.
Oops, something went wrong.