-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Jee] Step2 - 속성 변경 동작 #99
Open
Jeeehee
wants to merge
15
commits into
codesquad-members-2022:Jee
Choose a base branch
from
Jeeehee:step2
base: Jee
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+723
−267
Open
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
dbca7c0
Fix : CreateId in Factory
Jeeehee f4d4681
[ Complete ] All feedback
Jeeehee 32f776f
Edit : ReadMe
Jeeehee ed32ac5
[ Fix ] UnitTest
Jeeehee 632cccc
[ Create ] Object Plane
Jeeehee da73c5f
[ Create ] Plane Unit Test
Jeeehee 5e2544a
[ Fix ] Color 객체 이름 변경 및 범위 제한 추가 (Alpha도 제한 추가)
Jeeehee c91617f
[ Create ] Convert RGB to UIColor 객체 생성 및 뷰에 랜덤 사각형 띄우기 테스트
Jeeehee 0f5a5d0
[ Fix ] 파일 폴더화 및 Convert 객체 추가
Jeeehee 9996384
[ Fix ] Create Object Log
Jeeehee 5333510
[ Add ] Hex 코드로 변환
Jeeehee c9a3a91
[ Create ] Delegate and Custom View
Jeeehee a16068e
[ Create ] Delegate / Panel View 생성
Jeeehee 0e85494
[ Update ] Panel View
Jeeehee ed406e4
[ Change ] Panel to ControlView
Jeeehee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[ Create ] Delegate and Custom View
commit c9a3a9171bb2e8409f09337de67c1f4989244379
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// PlaneDelegate.swift | ||
// DrawingApp | ||
// | ||
// Created by Jihee hwang on 2022/03/15. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol PlaneDelegate { | ||
func didCreateRectengle() | ||
func didSelect() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// RectengleView.swift | ||
// DrawingApp | ||
// | ||
// Created by Jihee hwang on 2022/03/15. | ||
// | ||
|
||
import UIKit | ||
|
||
class RectengleView: UIView { | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
} | ||
|
||
convenience init(frame: CGRect, color: Color, alpha: Alpha) { | ||
self.init(frame: frame) | ||
setColor(color: color, alpha: alpha) | ||
} | ||
|
||
func setColor(color: Color, alpha: Alpha) { | ||
self.backgroundColor = UIColor(red: color.r, green: color.g, blue: color.b, alpha: alpha.value) | ||
} | ||
|
||
func selectRectangle(isSelect: Bool) { // 선택된 사각형 테두리 | ||
if isSelect == true { | ||
self.layer.borderColor = UIColor.black.cgColor | ||
self.layer.borderWidth = 5 | ||
} else { | ||
self.layer.borderColor = UIColor.clear.cgColor | ||
self.layer.borderWidth = 0 | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<view contentMode="scaleToFill" id="iN0-l3-epB"> | ||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> | ||
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/> | ||
</view> | ||
</objects> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// RightView.swift | ||
// DrawingApp | ||
// | ||
// Created by Jihee hwang on 2022/03/14. | ||
// | ||
|
||
import UIKit | ||
|
||
|
||
//@IBDesignable | ||
class RightView: UIView { | ||
|
||
@IBOutlet weak var rightViewBackground: UIView! | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
loadXib() | ||
} | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
loadXib() | ||
} | ||
|
||
private func loadXib() { | ||
let identifier = String(describing: type(of: self)) | ||
let nibs = Bundle.main.loadNibNamed(identifier, owner: self, options: nil) | ||
guard let inputView = nibs?.first as? UIView else { | ||
return | ||
} | ||
inputView.frame = self.bounds | ||
self.addSubview(inputView) | ||
} | ||
|
||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UIColor.toHex()처럼 위에 Convert.toUIColor()도 UIColor를 확장해도 됩니다. 결국 UIColor 인스턴스를 만드는 거니까요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UIColor를 확장 ->
convenience init
을 활용해 수정했습니다!convenience init을 이렇게도 사용할 수 있었다니..! 다양한 방법을 알려주셔서 감사합니다 :D