diff --git a/Domain/Domain.xcodeproj/project.pbxproj b/Domain/Domain.xcodeproj/project.pbxproj index 51069c5..e9d684e 100644 --- a/Domain/Domain.xcodeproj/project.pbxproj +++ b/Domain/Domain.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 0080E85B2CE19EBD0095B958 /* DomainStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0080E8582CE19EBD0095B958 /* DomainStruct.swift */; }; + 0080E8BB2CE2ECD80095B958 /* WhiteboardObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0080E8BA2CE2ECC60095B958 /* WhiteboardObject.swift */; }; 5B7C6EB02CDB6C040024704A /* AirplaINFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B7C6EAF2CDB6C040024704A /* AirplaINFoundation.framework */; }; 5B7C6EB12CDB6C040024704A /* AirplaINFoundation.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5B7C6EAF2CDB6C040024704A /* AirplaINFoundation.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ @@ -28,6 +29,7 @@ /* Begin PBXFileReference section */ 0080E8582CE19EBD0095B958 /* DomainStruct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DomainStruct.swift; sourceTree = ""; }; + 0080E8BA2CE2ECC60095B958 /* WhiteboardObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WhiteboardObject.swift; sourceTree = ""; }; 5B7C6E262CDB6A010024704A /* Domain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Domain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5B7C6EAF2CDB6C040024704A /* AirplaINFoundation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AirplaINFoundation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -47,6 +49,7 @@ 0080E8592CE19EBD0095B958 /* Sources */ = { isa = PBXGroup; children = ( + 0080E8B92CE2ECB50095B958 /* Entity */, 0080E8582CE19EBD0095B958 /* DomainStruct.swift */, ); path = Sources; @@ -60,6 +63,14 @@ path = Domain; sourceTree = ""; }; + 0080E8B92CE2ECB50095B958 /* Entity */ = { + isa = PBXGroup; + children = ( + 0080E8BA2CE2ECC60095B958 /* WhiteboardObject.swift */, + ); + path = Entity; + sourceTree = ""; + }; 5B7C6E1C2CDB6A010024704A = { isa = PBXGroup; children = ( @@ -193,6 +204,7 @@ buildActionMask = 2147483647; files = ( 0080E85B2CE19EBD0095B958 /* DomainStruct.swift in Sources */, + 0080E8BB2CE2ECD80095B958 /* WhiteboardObject.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Domain/Domain/Sources/Entity/WhiteboardObject.swift b/Domain/Domain/Sources/Entity/WhiteboardObject.swift new file mode 100644 index 0000000..d9137d2 --- /dev/null +++ b/Domain/Domain/Sources/Entity/WhiteboardObject.swift @@ -0,0 +1,23 @@ +// +// WhiteboardObject.swift +// Domain +// +// Created by 이동현 on 11/12/24. +// +import Foundation + +public class WhiteboardObject { + public let id: UUID + public var position: CGPoint + public var size: CGSize + + public init( + id: UUID, + position: CGPoint, + size: CGSize + ) { + self.id = id + self.position = position + self.size = size + } +} diff --git a/Presentation/Presentation.xcodeproj/project.pbxproj b/Presentation/Presentation.xcodeproj/project.pbxproj index 0075256..5331fb0 100644 --- a/Presentation/Presentation.xcodeproj/project.pbxproj +++ b/Presentation/Presentation.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 0080E8C62CE2F0510095B958 /* WhiteboardObjectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0080E8C52CE2F04F0095B958 /* WhiteboardObjectView.swift */; }; + 0080E8CA2CE2FF750095B958 /* WhiteboardObjectViewFactoryable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0080E8C92CE2FF6E0095B958 /* WhiteboardObjectViewFactoryable.swift */; }; 5B7C6EBA2CDB6C5C0024704A /* Domain.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B7C6EB92CDB6C5C0024704A /* Domain.framework */; }; 5B7C6EBB2CDB6C5C0024704A /* Domain.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5B7C6EB92CDB6C5C0024704A /* Domain.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A8525DC32CE200230089DA5E /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A8525DC22CE200230089DA5E /* Colors.xcassets */; }; @@ -29,6 +31,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0080E8C52CE2F04F0095B958 /* WhiteboardObjectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WhiteboardObjectView.swift; sourceTree = ""; }; + 0080E8C92CE2FF6E0095B958 /* WhiteboardObjectViewFactoryable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WhiteboardObjectViewFactoryable.swift; sourceTree = ""; }; 5B7C6E502CDB6A380024704A /* Presentation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Presentation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5B7C6EB92CDB6C5C0024704A /* Domain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Domain.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A8525DC22CE200230089DA5E /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = ""; }; @@ -52,6 +56,7 @@ isa = PBXGroup; children = ( A8525DC52CE201C00089DA5E /* Common */, + 0080E8C32CE2F0310095B958 /* Whiteboard */, ); path = Sources; sourceTree = ""; @@ -65,6 +70,31 @@ path = Presentation; sourceTree = ""; }; + 0080E8C32CE2F0310095B958 /* Whiteboard */ = { + isa = PBXGroup; + children = ( + 0080E8C82CE2FF3D0095B958 /* Factory */, + 0080E8C42CE2F0430095B958 /* View */, + ); + path = Whiteboard; + sourceTree = ""; + }; + 0080E8C42CE2F0430095B958 /* View */ = { + isa = PBXGroup; + children = ( + 0080E8C52CE2F04F0095B958 /* WhiteboardObjectView.swift */, + ); + path = View; + sourceTree = ""; + }; + 0080E8C82CE2FF3D0095B958 /* Factory */ = { + isa = PBXGroup; + children = ( + 0080E8C92CE2FF6E0095B958 /* WhiteboardObjectViewFactoryable.swift */, + ); + path = Factory; + sourceTree = ""; + }; 5B7C6E462CDB6A380024704A = { isa = PBXGroup; children = ( @@ -229,8 +259,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 0080E8C62CE2F0510095B958 /* WhiteboardObjectView.swift in Sources */, A8525DCB2CE203D50089DA5E /* UIView+.swift in Sources */, A8525DC82CE201D50089DA5E /* AirplainFont.swift in Sources */, + 0080E8CA2CE2FF750095B958 /* WhiteboardObjectViewFactoryable.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Presentation/Presentation/Sources/Whiteboard/Factory/WhiteboardObjectViewFactoryable.swift b/Presentation/Presentation/Sources/Whiteboard/Factory/WhiteboardObjectViewFactoryable.swift new file mode 100644 index 0000000..ff5f490 --- /dev/null +++ b/Presentation/Presentation/Sources/Whiteboard/Factory/WhiteboardObjectViewFactoryable.swift @@ -0,0 +1,11 @@ +// +// WhiteboardObjectViewFactoryable.swift +// Presentation +// +// Created by 이동현 on 11/12/24. +// +import Domain + +protocol WhiteboardObjectViewFactoryable { + func create(with whiteboardObject: WhiteboardObject) -> WhiteboardObjectView +} diff --git a/Presentation/Presentation/Sources/Whiteboard/View/WhiteboardObjectView.swift b/Presentation/Presentation/Sources/Whiteboard/View/WhiteboardObjectView.swift new file mode 100644 index 0000000..57e7da1 --- /dev/null +++ b/Presentation/Presentation/Sources/Whiteboard/View/WhiteboardObjectView.swift @@ -0,0 +1,19 @@ +// +// WhiteboardObjectView.swift +// Presentation +// +// Created by 이동현 on 11/12/24. +// +import Domain +import UIKit + +class WhiteboardObjectView: UIView { + init(whiteboardObject: WhiteboardObject) { + let frame = CGRect(origin: whiteboardObject.position, size: whiteboardObject.size) + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + } +}