Added two new functions in Transform Extensions, translate UIView and…
Checklist
- [x] New Extension
- [ ] New Test
- [ ] Changed more than one extension, but all changes are related
- [ ] Trivial change (doesn't require changelog)
… trasnformIdentity with completion block.
| 2 Errors | |
|---|---|
| :no_entry_sign: | Please, modify only one extension per pull request. |
| :no_entry_sign: | Please, modify only one extension per pull request. |
| 2 Messages | |
|---|---|
| :book: | Executed 170 tests, with 0 failures (0 unexpected) in 4.654 (4.864) seconds |
| :book: | Executed 156 tests, with 0 failures (0 unexpected) in 4.347 (4.694) seconds |
Generated by :no_entry_sign: danger
Current coverage is 36.68% (diff: 87.50%)
@@ master #300 diff @@
==========================================
Files 46 46
Lines 2042 2080 +38
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 714 763 +49
+ Misses 1328 1317 -11
Partials 0 0
Powered by Codecov. Last update 704a823...8cc3bb3
Can we add tests for these extensions?
I don't have too experience to adding tests, it you may help me a little, I'll be glad. Thanks.
Hey @vilapuigvila, if you want more detailed help, please hit me on Gitter. Tests are really easy to learn and I Iearned how to write tests through EZSwiftExtensions.
This method, for example,
public func setTranslation(_ duration:TimeInterval? = UIViewDefaultTransitionDuration, _ x: CGFloat? = 0.0, y: CGFloat? = 0.0, completion: ((Bool) -> Void)? = nil) {
self.animate(duration: duration ?? UIViewDefaultTransitionDuration, animations: {
self.transform = .init(translationX: x!, y: y!)
}, completion: completion)
}
You would test the UIView.frame before the animation and then test the UIView.frame after the animation so you see if the translation was successful
Also check this out
Ok perfect @lfarah I'll take a look about that.
Hey @vilapuigvila, this PR is approved. I just need you to fix the conflicts before I can merge
Do we have to include rotation, scaling too?
hi @lfarah I can't see conflicts, I merged master into this branch in my machine and works well, please can you help me?
@vilapuigvila rebase on master
I did, but I have no conflicts. I don't understand :-(
@vilapuigvila you haven't pushed to your remote
@piv199 which branch? mater or uiviewTranslations?
vilapuigvila:uiviewTranslations
@piv199 uiviewTranslations hasn't anything to push. I'm sorry but I'm a little confused..
Ok now would you mind pulling the mainline in trunk and rebasing and squashing your changes on top of it ? Also with our new CHANGELOG template you have to add an entry for the same.