Skip to content

Commit

Permalink
Merge pull request #2 from 30th-THE-SOPT-iOS-Part/juhyeon_feature/#1
Browse files Browse the repository at this point in the history
[FEAT] #1 - iOS 1차 과제
  • Loading branch information
wngus4296 authored Apr 16, 2022
2 parents 5789ef7 + 18e351c commit 382b6d8
Show file tree
Hide file tree
Showing 31 changed files with 1,340 additions and 0 deletions.
375 changes: 375 additions & 0 deletions Instagram/Instagram.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
56 changes: 56 additions & 0 deletions Instagram/Instagram/AddNameToSignupViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//
// AddNameToSignupViewController.swift
// Instagram
//
// Created by 변주현 on 2022/04/07.
//

import UIKit

class AddNameToSignupViewController: UIViewController {

@IBOutlet weak var idTextField: UITextField!
@IBOutlet weak var nextButton: UIButton!
var userName: String?

override func viewDidLoad() {
super.viewDidLoad()

setButtonOption()
setTextFieldOption()
addActionToTextField()
}

private func setButtonOption() {
// 다음 버튼 비활성화
nextButton.isEnabled = false
}

private func setTextFieldOption() {
// TextField에 입력하면 Clear 버튼이 나오도록 표시
idTextField.clearButtonMode = .whileEditing
}

private func addActionToTextField() {
// TextField에 이벤트 감지 시 함수 실행을 위한 addTarget() 설정
self.idTextField.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged)
}

@objc func textFieldDidChange(sender: UITextField) {
self.nextButton.isEnabled = sender.hasText
}

@IBAction func backButtonDidTap(_ sender: Any) {
self.navigationController?.popViewController(animated: true)
}

@IBAction func nextButtonDidTap(_ sender: Any) {
guard let nextVC = self.storyboard?.instantiateViewController(withIdentifier: "AddPasswordToSignupViewController") as? AddPasswordToSignupViewController else { return }

// 회원가입(2) VC로 사용자 이름 전달
nextVC.userId = idTextField.text

self.navigationController?.pushViewController(nextVC, animated: true)
}

}
57 changes: 57 additions & 0 deletions Instagram/Instagram/AddPasswordToSignupViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// AddPasswordToSignupViewController.swift
// Instagram
//
// Created by 변주현 on 2022/04/07.
//

import UIKit

class AddPasswordToSignupViewController: UIViewController {

@IBOutlet weak var passwordTextField: UITextField!
@IBOutlet weak var nextButton: UIButton!
var userId: String?

override func viewDidLoad() {
super.viewDidLoad()

setButtonOption()
setTextFieldOption()
addActionToTextField()
}

private func setButtonOption() {
// 다음 버튼 비활성화
nextButton.isEnabled = false
}

private func setTextFieldOption() {
// TextField에 입력하면 Clear 버튼이 나오도록 표시
passwordTextField.clearButtonMode = .whileEditing
}

private func addActionToTextField() {
// TextField에 이벤트 감지 시 함수 실행을 위한 addTarget() 설정
self.passwordTextField.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged)
}

@objc func textFieldDidChange(sender: UITextField) {
self.nextButton.isEnabled = sender.hasText ? true : false
}

@IBAction func backButtonDidTap(_ sender: Any) {
self.navigationController?.popViewController(animated: true)
}

@IBAction func nextButtonDidTap(_ sender: Any) {
guard let signinVC = self.storyboard?.instantiateViewController(withIdentifier: "SigninViewController") as? SigninViewController else { return }

signinVC.modalPresentationStyle = .fullScreen
// 회원가입(1)에서 받아온 사용자 id를 로그인 완료 VC로 전달
signinVC.userId = userId

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

}
36 changes: 36 additions & 0 deletions Instagram/Instagram/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// AppDelegate.swift
// Instagram
//
// Created by 변주현 on 2022/04/07.
//

import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions Instagram/Instagram/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Instagram Black Logo.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Instagram Black [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Instagram Black [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "icn_back_24.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "password hidden eye icon.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "password hidden eye [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "password hidden eye [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "password shown eye icon.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "password shown eye [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "password shown eye [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 382b6d8

Please sign in to comment.