Skip to content

Commit

Permalink
🎨 Lint 규칙 수정 및 접근 제한자 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mingun authored and mingun committed Nov 27, 2023
1 parent bd6f75e commit 6b06580
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 deletions.
4 changes: 2 additions & 2 deletions iOS/Features/Spot/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ let package = Package(
products: [
.library(
name: .spotView,
targets: [.spotView]),
targets: [.spotView])
],
dependencies: [
.package(path: .msUIKit.path),
Expand All @@ -46,7 +46,7 @@ let package = Package(
dependencies: [
.product(name: .msUIKit, package: .msUIKit),
.product(name: .msDesignsystem, package: .msUIKit),
.product(name: .msLogger, package: .msFoundation)]),
.product(name: .msLogger, package: .msFoundation)])

// Tests
]
Expand Down
59 changes: 31 additions & 28 deletions iOS/Features/Spot/Sources/SpotView/SpotViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,32 @@ public final class SpotViewController: UIViewController {

// MARK: - Constants

private enum Metrix {
private enum Metric {

//image view
// image view
enum ImageView {
static var height: CGFloat = 486.0
static var inset: CGFloat = 4.0
static var defaultIndex: Int = 0
static let height: CGFloat = 486.0
static let inset: CGFloat = 4.0
static let defaultIndex: Int = 0
}

//labels
// labels
enum TextLabel {
static var height: CGFloat = 24.0
static var topInset: CGFloat = 30.0
static let height: CGFloat = 24.0
static let topInset: CGFloat = 30.0
}

enum SubTextLabel {
static var height: CGFloat = 42.0
static var topInset: CGFloat = 12.0
static let height: CGFloat = 42.0
static let topInset: CGFloat = 12.0
}

//buttons
// buttons
enum Button {
static var height: CGFloat = 120.0
static var width: CGFloat = 120.0
static var insetFromCenterX: CGFloat = 26.0
static var bottomInset: CGFloat = 55.0
static let height: CGFloat = 120.0
static let width: CGFloat = 120.0
static let insetFromCenterX: CGFloat = 26.0
static let bottomInset: CGFloat = 55.0
}

}
Expand Down Expand Up @@ -89,7 +89,7 @@ public final class SpotViewController: UIViewController {
self.imageView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
self.imageView.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor),
self.imageView.heightAnchor.constraint(equalToConstant: Metrix.ImageView.height),
self.imageView.heightAnchor.constraint(equalToConstant: Metric.ImageView.height),
self.imageView.leadingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.leadingAnchor),
self.imageView.trailingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.trailingAnchor)
])
Expand All @@ -112,16 +112,17 @@ public final class SpotViewController: UIViewController {
self.view.addSubview(label)
label.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
label.centerXAnchor.constraint(equalTo: self.view.centerXAnchor),
label.centerXAnchor.constraint(equalTo: self.view.centerXAnchor),
label.centerXAnchor.constraint(equalTo: self.view.centerXAnchor)
])
}
NSLayoutConstraint.activate([
self.textLabel.heightAnchor.constraint(equalToConstant: Metrix.TextLabel.height),
self.subTextLabel.heightAnchor.constraint(equalToConstant: Metrix.SubTextLabel.height),
self.textLabel.heightAnchor.constraint(equalToConstant: Metric.TextLabel.height),
self.subTextLabel.heightAnchor.constraint(equalToConstant: Metric.SubTextLabel.height),

self.textLabel.topAnchor.constraint(equalTo: self.imageView.bottomAnchor, constant: Metrix.TextLabel.topInset),
self.subTextLabel.topAnchor.constraint(equalTo: self.textLabel.bottomAnchor, constant: Metrix.SubTextLabel.topInset)
self.textLabel.topAnchor.constraint(equalTo: self.imageView.bottomAnchor,
constant: Metric.TextLabel.topInset),
self.subTextLabel.topAnchor.constraint(equalTo: self.textLabel.bottomAnchor,
constant: Metric.SubTextLabel.topInset)
])
self.subTextLabel.textAlignment = .center
}
Expand All @@ -132,14 +133,17 @@ public final class SpotViewController: UIViewController {
self.view.addSubview(button)
button.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
button.heightAnchor.constraint(equalToConstant: Metrix.Button.height),
button.widthAnchor.constraint(equalToConstant: Metrix.Button.width),
button.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -Metrix.Button.bottomInset)
button.heightAnchor.constraint(equalToConstant: Metric.Button.height),
button.widthAnchor.constraint(equalToConstant: Metric.Button.width),
button.bottomAnchor.constraint(equalTo: self.view.bottomAnchor,
constant: -Metric.Button.bottomInset)
])
}
NSLayoutConstraint.activate([
self.cancelButton.trailingAnchor.constraint(equalTo: self.view.centerXAnchor, constant: -Metrix.Button.insetFromCenterX),
self.completeButton.leadingAnchor.constraint(equalTo: self.view.centerXAnchor, constant: Metrix.Button.insetFromCenterX),
self.cancelButton.trailingAnchor.constraint(equalTo: self.view.centerXAnchor,
constant: -Metric.Button.insetFromCenterX),
self.completeButton.leadingAnchor.constraint(equalTo: self.view.centerXAnchor,
constant: Metric.Button.insetFromCenterX)
])
}

Expand Down Expand Up @@ -220,4 +224,3 @@ public final class SpotViewController: UIViewController {
}

}

4 changes: 2 additions & 2 deletions iOS/MSFoundation/Tests/MSLoggerTests/MSLoggerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import MSLogger
final class MSLoggerTests: XCTestCase {

func test_Logger객체_잘_생성되는지_성공() {
//arrange, act
// arrange, act
let logger = MSLogger.make(category: .login)

//assert
// assert
XCTAssertNotNil(logger)
}
}

0 comments on commit 6b06580

Please sign in to comment.