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

[Refector]: The dotted border drawing method in TextLabelView #2

Open
Jeon0976 opened this issue May 1, 2024 · 0 comments
Open

[Refector]: The dotted border drawing method in TextLabelView #2

Jeon0976 opened this issue May 1, 2024 · 0 comments
Assignees

Comments

@Jeon0976
Copy link
Owner

Jeon0976 commented May 1, 2024

  1. Initially, the dotted border for the textLabeView was drawn inside the layoutSubViews method using the afterInitSetConstraint flag to ensure it was only set up initially.

  2. Changes to the textLabelView properties triggered a direct call to updateDottedBorder when the style included a dotted line.

  3. However, the drawing of the dotted border has now been moved into the draw(_:) method.

  4. Subsequently, each property will now call setNeedsDisplay() to trigger redrawing.

최초 textLabeView 점선 테투리를 그려야 할때 layoutSubviews 내부에서 실시했음 (afterInitSetConstraint) 조건 변수를 활용해서 최초 설정만 그림

textLabelView 변수값들이 변결 될 때 스타일이 점선일 경우 updateDottedBorder를 직접 호출

하지만 draw 내부로 해당 점선 테두리를 그리는걸 옮기고

각 변수에서는 setNeedsDisplay()를 호출하도록 변경 예정

@Jeon0976 Jeon0976 self-assigned this May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant