AnyObjectConvertible alternatives and similar libraries
Based on the "Data Structures / Algorithms" category.
Alternatively, view AnyObjectConvertible alternatives based on common mentions on social networks and blogs.
-
Dollar
A functional tool-belt for Swift Language similar to Lo-Dash or Underscore.js in Javascript http://www.dollarswift.org. -
SwiftStructures
Examples of commonly used data structures and algorithms in Swift. -
Result
Swift type modelling the success/failure of arbitrary operations. -
BTree
Fast ordered collections for Swift using in-memory B-trees -
Algorithm
A toolset for writing algorithms and probability models in Swift -
SwiftGraph
Graph data structure and utility functions in pure Swift. -
Differ
Swift library to generate differences and patches between collections. -
KeyPathKit
KeyPathKit provides a seamless syntax to manipulate data using typed keypaths. -
SwiftPriorityQueue
A priority queue with a classic binary heap implementation in pure Swift. -
Buffer
Swift μ-framework for efficient array diffs, collection observation and cell configuration. -
Brick
A generic view model for both basic and complex scenarios -
HAMT (for Swift)
An implementation of HAMT data-structure in Swift -
Monaka
Convert custom struct and fundamental values to NSData. -
RandMyMod
RandMyMod base on your own struct or class create one or a set of randomized instance. -
SwiftSortedList
A sorted list implementation written in Swift -
OneWaySynchronizer
The simplest abstraction to synchronize local data with remote source.
Scout APM - Leading-edge performance monitoring starting at $39/month
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of AnyObjectConvertible or a related project?
README
AnyObjectConvertible
Convert your own struct/enum to AnyObject easily.
Sumally
We can cast everything as AnyObject at Swift3.0 🎉 So, we would not need this library no longer
In swift, struct or enum cannot convert to AnyObject
NSNotificationCenter.defaultCenter().postNotificationName("foo", object: YourOwnStruct()) // Fail
Of course, you may wrap value using Box<T>.
class Box<T> {
let value: T
init(value: T) {
self.value = value
}
}
NSNotificationCenter.defaultCenter().postNotificationName("foo", object: Box(value: YourOwnStruct())) // OK
But Box<T> unwrap is too lazy.
let value = (notification.object as? Box<YourOwnStruct>)?.value
You can cast your struct/enum directory if implement AnyObjectConvertible at that type.
extension YourOwnStruct: AnyObjectConvertible {}
NSNotificationCenter.defaultCenter().postNotificationName("foo", object: YourOwnStruct()) // OK
let value = notification.object as? YourOwnStruct
Installation
CocoaPods
You can use CocoaPods to install AnyObjectConvertible
by adding it to your Podfile
:
platform :ios, '8.0'
use_frameworks!
pod 'AnyObjectConvertible'
To get the full benefits import AnyObjectConvertible
wherever you import UIKit
import UIKit
import AnyObjectConvertible
Carthage
Create a Cartfile
that lists the framework and run carthage bootstrap
. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/YourLibrary.framework
to an iOS project.
github "tarunon/AnyObjectConvertible"
Manually
- Download and drop
AnyObjectConvertible.swift
in your project. - Congratulations!
License
MIT
*Note that all licence references and agreements mentioned in the AnyObjectConvertible README section above
are relevant to that project's source code only.