Skip to content

Commit

Permalink
feat: CollectionView 생성 및 ListCell 구현중
Browse files Browse the repository at this point in the history
  • Loading branch information
iOS-Yetti committed Aug 29, 2023
1 parent fab5b8f commit 5d3d094
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
excluded:
- Diary/AppDelegate.swift
- Diary/SceneDelegate.swift
- Diary/Resource/AppDelegate.swift
- Diary/Resource/SceneDelegate.swift
38 changes: 33 additions & 5 deletions Diary.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
3BBC98902A9D73D70047DE81 /* DiaryCollectionViewListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BBC988F2A9D73D70047DE81 /* DiaryCollectionViewListCell.swift */; };
C739AE25284DF28600741E8F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C739AE24284DF28600741E8F /* AppDelegate.swift */; };
C739AE27284DF28600741E8F /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C739AE26284DF28600741E8F /* SceneDelegate.swift */; };
C739AE29284DF28600741E8F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C739AE28284DF28600741E8F /* ViewController.swift */; };
Expand All @@ -17,6 +18,7 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
3BBC988F2A9D73D70047DE81 /* DiaryCollectionViewListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiaryCollectionViewListCell.swift; sourceTree = "<group>"; };
C739AE21284DF28600741E8F /* Diary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Diary.app; sourceTree = BUILT_PRODUCTS_DIR; };
C739AE24284DF28600741E8F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
C739AE26284DF28600741E8F /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -39,6 +41,33 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
3BBC988C2A9D67EC0047DE81 /* Resource */ = {
isa = PBXGroup;
children = (
C739AE24284DF28600741E8F /* AppDelegate.swift */,
C739AE26284DF28600741E8F /* SceneDelegate.swift */,
C739AE30284DF28600741E8F /* Assets.xcassets */,
);
path = Resource;
sourceTree = "<group>";
};
3BBC988D2A9D68290047DE81 /* Controller */ = {
isa = PBXGroup;
children = (
C739AE28284DF28600741E8F /* ViewController.swift */,
);
path = Controller;
sourceTree = "<group>";
};
3BBC988E2A9D683C0047DE81 /* View */ = {
isa = PBXGroup;
children = (
C739AE32284DF28600741E8F /* LaunchScreen.storyboard */,
3BBC988F2A9D73D70047DE81 /* DiaryCollectionViewListCell.swift */,
);
path = View;
sourceTree = "<group>";
};
C739AE18284DF28600741E8F = {
isa = PBXGroup;
children = (
Expand All @@ -59,11 +88,9 @@
C739AE23284DF28600741E8F /* Diary */ = {
isa = PBXGroup;
children = (
C739AE24284DF28600741E8F /* AppDelegate.swift */,
C739AE26284DF28600741E8F /* SceneDelegate.swift */,
C739AE28284DF28600741E8F /* ViewController.swift */,
C739AE30284DF28600741E8F /* Assets.xcassets */,
C739AE32284DF28600741E8F /* LaunchScreen.storyboard */,
3BBC988E2A9D683C0047DE81 /* View */,
3BBC988D2A9D68290047DE81 /* Controller */,
3BBC988C2A9D67EC0047DE81 /* Resource */,
C739AE35284DF28600741E8F /* Info.plist */,
C739AE2D284DF28600741E8F /* Diary.xcdatamodeld */,
);
Expand Down Expand Up @@ -168,6 +195,7 @@
C739AE25284DF28600741E8F /* AppDelegate.swift in Sources */,
C739AE27284DF28600741E8F /* SceneDelegate.swift in Sources */,
C739AE2F284DF28600741E8F /* Diary.xcdatamodeld in Sources */,
3BBC98902A9D73D70047DE81 /* DiaryCollectionViewListCell.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
22 changes: 22 additions & 0 deletions Diary/Controller/ViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// Diary - ViewController.swift
// Created by yagom.
// Copyright © yagom. All rights reserved.
//

import UIKit

final class DiaryListViewController: UIViewController {
private let collectionView: UICollectionView = {
let configuration = UICollectionLayoutListConfiguration(appearance: .plain)
let layout = UICollectionViewCompositionalLayout.list(using: configuration)
let view = UICollectionView(frame: .zero, collectionViewLayout: layout)
view.translatesAutoresizingMaskIntoConstraints = false
// view.register(<#T##cellClass: AnyClass?##AnyClass?#>, forCellWithReuseIdentifier: <#T##String#>)
return view
}()

override func viewDidLoad() {
super.viewDidLoad()
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
let mainViewController: ViewController = ViewController()
let mainViewController: UIViewController = DiaryListViewController()

let navigationController = UINavigationController(rootViewController: mainViewController)
window?.rootViewController = navigationController
Expand Down Expand Up @@ -50,7 +50,5 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
// Save changes in the application's managed object context when the application transitions to the background.
(UIApplication.shared.delegate as? AppDelegate)?.saveContext()
}


}

File renamed without changes.
32 changes: 32 additions & 0 deletions Diary/View/DiaryCollectionViewListCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// DiaryCollectionViewCell.swift
// Diary
//
// Created by idinaloq, yetti on 2023/08/29.
//

import UIKit

class DiaryCollectionViewListCell: UICollectionViewListCell {
private let titleLabel: UILabel = {
let label = UILabel()
label.text = "타이블레이블"
label.translatesAutoresizingMaskIntoConstraints = false
label.numberOfLines = 1
return label
}()
private let dateLabel: UILabel = {
let label = UILabel()
label.text = "데이트레이블"
label.translatesAutoresizingMaskIntoConstraints = false
label.numberOfLines = 1
return label
}()
private let previewLabel: UILabel = {
let label = UILabel()
label.text = "프리뷰레이블"
label.translatesAutoresizingMaskIntoConstraints = false
label.numberOfLines = 1
return label
}()
}
14 changes: 0 additions & 14 deletions Diary/ViewController.swift

This file was deleted.

0 comments on commit 5d3d094

Please sign in to comment.