ELFoundation is a collection of Swift utilities for iOS development.
ELFoundation requires Swift 5 and Xcode 10.2.
Install with Carthage by adding the framework to your project's Cartfile.
github "Electrode-iOS/ELFoundation"
Install by adding ELFoundation.xcodeproj
to your project and configuring your target to link ELFoundation.framework
from ELFoundation
target.
There are two target that builds ELFoundation.framework
.
ELFoundation
: Creates dynamically linkedELFoundation.framework.
ELFoundation_static
: Creates statically linkedELFoundation.framework
.
Both targets build the same product (ELFoundation.framework
), thus linking the same app against both ELFoundation
and ELFoundation_static
should be avoided.
exceptionFailure
- A replacement for assertionFailure, usable in tests.synchronized<T>
- Akin to @synchronized() in Objective-C.Object Association
- Objective-C style object association.Swizzling
- Objective-C style swizzling.Array (extensions)
- Handy extensions.NSObject (extensions)
- Handy extensions.NSThread (extensions)
- Handy extensions.NSBundle (extensions)
- Handy extensions.XCTestCase (extensions)
- Gets XCTAssertThrows working in Swift.
Synchronized property access:
public var suspended: Bool {
get {
return lock.around {
self.suspended
}
}
set(value) {
lock.around {
self.suspended = value
}
}
}