Skip to content

Commit 2cd2079

Browse files
committed
Added CGSize init.
1 parent 078e682 commit 2cd2079

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Sources/SparrowKit/CoreGraphics/CGRectExtension.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,14 @@ public extension CGRect {
136136
init(x: CGFloat, y: CGFloat, side: CGFloat) {
137137
self.init(x: x, y: y, width: side, height: side)
138138
}
139+
140+
/**
141+
SparrowKit: Create new frame.
142+
143+
- parameter side: Same `width` and `height`.
144+
*/
145+
init(side: CGFloat) {
146+
self.init(x: 0, y: 0, width: side, height: side)
147+
}
139148
}
140149
#endif

TODO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# TODO
22

33
Here provided ideas or features which will be implemented soon.
4+
5+
- Fixed all extension for protect level. Remove public in extension declaration and set all methods to public for allow ovveride.

0 commit comments

Comments
 (0)