Compare commits
14 Commits
master
...
vilapuigvi
Author | SHA1 | Date |
---|---|---|
![]() |
3f1c22f2a6 | |
![]() |
fab0277472 | |
![]() |
84b0ec48a0 | |
![]() |
04194f9ddd | |
![]() |
c7480df85e | |
![]() |
1b43970d03 | |
![]() |
dfcffae09b | |
![]() |
71063d369c | |
![]() |
153f267dfb | |
![]() |
80cdd49b2d | |
![]() |
3018e2309a | |
![]() |
1fee63019c | |
![]() |
0d7c0abfd6 | |
![]() |
b6c5928745 |
40
CHANGELOG.md
40
CHANGELOG.md
|
@ -3,33 +3,35 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
## Unreleased
|
||||
|
||||
1. **Collections**
|
||||
- `func parallelizedMap<R>(_ each: @escaping (Self.Iterator.Element) -> R) -> [R?]` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/394) by *Khalian*
|
||||
|
||||
2. **Dictionary**
|
||||
- `func random() -> Value?` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/420) by *Khalian*
|
||||
|
||||
3. **FileManager**
|
||||
- `var documentsDirectoryPath: String?` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/338) by *vilapuigvila*
|
||||
- `var cachesDirectoryPath: String?` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/338) by *vilapuigvila*
|
||||
|
||||
4. **UIStackView**
|
||||
- `addArrangedSubviews(_ views: UIView...)` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/396) by *kirakik*
|
||||
- `init(distribution: UIStackViewDistribution, alignment: UIStackViewAlignment, axis: UILayoutConstraintAxis, spacing: CGFloat)` in [[PR]](https://github.com/goktugyil/ EZSwiftExtensions/pull/396) by *kirakik*
|
||||
|
||||
4. **Date**
|
||||
- `init?(httpDateString: String)` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/426) by *Vic-L*
|
||||
|
||||
### Added extensions
|
||||
1. **Array**
|
||||
- `removeAll(_ elements: [Element])` (new overload) for `Equatable` elements in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/416) by *dfrib*
|
||||
- `removeAll(_ elements: [Element])` (new overload) for `Hashable` elements in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/416) by *dfrib*
|
||||
|
||||
2. **UIView**
|
||||
2. **Collections**
|
||||
- `func parallelizedMap<R>(_ each: @escaping (Self.Iterator.Element) -> R) -> [R?]` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/394) by *Khalian*
|
||||
|
||||
3. **Date**
|
||||
- `init?(httpDateString: String)` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/426) by *Vic-L*
|
||||
|
||||
4. **Dictionary**
|
||||
- `func random() -> Value?` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/420) by *Khalian*
|
||||
|
||||
5. **FileManager**
|
||||
- `var documentsDirectoryPath: String?` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/338) by *vilapuigvila*
|
||||
- `var cachesDirectoryPath: String?` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/338) by *vilapuigvila*
|
||||
|
||||
6. **UIStackView**
|
||||
- `addArrangedSubviews(_ views: UIView...)` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/396) by *kirakik*
|
||||
- `init(distribution: UIStackViewDistribution, alignment: UIStackViewAlignment, axis: UILayoutConstraintAxis, spacing: CGFloat)` in [[PR]](https://github.com/goktugyil/ EZSwiftExtensions/pull/396) by *kirakik*
|
||||
|
||||
7. **UIView**
|
||||
- `roundView()` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/424) by *Vic-L*
|
||||
- `roundView(withBorderColor color: UIColor, withBorderWidth width: CGFloat)` (new overload) in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/424) by *Vic-L*
|
||||
- `nakedView()` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/424) by *Vic-L*
|
||||
|
||||
8. **UIViewController**
|
||||
- `isNavBarHidden:Bool` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/332/) by *vilapuigvila*
|
||||
|
||||
### Deprecated/Renamed extensions
|
||||
1. **UIViewController**
|
||||
- `public func hideKeyboardWhenTappedAround(cancelTouches: Bool = false)` in [[PR]](https://github.com/goktugyil/EZSwiftExtensions/pull/395) by *lfarah*
|
||||
|
|
|
@ -11,15 +11,25 @@ import XCTest
|
|||
|
||||
class UIViewControllerTests: XCTestCase {
|
||||
|
||||
private var nav:UINavigationController!
|
||||
private let rootVC = UIViewController()
|
||||
private let vc2 = UIViewController()
|
||||
private let vc3 = UIViewController()
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
func testIsNavBarHidden() {
|
||||
let vc = UIViewController()
|
||||
_ = UINavigationController(rootViewController: vc)
|
||||
vc.isNavBarHidden = true
|
||||
let isHidden = vc.navigationController?.isNavigationBarHidden
|
||||
XCTAssertEqual(true, isHidden)
|
||||
|
||||
vc.isNavBarHidden = false
|
||||
XCTAssertEqual(vc.isNavBarHidden, false)
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
super.tearDown()
|
||||
}
|
||||
|
|
|
@ -228,6 +228,16 @@ extension UIViewController {
|
|||
_ = navigationController?.popViewController(animated: true)
|
||||
}
|
||||
|
||||
/// EZSE: Hide or show navigation bar
|
||||
public var isNavBarHidden:Bool {
|
||||
get {
|
||||
return (navigationController?.isNavigationBarHidden)!
|
||||
}
|
||||
set {
|
||||
navigationController?.isNavigationBarHidden = newValue
|
||||
}
|
||||
}
|
||||
|
||||
/// EZSE: Added extension for popToRootViewController
|
||||
open func popToRootVC() {
|
||||
_ = navigationController?.popToRootViewController(animated: true)
|
||||
|
|
Loading…
Reference in New Issue