Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSMutableAttributedString : String 을 화려하게 ✨ #51

Open
chaneeii opened this issue Oct 17, 2022 · 1 comment
Open

NSMutableAttributedString : String 을 화려하게 ✨ #51

chaneeii opened this issue Oct 17, 2022 · 1 comment
Labels
Swift Swift

Comments

@chaneeii
Copy link
Owner

밑줄이 있는 버튼

    private lazy var reportButton: UIButton = {
        let customAttributes: [NSAttributedString.Key: Any] = [
            .font: UIFont.systemFont(ofSize: 11, weight: .regular),
            .foregroundColor: UIColor.zestyColor(.gray3C3C43)?.withAlphaComponent(0.3) ?? UIColor.systemGray,
            .underlineStyle: NSUnderlineStyle.single.rawValue
        ]
        let attributeString = NSMutableAttributedString(
           string: "정보가 잘못됐나요?",
           attributes: customAttributes
        )
        $0.setAttributedTitle(attributeString, for: .normal)
        $0.addTarget(self, action: #selector(reportPlaceDetail), for: .touchUpInside)
        return $0
    }(UIButton())
@chaneeii chaneeii added the Swift Swift label Oct 18, 2022
@chaneeii
Copy link
Owner Author

NSMutableAttributedString

이게 무엇인가?

Attributed String Programming Guide

@chaneeii chaneeii changed the title NSMutableAttributedString 적용하기 NSMutableAttributedString : String 을 화려하게 ✨ Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Swift Swift
Projects
None yet
Development

No branches or pull requests

1 participant