Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
khyunjiee committed Jan 3, 2020
1 parent 022261a commit 4678aae
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 12 deletions.
130 changes: 118 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,32 @@
<img src="./images/home5.png" width="30%" height="30%"></img>
<img src="./images/home6.png" width="30%" height="30%"></img>
<img src="./images/home7.png" width="30%" height="30%"></img>
<img src="./images/home8.png" width="30%" height="30%"></img>
<img src="./images/s1.png" width="30%" height="30%"></img>
<img src="./images/s2.png" width="30%" height="30%"></img>
<img src="./images/s3.png" width="30%" height="30%"></img>
<img src="./images/s4.png" width="30%" height="30%"></img>


🐧 일정등록 🐧

------

### 기능소개

| 기능 | 개발여부 | 담당 |
| :---------------: | :------------------: | :-------------------------------: |
| 로그인 / 회원가입 | 뷰 그리는 중 | 뷰 - 효진<br />통신 - 현지 |
| 최초사용 | 뷰 그리는 중 | 현지 |
|| 뷰 완성, 통신 예정 | 현지 |
| 일정 등록 | 뷰 완성, 통신 예정 | 현지 |
| 주소 검색 | 뷰 완성, API 찾는 중 | 현지 |
| 경로 보여주기 | 뷰 그리는 중 | 현지 |
| 정거장 위치 | API 찾는 중 | 현지 |
| 일정 상세보기 | 뷰 그리는 중 | 현지 |
| 캘린더 | 뷰 그리는 중 | 뷰 - 현지, 효진<br /> 통신 - 현지 |
| 기능 | 우선순위 | 개발여부 | 담당 |
| :---------------: | :------: | :------------------------: | :----------------------------------------: |
| 푸시알람 | 1순위 | 개발자 계정 없어 진행 불가 | - |
|| 1순위 | 뷰 완성<br />통신 진행중 | 현지 |
| 일정 등록 | 1순위 | 뷰 완성<br />통신 진행중 | 현지 |
| 주소 검색 | 1순위 | 뷰 완성<br />통신 진행중 | 현지 |
| 경로 보여주기 | 1순위 | 뷰 완성<br />통신 진행중 | 현지 |
| 정거장 위치 | 1순위 | 뷰 진행중 | 현지 |
| 일정 상세보기 | 1순위 | 뷰 완성<br />통신 진행중 | 현지 |
| 최초사용 | 2순위 | 뷰 완성<br />통신 진행중 | 경선 |
| 로그인 / 회원가입 | 2순위 | 뷰 완성<br />통신 진행중 | 경선 |
| 캘린더 | 2순위 | 뷰 진행중 | 뷰 기능 - 현지<br />라이브러리 수정 - 효진 |
| 마이페이지 | 3순위 | 뷰 진행중 | 현지 |

------

Expand Down Expand Up @@ -145,12 +153,110 @@ func customNavigationBar() {
self.navigationController?.navigationBar.tintColor = UIColor.white
}
```

🆘 dismiss되는 팝업 뷰에서 기존 뷰로 데이터를 전달하는 것에 어려움을 겪음

✔️ 프로토콜을 정의해 Delegate Pattern 적용

```swift
// dismiss되는 뷰 컨트롤러
protocol SendDataDelegate {
func sendData(data: String)
}

class PreferPopUpViewController: UIViewController {
var delegate: SendDataDelegate?

@IBAction func confirmAction(_ sender: UIButton) {
if !allCheckImg.isHidden {
if let data = allLabel.titleLabel?.text {
delegate?.sendData(data: data)
dismiss(animated: true, completion: nil)
}
} else if !busCheckImg.isHidden {
if let data = busLabel.titleLabel?.text {
delegate?.sendData(data: data)
dismiss(animated: true, completion: nil)
}
} else {
if let data = subwayLabel.titleLabel?.text {
delegate?.sendData(data: data)
dismiss(animated: true, completion: nil)
}
}
}
}

// 값을 전달받는 뷰 컨트롤러

class SelectPathViewController: UIViewController, SendDataDelegate {
// delegate 함수 정의
func sendData(data: String) {
preferLabel.text = data
}
```

🆘 팝업 창에서 버튼을 클릭하면 홈으로 네비게이션 pop 되어야하는 효과가 있었는데, 팝업 뷰에는 navigation controller가 연결되어있지 않아 pop이 적용되지 않았음

✔️ onFinished(), onComplete() 함수를 적용해 해결

```swift
// 팝업 뷰 컨트롤러
class PopUpViewController: UIViewController {
var onFinished: (() -> Void)?
var onComplete: (() -> Void)?

override func viewDidLoad() {
super.viewDidLoad()
self.homeButton.addTarget(self, action: #selector(goToHome), for: .touchUpInside)
self.checkButton.addTarget(self, action: #selector(goToDetail), for: .touchUpInside)
}

@objc func goToHome() {
self.confirm = false
self.dismiss(animated: true)
onFinished?()
}

@objc func goToDetail() {
self.confirm = true
print("goToDetail \(confirm)")
self.dismiss(animated: true)
onComplete?()
}
}

// 팝업 뷰를 띄우는 뷰 컨트롤러
@IBAction func showConfirmAction(_ sender: UIButton) {
let storyboard = UIStoryboard(name: "Schedule", bundle: nil)
let myAlert = storyboard.instantiateViewController(withIdentifier: "PopUpViewController") as! PopUpViewController
myAlert.modalPresentationStyle = UIModalPresentationStyle.overCurrentContext
myAlert.modalTransitionStyle = UIModalTransitionStyle.crossDissolve
guard let nextVC = UIStoryboard(name: "Schedule", bundle: nil).instantiateViewController(identifier: "DetailScheduleViewController") as? DetailScheduleViewController else { return }
nextVC.modalPresentationStyle = .fullScreen

myAlert.onFinished = { [weak self] in
self?.navigationController?.popViewController(animated: true)
}

myAlert.onComplete = { [weak self] in
self?.navigationController?.pushViewController(nextVC, animated: true)
}

self.present(myAlert, animated: true, completion: nil)
}
```

🆘 통신 시 접근시간 초과의 이슈가 있었음

✔️ 대중적인 이슈지만, 아직 해결법을 찾지 못함
------
### 얼리버디 iOS 개발자
👩🏻‍💻 (리드) [김현지](https://github.com/khyunjiee)</br>
- SOPT 25기 iOS 파트 YB 김현지입니다 :)</br>
- 좋은 팀원들 덕분에 행복한 앱잼 중입니다 !!</br>
👩🏻‍💻 [황효진](https://github.com/hwang-hyojin)</br>
👩🏻‍💻 (서포트) [박경선](https://github.com/gngsn)</br>
👩🏻‍💻 [황효진](https://github.com/hwang-hyojin)</br>
- SOPT 25기 iOS 파트 YB 황효진입니다!</br>
- 귀여운 이비 보면서 힘내는 중🐦

Expand Down
Binary file added images/home8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/s1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/s2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/s3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/s4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4678aae

Please sign in to comment.