Skip to content

Conversation

wjdalswl
Copy link
Member

@wjdalswl wjdalswl commented Nov 20, 2023

💡 Description

계산기 만들기 완료했습니다.

📝 Progress

  • 계산기 메인화면 구현하기
  • 연산자 버튼 클릭시 연산값 출력
  • 오류1 - 입력값이 하나라도 없을 때
  • 오류2 - 숫자가 아닌 타입이 입력되었을 때
  • 오류3 - 0으로 나누었을때
  • 초기화 버튼 클릭시

"0으로 나눌 수 없습니다" 추가
@wjdalswl wjdalswl self-assigned this Nov 20, 2023
@wjdalswl wjdalswl added the 🍀 전얀 전얀's work label Nov 20, 2023
Copy link
Member

@iiuoon iiuoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다👍🏻 옵셔널 잘 사용해주셨네요!

Comment on lines +375 to +379
isa = XCSwiftPackageProductDependency;
package = 2D6D0B0B2B0BCBF2007F19CA /* XCRemoteSwiftPackageReference "SnapKit" */;
productName = "SnapKit-Dynamic";
};
/* End XCSwiftPackageProductDependency section */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 시뮬레이터 실행 잘 되셨나요?
스냅킷 추가하실 때는 SnapKit-Dynamic 말고 그냥 SnapKit 하나만 추가해주세요!

Comment on lines +164 to +165
make.leading.equalTo(view.safeAreaLayoutGuide.snp.leading).offset(36)
make.trailing.equalTo(view.safeAreaLayoutGuide.snp.trailing).offset(-36)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make.leading.trailing.equalTo(view.safeAreaLayoutGuide.snp.leading).inset(36) 한 줄로 가능합니다!

}
number1TextField.snp.makeConstraints { make in
make.top.equalToSuperview().offset(111)
make.centerX.equalToSuperview()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inset을 적용했다면 centerX를 해주지 않아도 됩니다

  1. leading, trailing inset 적용
  2. centerX 적용, width 지정
    두 방법이 있습니다

Comment on lines +25 to +32
textField.layer.borderWidth = 1
textField.layer.borderColor = UIColor.black.cgColor
textField.backgroundColor = .white
textField.placeholder = "숫자 1 입력"

let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: 10, height: textField.frame.height))
textField.leftView = paddingView
textField.leftViewMode = .always
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

textField.borderStyle = .roundedRect 사용하시면 둥근 모서리와 왼쪽 패딩 모두 해결할 수 있습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍀 전얀 전얀's work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants