Swiftpack.co - Swift Packages by ioskrew

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by ioskrew

ioskrew/SwiftLayout 3.0.0
A swifty way to use UIKit
⭐️ 127
🕓 20 weeks ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
3.0.0
20 weeks ago
# SwiftLayout 3.0.0 update The SwiftLayout 3.0.0 update has finally been released. Let's talk about some of the important changes in 3.0.0 ## 1. Introduction of Name space Methods such as `sublayout(_:)`, `anchors(_:)`, etc. that are called directly from UIView could potentially cause naming conflicts with methods defined by other packages and code. We introduced a namespace called "sl" so that the first time you call a SwiftLayout-related method from UIView, you can access it through the namespace. ```swift // before someUIView.anchors { ... }.sublayout { ... } // after someUIView.sl.anchors { ... }.sublayout { ... } ``` ## 2. Changed Anchors syntax As suggested by [[#274](https://github.com/ioskrew/SwiftLayout/issues/274)](https://github.com/ioskrew/SwiftLayout/issues/274), we unified the syntax of `Anchors`, which was divided into property interfaces and method interfaces, into the form of property interfaces. ```swift // before Anchors.allSides() Anchors.cap() Anchors.horizontal(offset: 13) Anchors.center(offsetX: offsetX, offsetY: offsetY) // after Anchors.allSides.equalToSuper() Anchors.cap // As before, you can omit equalToSuper(). Anchors.horizontal.equalToSuper(inwardOffset: 13) Anchors.center.equalToSuper(xOffset: offsetX, yOffset: offsetY) ``` ## 3. onActivate(\_:) replaces the config(\_:) method The `config(_:)` method is a method that runs on call and executes the passed in closure regardless of the layout's activation. This was problematic as it could cause the closure to be executed at an unintended time, which led to the replacement of `config(_:)` with the `onActivate(_:)` method. The `onActivate(_:)` method does not immediately execute the passed in closure, but instead executes the passed in closure at the time the layout is activated when methods like `active`, `finalActive`, etc. are called. - This was changed to the `@escaping` closure to delay the execution of the closure to the time of activation. - Because of the change to `@escaping` closures, it is essential to **capture** variables in order to access variables outside of the closure. - You should consider weakly capturing external variables to avoid strong reference cycles. - When the `Layout` is released from memory, both the closure and the captured variables are released. This means that if you don't store `Layout` in a stored property, a strong reference cycle will not occur. ## What's Changed * improve: Improving some translations by @della-padula in https://github.com/ioskrew/SwiftLayout/pull/265 * Fix typo in README_ko.md by @stleamist in https://github.com/ioskrew/SwiftLayout/pull/266 * Readme updates by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/268 * Namespace by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/272 * Replace `config(_:)` to `onActivate(_:)` by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/273 * Activation lifecycle by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/275 * Deprecated all of Anchors' method interfaces and added property interfaces by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/276 ## New Contributors * @stleamist made their first contribution in https://github.com/ioskrew/SwiftLayout/pull/266 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.8.0...3.0.0
2.8.0
1 year ago
## What's Changed * improve autocompletion of Anchors by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/260 * Improved expression of anchors by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/262 * Swift version update by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/263 * ListLayout for variable types of Layouts to containing with type specification by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/261 * 2.8.0 by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/264 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.7.0...2.8.0
2.7.0
1 year ago
## What's Changed * type erase from TupleLayout by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/241 * add default configurable properties for UISwitch by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/237 * add version check and fix misspellings by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/243 * add LayoutOption - isNotArranged by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/244 * update readme by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/247 * Relieve the maximum number of sub-items limit for sublayout method by @della-padula in https://github.com/ioskrew/SwiftLayout/pull/250 * Improve Activator.updateConstraints by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/252 * Unexpected Crash - When updating the layout after manually calling NSLayoutConstraint.deactiavte(_:) by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/255 * rename Layout.anyLayout property to eraseToAnyLayout() and add to UIView by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/258 ## New Contributors * @della-padula made their first contribution in https://github.com/ioskrew/SwiftLayout/pull/250 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.6.0...2.7.0
2.6.0
1 year ago
## What's Changed * Remove call as function by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/225 * add comments for anchor combinating functions by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/227 * View printer congifuration by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/226 * Add combination anchor by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/228 * [renaming] defualt -> default by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/229 * Config properties sorting by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/230 * Change the configuration output of UIImage, UIFont, and UIColor to mu… by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/231 * Better way to implement DefaultConfigurablePropertys by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/232 * 2.6.0 by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/236 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.5.4...2.6.0
2.5.4
1 year ago
## What's Changed * Add priority method to anchors by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/222 * split XCTViewAssert to each of purpose by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/223 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.5.3...2.5.4
2.5.3
1 year ago
## What's Changed * improving testing by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/215 * no more tabbed on tests by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/217 * fix only identifier option for view printer by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/216 * fix maintain subview ordering by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/218 * fix arranged subview ordering in UIStackView by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/219 * remove deprecated method in Layoutable by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/220 * 2.5.3 by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/221 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.5.2...2.5.3
2.5.2
1 year ago
## What's Changed * improving for IdentifierUpdater by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/203 * support SwiftUI by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/201 * Remove tag by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/207 * Feature/distribute tests by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/209 * suggest upper/lower case rules for README by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/208 * improving set constant and multiplier in Anchors by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/212 * remove dependencies of other libraries from tests by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/210 * 2.5.2 by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/214 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.5.1...2.5.2
2.5.1
1 year ago
## What's Changed * improving of README by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/181 * fix ambiguous use of Anchors.size by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/179 * fix/swiftlayoutprinter by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/180 * support UIStackView by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/182 * add ModularLayout by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/184 * Feature/animatable layout property by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/187 * re-architecting Anchors by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/186 * subscripts for any object call self in some conditions by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/189 * ViewTags.tag to generic for prevent type erasing by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/190 * Split the library into SwiftLayout and SwiftLayoutUtil by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/188 * 2.5.0 by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/199 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.1.0...2.5.1 ## Warning As of 2.5.0, **the syntax of Anchors has changed.** Code incompatible with <=2.1.0.
2.5.0
1 year ago
## What's Changed * improving of README by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/181 * fix ambiguous use of Anchors.size by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/179 * fix/swiftlayoutprinter by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/180 * support UIStackView by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/182 * add ModularLayout by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/184 * Feature/animatable layout property by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/187 * re-architecting Anchors by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/186 * subscripts for any object call self in some conditions by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/189 * ViewTags.tag to generic for prevent type erasing by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/190 * Split the library into SwiftLayout and SwiftLayoutUtil by @gmlwhdtjd in https://github.com/ioskrew/SwiftLayout/pull/188 * 2.5.0 by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/199 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.1.0...2.5.0 ## Warning As of 2.5.0, **the syntax of Anchors has changed.** Code incompatible with <=2.1.0.
2.1.0
2 years ago
## What's Changed * 2.1.0 by @oozoofrog in https://github.com/ioskrew/SwiftLayout/pull/176 **Full Changelog**: https://github.com/ioskrew/SwiftLayout/compare/2.0.1...2.1.0
iOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics