We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
이것만 잘 보면 댐 ㅋㅋ ㅈㅅㅈㅅ
일단 이걸 써서 할라면 sectionInset, minimumLineSpacing 등을 잘 잡아주시고 사용하셈
지금부터 설명할 건 태현이 블로그에 잘 나와있어서 ㅋㅋㅋ 좀 카피캣해보겠음
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: timeArray[indexPath.item].size(withAttributes: [NSAttributedString.Key.font : UIFont.font(.pretendardRegular, ofSize: 17)]).width + 20, height: 32) }
CGSize는 너비와 높이 값을 포함하는 구조체임
앞에서 말했듯이 텍스트의 크기만 안다면 셀의 너비를 구할 수 있다했잖슴? 그걸 바꿔주는 메서드임
이게 사실 뭐라고 한 줄로 정의내리기 애매한데 해보겠음
문자열의 속성을 지정하거나 접근할 때 사용하는 걸로 앎
마지막으로 + 20은 여백 때문에 줌!
The text was updated successfully, but these errors were encountered:
seungchan2
No branches or pull requests
이것만 잘 보면 댐 ㅋㅋ ㅈㅅㅈㅅ
일단 이걸 써서 할라면 sectionInset, minimumLineSpacing 등을 잘 잡아주시고 사용하셈
지금부터 설명할 건 태현이 블로그에 잘 나와있어서 ㅋㅋㅋ 좀 카피캣해보겠음
CGSize
CGSize는 너비와 높이 값을 포함하는 구조체임
size(withAttributes:)
앞에서 말했듯이 텍스트의 크기만 안다면 셀의 너비를 구할 수 있다했잖슴? 그걸 바꿔주는 메서드임
NSAttributedString
이게 사실 뭐라고 한 줄로 정의내리기 애매한데 해보겠음
문자열의 속성을 지정하거나 접근할 때 사용하는 걸로 앎
마지막으로 + 20은 여백 때문에 줌!
The text was updated successfully, but these errors were encountered: