Skip to content
Open

2/8 #12

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
Binary file modified .DS_Store
Binary file not shown.
132 changes: 132 additions & 0 deletions Better-me-iOS.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>Better-me-iOS.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>2</integer>
</dict>
</dict>
</dict>
Expand Down
10 changes: 10 additions & 0 deletions Better-me-iOS.xcworkspace/contents.xcworkspacedata

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>
Binary file modified Better-me-iOS/.DS_Store
Binary file not shown.
Binary file added Better-me-iOS/Assets.xcassets/.DS_Store
Binary file not shown.
21 changes: 21 additions & 0 deletions Better-me-iOS/Assets.xcassets/BetterMe.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "image 6.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
21 changes: 21 additions & 0 deletions Better-me-iOS/Assets.xcassets/Group 44.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Group 44.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
21 changes: 21 additions & 0 deletions Better-me-iOS/Assets.xcassets/Group 65.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Group 65.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
21 changes: 21 additions & 0 deletions Better-me-iOS/Assets.xcassets/Magnifier.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Magnifier.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
21 changes: 21 additions & 0 deletions Better-me-iOS/Assets.xcassets/so-trash.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "so-trash.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
41 changes: 32 additions & 9 deletions Better-me-iOS/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
</subviews>
</stackView>
<navigationBar contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0ia-fn-8Be">
<rect key="frame" x="-11" y="59" width="394" height="44"/>
<rect key="frame" x="-14" y="59" width="391" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</navigationBar>
</subviews>
Expand Down Expand Up @@ -840,28 +840,43 @@
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="GrP-Sx-epD" kind="relationship" relationship="rootViewController" id="c8H-Vj-xKL"/>
<segue destination="GrP-Sx-epD" kind="relationship" relationship="rootViewController" destinationCreationSelector="addSwiftUIView:" id="c8H-Vj-xKL"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="jTY-O2-O9R" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-918" y="354"/>
</scene>
<!--View Controller-->
<!--Social View Controller-->
<scene sceneID="HkT-Mj-ueX">
<objects>
<viewController id="GrP-Sx-epD" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="FdV-kQ-Xf4">
<viewController id="GrP-Sx-epD" customClass="SocialViewController" customModule="Better_me_iOS" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="FdV-kQ-Xf4" customClass="SocialViewControllerSocialViewController">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oBR-7s-wo2">
<rect key="frame" x="0.0" y="103" width="393" height="666"/>
<connections>
<segue destination="pYz-Fy-JDu" kind="embed" destinationCreationSelector="addSwiftUIView:" id="aD7-lc-wt8"/>
</connections>
</containerView>
</subviews>
<viewLayoutGuide key="safeArea" id="o3c-Ra-Hbi"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="oBR-7s-wo2" firstAttribute="top" secondItem="o3c-Ra-Hbi" secondAttribute="top" id="2Wn-Aw-mdE"/>
<constraint firstItem="oBR-7s-wo2" firstAttribute="bottom" secondItem="o3c-Ra-Hbi" secondAttribute="bottom" id="7qY-8R-TBR"/>
<constraint firstItem="oBR-7s-wo2" firstAttribute="top" secondItem="o3c-Ra-Hbi" secondAttribute="top" id="IeS-ET-YHf"/>
<constraint firstItem="oBR-7s-wo2" firstAttribute="leading" secondItem="o3c-Ra-Hbi" secondAttribute="leading" id="LOj-IU-BTt"/>
<constraint firstItem="o3c-Ra-Hbi" firstAttribute="trailing" secondItem="oBR-7s-wo2" secondAttribute="trailing" id="xYZ-Yp-nFh"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="m3Q-6u-C0D"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="7uG-hm-9zt" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="354"/>
<point key="canvasLocation" x="52.671755725190835" y="353.52112676056339"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="K5I-fQ-Ex3">
Expand Down Expand Up @@ -1052,7 +1067,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="AoP-gY-6si" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="1056"/>
<point key="canvasLocation" x="52.671755725190835" y="1054.9295774647887"/>
</scene>
<!--좋은 습관 만들기-->
<scene sceneID="btS-4h-SSP">
Expand Down Expand Up @@ -1147,7 +1162,7 @@
</constraints>
</stackView>
<navigationBar contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CoN-8S-PM6">
<rect key="frame" x="-11" y="59" width="395" height="44"/>
<rect key="frame" x="-16" y="59" width="394" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</navigationBar>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="f3A-Aq-spj">
Expand Down Expand Up @@ -1304,7 +1319,7 @@
</subviews>
</stackView>
<navigationBar contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ORX-v8-4xn">
<rect key="frame" x="-10" y="59" width="394" height="44"/>
<rect key="frame" x="-13" y="59" width="391" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</navigationBar>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mm5-G8-rgC">
Expand Down Expand Up @@ -1688,6 +1703,14 @@
</objects>
<point key="canvasLocation" x="1108" y="2572"/>
</scene>
<!--Content View-->
<scene sceneID="h5b-MK-qEN">
<objects>
<hostingController id="pYz-Fy-JDu" customClass="ContentView" sceneMemberID="viewController"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="N8B-4N-TOR" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="839" y="535"/>
</scene>
</scenes>
<resources>
<image name="AwardButton" width="21.666666030883789" height="28.333333969116211"/>
Expand Down
1 change: 1 addition & 0 deletions Better-me-iOS/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import UIKit
import SwiftUI

class HomeViewController: UIViewController {

Expand Down
18 changes: 18 additions & 0 deletions Better-me-iOS/Social/Data/Agree.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// InviteHabit.swift
// PlusAPI
//
// Created by 황인성 on 2023/02/05.
//

import Foundation


struct AgreeResponse: Codable{
var isSuccess: Bool
var code: Int
var message: String
}



56 changes: 56 additions & 0 deletions Better-me-iOS/Social/Data/AgreeModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//
// RandomUserViewModel.swift
// RandomUserApi
//
// Created by 황인성 on 2023/02/03.
//

import Foundation
import Combine
import Alamofire

class AgreeModel: ObservableObject{

var subscripttion = Set<AnyCancellable>()

// @Published var SearchNames = [SearchName]()

var baseUrl = "http://54.180.13.219:3000/app/follow/accept/1/2"

var token: HTTPHeaders = ["x-access-token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWR4IjoxLCJpYXQiOjE2NzU5MTgyNjksImV4cCI6MTY3NjAwNDY2OSwic3ViIjoidXNlckluZm8ifQ.PyrzZVmeAAJ2KggsvNbYh1Qp9tC-0Swd_MULrN9Gmbs"]

// var param = ["nickName": "김"]

init(){
print(#fileID, #function, #line, "")
// fetchRandomUsers()
}

// func fetchRandomUsers(){
// print(#fileID, #function, #line, "")
// AF.request(baseUrl, method: .patch).publishDecodable(type: AgreeResponse.self)
// .compactMap{ $0.value }
// .map{ $0.result }
// .sink(receiveCompletion: { completion in
// print("데이터스트림 완료")
// }, receiveValue: { receivedValue in
// print("받은 값 : \(receivedValue.count)")
// self.SearchNames = receivedValue
// }).store(in: &subscripttion)
// }
func patch(){
// func fetchRandomUsers(){
print(#fileID, #function, #line, "")
AF.request(baseUrl, method: .patch, headers: token).responseString { (response) in
switch response.result {
case .success:
print("POST 성공")
case .failure(let error):
print("🚫 Alamofire Request Error\nCode:\(error._code), Message: \(error.errorDescription!)")
}
}
// }
}
}


18 changes: 18 additions & 0 deletions Better-me-iOS/Social/Data/FriendDelete.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// InviteHabit.swift
// PlusAPI
//
// Created by 황인성 on 2023/02/05.
//

import Foundation


struct FriendDeleteResponse: Codable{
var isSuccess: Bool
var code: Int
var message: String
}



52 changes: 52 additions & 0 deletions Better-me-iOS/Social/Data/FriendDeleteModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// RandomUserViewModel.swift
// RandomUserApi
//
// Created by 황인성 on 2023/02/03.
//

import Foundation
import Combine
import Alamofire

class FriendDeleteModel: ObservableObject{

var subscripttion = Set<AnyCancellable>()

var baseUrl = "http://54.180.13.219:3000/app/follow/accept/1/2"

var token: HTTPHeaders = ["x-access-token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWR4IjoxLCJpYXQiOjE2NzU5MTgyNjksImV4cCI6MTY3NjAwNDY2OSwic3ViIjoidXNlckluZm8ifQ.PyrzZVmeAAJ2KggsvNbYh1Qp9tC-0Swd_MULrN9Gmbs"]

var param = ["followee": [20, 33]]

init(){
print(#fileID, #function, #line, "")
// fetchRandomUsers()
}

// func fetchRandomUsers(){
// print(#fileID, #function, #line, "")
// AF.request(baseUrl, method: .patch).publishDecodable(type: AgreeResponse.self)
// .compactMap{ $0.value }
// .map{ $0.result }
// .sink(receiveCompletion: { completion in
// print("데이터스트림 완료")
// }, receiveValue: { receivedValue in
// print("받은 값 : \(receivedValue.count)")
// self.SearchNames = receivedValue
// }).store(in: &subscripttion)
// }
func Delete(completionHandler: @escaping (Result<[FriendDeleteResponse], Error>) -> Void){
// func fetchRandomUsers(){
print(#fileID, #function, #line, "")
AF.request(baseUrl, method: .delete, headers: token).response { response in
switch response.result {
case .success:
completionHandler(.success([FriendDeleteResponse(isSuccess: true, code: 1000, message: "성공")]))
case .failure(let error):
completionHandler(.failure(error))
}
}
// }
}
}
Loading