-
Notifications
You must be signed in to change notification settings - Fork 10
트러블 슈팅
dailynj edited this page Dec 12, 2021
·
5 revisions
- 버튼 내부에서 UIImage 와 UILabel을 정렬하는 과정에서 imageEdgeInsets, textEdgeInsets 을 사용하려고 했지만 iOS15에서 deprecated 됨 -> UIButton.Configuration 로 해결
var config = UIButton.Configuration.filled()
var attText = AttributedString("가나다라마바사") // 버튼내부의 글자 설정
attText.font = UIFont.systemFont(ofSize: 10.0, weight: .medium)
config.attributedTitle = attText
config.imagePadding = 7 // 이미지와 텍스트의 간격
config.image = UIImage(systemName: "person.3.fill")
config.imagePlacement = .top // 이미지를 정렬할 위치
config.cornerStyle = .capsule // 버튼을 원으로 만드는 코드
self.registerButton = UIButton(configuration: config, primaryAction: nil)
- UIButton image 크기 조절하는 방법 : image 생성할 때 configuration을 함께 설정하여 생성한 다음 setImage
let config = UIImage.SymbolConfiguration(pointSize: 60, weight: .medium, scale: .default)
let image = UIImage(systemName: "plus.circle", withConfiguration: config)
button.setImage(image, for: .normal)
- xcode 프로젝트 파일이 충돌되었을 때 : 파일을 열어 충돌이 일어난 쪽 중복된 부분 찾아서 제거하여 에러를 해결
git add .
git rebase --continue
-
xcode 프로젝트 파일 에러를 해결했는데 프로젝트가 안열릴 때 : 괄호 등의 문자를 지웠을 수 있으니 잘 찾아보기
-
pr에 특정 commit을 지우기 위해
git rebase -i
를 사용했는데, 이 때 Merge commit들이 자동 삭제가 되어 conflict가 일어남 :--preserve-merges
옵션을 주면 Merge commit들이 보존됨 -
런치스크린 스토리보드 구성중 asset의 이미지가 안 불러와짐 -> 이미지를 Asset에 넣지 않고 따로 폴더에 추가해 불러오도록 함