Skip to content
Open

AA #57

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions EClass/EClass.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@
45264C0C1F47096100933C50 /* language */ = {
isa = PBXGroup;
children = (
45264C411F47097200933C50 /* major */,
45264C0D1F47096100933C50 /* language0.png */,
45264C0E1F47096100933C50 /* language1.png */,
45264C0F1F47096100933C50 /* language2.png */,
Expand Down Expand Up @@ -475,7 +476,8 @@
45264C481F47097200933C50 /* major6.png */,
45264C491F47097200933C50 /* major7.png */,
);
path = major;
name = major;
path = ../major;
sourceTree = "<group>";
};
45264C521F47097700933C50 /* hobby */ = {
Expand Down Expand Up @@ -553,8 +555,8 @@
45A57FA91F357C45001F5C1A /* SelfDescriptionTableViewCell.swift */,
451BC7FD1F4D519700D11AA6 /* ChangePasswordViewController.swift */,
45264B701F3C962E00933C50 /* SlideOutMenu.storyboard */,
45A57FAB1F357C4C001F5C1A /* ProfileImageTableViewCell.swift */,
45264B021F3C7E5B00933C50 /* InputUserDataTableViewCell.swift */,
45A57FAB1F357C4C001F5C1A /* ProfileImageTableViewCell.swift */,
45264B001F3C7DDB00933C50 /* InputUserGenderTableViewCell.swift */,
45A57FAD1F357C56001F5C1A /* ProfileTableViewCell.swift */,
45A57FAF1F357C5D001F5C1A /* DetailChangeUserInfoViewController.swift */,
Expand Down Expand Up @@ -630,6 +632,7 @@
75D1B27E1F357C6A0068C20C /* MainPage.storyboard */,
75346BC61F4DB4A000F580FC /* SearchTextViewController.swift */,
75D1B2A01F3581D10068C20C /* AppDelegate.swift */,
75D1B21D1F357C3C0068C20C /* MainTableViewController.swift */,
75D1B27F1F357C6A0068C20C /* RecommendCollectionViewCell.swift */,
75D1B2801F357C6A0068C20C /* RecommendTableViewCell.swift */,
75D1B2811F357C6A0068C20C /* CategoryTableViewCell.swift */,
Expand All @@ -651,7 +654,6 @@
451BC8051F4D68C700D11AA6 /* RegisterLectureImage */,
45264C631F47097C00933C50 /* sports */,
45264C521F47097700933C50 /* hobby */,
45264C411F47097200933C50 /* major */,
45264C2E1F47096B00933C50 /* music */,
45264C1D1F47096600933C50 /* health */,
45264C0C1F47096100933C50 /* language */,
Expand Down Expand Up @@ -681,7 +683,6 @@
75D1B2081F3575F80068C20C /* EClass */ = {
isa = PBXGroup;
children = (
75D1B21D1F357C3C0068C20C /* MainTableViewController.swift */,
75D1B2121F3575F80068C20C /* LaunchScreen.storyboard */,
45264C961F47EEB600933C50 /* elass_logo.png */,
75BC38201F3AC6D000AA9E96 /* MainPage */,
Expand Down
12 changes: 9 additions & 3 deletions EClass/EClass/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,24 @@ import SwiftyJSON
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {

return true
}

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
SDKApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
print("뭐가먼저불리나")

loadLecture()




return true
}
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
print("궁금하군")
return SDKApplicationDelegate.shared.application(app, open:url, options:options)
}

Expand Down Expand Up @@ -63,6 +68,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

LectureList.lectureList = lectureData


}
}

Expand Down
14 changes: 6 additions & 8 deletions EClass/EClass/ChangeUserInfomationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@

import UIKit

var currentUserData = DataCenter.shared.realUser
//func refreshCurrentUserData()
//{
// currenUserData = DataCenter.shared.realUser
//}

func refreshCurrentUserData()
{
currentUserData = DataCenter.shared.realUser
}

class ChangeUserInfomationViewController: UIViewController, UITableViewDataSource, UITableViewDelegate{


var userData = DataCenter.shared.realUser
// func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool {
// scrollView.delegate = self
// scrollView.alwaysBounceVertical = false
Expand All @@ -35,7 +34,7 @@ class ChangeUserInfomationViewController: UIViewController, UITableViewDataSourc
switch indexPath.section {
case 0:
let cell = tableView.dequeueReusableCell(withIdentifier: "cell1", for: indexPath) as! ProfileImageTableViewCell
cell.userNameLabel.text = userData?.userName ?? "guest"
cell.userNameLabel.text = currentUserData?.userName ?? "guest"
cell.profileImageOutlet.image = currentUserData?.profileImage
cell.selectionStyle = .none

Expand Down Expand Up @@ -195,7 +194,6 @@ class ChangeUserInfomationViewController: UIViewController, UITableViewDataSourc

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
userData = DataCenter.shared.realUser
tv.reloadData()

print("viewwillappear")
Expand Down
78 changes: 40 additions & 38 deletions EClass/EClass/DataCenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ extension UIImageView

//전역 변수 & 함수

//유저 primaryKey 회원 가입 시 +1 됨
var currentUserPrimaryKey:Int = 0
var currentUserToken:String = ""
var currentUserTuTorPK:Int = 0
var currentUserData = DataCenter.shared.realUser

//각종 알람

Expand Down Expand Up @@ -212,19 +212,19 @@ struct User
{
var userName:String
var nickName:String?
var password:String?
// var password:String?
var email:String?
var name:String?
var phone:String?
// var tutorPK:String?
var profileImage:UIImage?
var studiedLecture:[Lecture]?
var selectedLecture:[Lecture]?
var wishedLecture:[Lecture]?
var selfDescription:String?
var tutorAuthorize:Bool = false
var registeredLecture:[Lecture]?
var careerDescription:String?
// var studiedLecture:[Lecture]?
// var selectedLecture:[Lecture]?
// var wishedLecture:[Lecture]?
// var selfDescription:String?
// var tutorAuthorize:Bool = false
// var registeredLecture:[Lecture]?
// var careerDescription:String?

var token:String?

Expand All @@ -233,7 +233,7 @@ struct User
userName = json["username"].stringValue
nickName = json["nickname"].stringValue
email = json["email"].stringValue
password = json["password"].stringValue
// password = json["password"].stringValue
name = json["name"].stringValue
phone = json["phone"].stringValue

Expand All @@ -248,36 +248,38 @@ struct User
}

}
// 수강했던 목록
studiedLecture = json["studiedLecture"].arrayValue.map({ (json) -> Lecture in
return Lecture(with: json)
})

// 현재 수강 신청한 목록
selectedLecture = json["seletecLecture"].arrayValue.map({ (json) -> Lecture in
return Lecture(with: json)
})

// 찜한 목록
wishedLecture = json["wishedLecture"].arrayValue.map({ (json) -> Lecture in
return Lecture(with: json)
})

// 자기 소개
selfDescription = json["selfDescription"].stringValue

// 튜터 권한 default 는 false
tutorAuthorize = json["tutorAuthorize"].bool ?? false

// 개설한 강의(튜터 전용)
registeredLecture = json["registeredLecture"].arrayValue.map({ (json) -> Lecture in
return Lecture(with:json) })

// 경력 소개(튜터 전용)
careerDescription = json["careerDescription"].stringValue

}
}
//// 수강했던 목록
// studiedLecture = json["studiedLecture"].arrayValue.map({ (json) -> Lecture in
// return Lecture(with: json)
// })
//
//// 현재 수강 신청한 목록
// selectedLecture = json["seletecLecture"].arrayValue.map({ (json) -> Lecture in
// return Lecture(with: json)
// })
//
//// 찜한 목록
// wishedLecture = json["wishedLecture"].arrayValue.map({ (json) -> Lecture in
// return Lecture(with: json)
// })
//
//// 자기 소개
// selfDescription = json["selfDescription"].stringValue
//
//// 튜터 권한 default 는 false
// tutorAuthorize = json["tutorAuthorize"].bool ?? false
//
//// 개설한 강의(튜터 전용)
// registeredLecture = json["registeredLecture"].arrayValue.map({ (json) -> Lecture in
// return Lecture(with:json) })
//
//// 경력 소개(튜터 전용)
// careerDescription = json["careerDescription"].stringValue
//
// }


struct ReviewList {
var description:String?
Expand Down
Loading