Skip to content

Commit

Permalink
✅[CHORE] #285 - getDeviceWidth 가져오는 함수 하나로 줄임
Browse files Browse the repository at this point in the history
  • Loading branch information
hryeong66 committed Jul 27, 2022
1 parent df19422 commit 9eed237
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
5 changes: 0 additions & 5 deletions ChaRo-iOS/ChaRo-iOS/Source/Extensions/UIScreen+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ extension UIScreen {
return UIScreen.main.bounds.height
}


class func getDeviceWidth() -> Int {
return Int(UIScreen.main.bounds.width)
}

class func getDeviceWidth() -> CGFloat {
return UIScreen.main.bounds.width
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Then

final class PlayListTVC: UITableViewCell {

private let viewRatio: CGFloat = UIScreen.getDeviceWidth() / 375
private let viewRatio: CGFloat = UIScreen.getDeviceWidth() / 375.0
private let albumImageView = UIImageView().then {
$0.contentMode = .scaleAspectFit
$0.image = ImageLiterals.imgAlbumByPale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Then

final class SecondBannerHeaderView: UIView {

let viewRetio: CGFloat = UIScreen.getDeviceWidth() / 375
let viewRetio: CGFloat = UIScreen.getDeviceWidth() / 375.0

private let headerImageView = UIImageView().then {
$0.contentMode = .scaleAspectFill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ final class ExpendedMapVC: UIViewController {
private let disposeBag = DisposeBag()
private let xmarkButton = UIButton().then {
$0.setImage(ImageLiterals.icClose, for: .normal)
$0.layer.cornerRadius = 50.0 / 2.0
$0.layer.cornerRadius = 48.0 / 2.0
$0.backgroundColor = .white
$0.drawShadow(color: .black, opacity: 5, offset: .zero, radius: 5)
$0.drawShadow(color: .black.withAlphaComponent(0.3), opacity: 10, offset: .zero, radius: 10)
}

init(courseList: [Course]) {
Expand Down Expand Up @@ -55,9 +55,9 @@ final class ExpendedMapVC: UIViewController {
view.addSubviews([tmapView, xmarkButton])

xmarkButton.snp.makeConstraints {
$0.top.equalTo(view.safeAreaLayoutGuide).offset(11)
$0.trailing.equalToSuperview().inset(10)
$0.width.height.equalTo(50)
$0.top.equalTo(view.safeAreaLayoutGuide).offset(23)
$0.leading.equalToSuperview().inset(16)
$0.width.height.equalTo(48)
}

tmapView.snp.makeConstraints {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ extension SearchResultVC: UICollectionViewDataSource {
extension SearchResultVC: UICollectionViewDelegateFlowLayout {

func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let height = indexPath.row == 0 ? 57 : 260
return CGSize(width: UIScreen.getDeviceWidth() - 40, height: height)
let height: CGFloat = indexPath.row == 0 ? 57 : 260
return CGSize(width: UIScreen.getDeviceWidth() - 40.0, height: height)
}
}

Expand Down
4 changes: 2 additions & 2 deletions ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/SignScene/LoginVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class LoginVC: UIViewController {
}

private func addTestUserAccount() {
self.idTextField.text = "charo@ios.com"
self.pwdTextField.text = "charo0505"
self.idTextField.text = "charo-ios@gmail.com"
self.pwdTextField.text = "charo111"
}
override func viewDidDisappear(_ animated: Bool) {
removeObservers()
Expand Down

0 comments on commit 9eed237

Please sign in to comment.