Skip to content

Commit

Permalink
refactor: make room refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
akrudal committed Sep 8, 2022
1 parent 2579b00 commit 1575cba
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,12 @@ class MakeRoomController: UIViewController {
let request = MakeRoomRequest(
name: name,
thumbnailImage: myRoom.image,
startTime: startTime,
targetPace: pace,
startTime: Date(),
targetPace: "6’ 30”",
targetDistance: distance,
limitTime: limitTime,
limitUserCount: limitUserCount
)

makeRoom(with: request)
}

Expand All @@ -145,14 +144,11 @@ class MakeRoomController: UIViewController {

private func makeRoom(with request: MakeRoomRequest) {
repository?.inquiryMakeRoom(request: request) { [weak self] result in
print(result)
switch result {
case .success:
let storyBoard = UIStoryboard(name: "Room", bundle: nil)
let viewController = storyBoard.instantiateViewController(withIdentifier: "SignUpComplete")
viewController.modalPresentationStyle = .fullScreen

print("success")
DispatchQueue.main.async {
self?.present(viewController, animated: true)
}
case .failure:
debugPrint("Failed to make Room")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SFR-CF-tFo">
<rect key="frame" x="156.5" y="0.0" width="143.5" height="50"/>
<color key="tintColor" name="RunBlue"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="filled" title="선택 완료">
<fontDescription key="titleFontDescription" name="AppleSDGothicNeo-Regular" family="Apple SD Gothic Neo" pointSize="16"/>
</buttonConfiguration>
<color key="backgroundColor" name="RunBlue"/>
<fontDescription key="fontDescription" name="AppleSDGothicNeo-Regular" family="Apple SD Gothic Neo" pointSize="16"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="선택 완료"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="4"/>
Expand Down Expand Up @@ -161,7 +161,7 @@
<color key="barTintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<items>
<navigationItem title="방 만들기" id="dG8-Vj-oUJ">
<barButtonItem key="leftBarButtonItem" style="plain" id="dZQ-Dl-JLo">
<barButtonItem key="leftBarButtonItem" style="done" id="dZQ-Dl-JLo">
<button key="customView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="yUf-d0-VVy">
<rect key="frame" x="16" y="11" width="25" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
Expand Down Expand Up @@ -426,13 +426,15 @@
<action selector="showStartTimePopup:" destination="OAA-wN-XlX" eventType="touchUpInside" id="aRH-ve-fbI"/>
</connections>
</button>
<button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rsV-Cz-vtU">
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rsV-Cz-vtU">
<rect key="frame" x="0.0" y="1114" width="390" height="80"/>
<color key="backgroundColor" name="RunBlue"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="v6t-eK-t8A"/>
</constraints>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="filled" title="방 만들기" cornerStyle="fixed"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="방 만들기"/>
<connections>
<action selector="touchCompleteButton:" destination="OAA-wN-XlX" eventType="touchUpInside" id="Kga-wn-Fby"/>
</connections>
Expand Down Expand Up @@ -639,11 +641,11 @@ km당 10초씩 추가시간이 더해집니다</string>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GAe-6r-cTi">
<rect key="frame" x="156.5" y="0.0" width="143.5" height="50"/>
<color key="tintColor" name="RunBlue"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="filled" title="선택 완료">
<fontDescription key="titleFontDescription" name="AppleSDGothicNeo-Regular" family="Apple SD Gothic Neo" pointSize="16"/>
</buttonConfiguration>
<color key="backgroundColor" name="RunBlue"/>
<fontDescription key="fontDescription" name="AppleSDGothicNeo-Regular" family="Apple SD Gothic Neo" pointSize="16"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="선택 완료"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="4"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<color key="barTintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<items>
<navigationItem title="썸네일 이미지 선택" id="wLP-Vd-eCf">
<barButtonItem key="leftBarButtonItem" style="plain" id="s6s-2k-vyz">
<barButtonItem key="leftBarButtonItem" style="done" id="s6s-2k-vyz">
<button key="customView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="4D8-RK-WdA">
<rect key="frame" x="20" y="5" width="92" height="34.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
Expand All @@ -37,15 +37,14 @@
<state key="normal" image="xmark" catalog="system"/>
</button>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" style="plain" id="nDi-yu-7op">
<barButtonItem key="rightBarButtonItem" style="done" id="nDi-yu-7op">
<button key="customView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" id="l32-Ie-xqk">
<rect key="frame" x="302" y="5" width="92" height="34.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="AppleSDGothicNeo-Medium" family="Apple SD Gothic Neo" pointSize="15"/>
<color key="tintColor" name="RunBlue"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="완료">
<fontDescription key="titleFontDescription" name="AppleSDGothicNeo-Medium" family="Apple SD Gothic Neo" pointSize="15"/>
</buttonConfiguration>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="완료"/>
<connections>
<action selector="clickComplete:" destination="sf6-6y-UoX" eventType="touchUpInside" id="IGQ-SR-RV1"/>
</connections>
Expand Down

0 comments on commit 1575cba

Please sign in to comment.