WolMo - Core iOS is a framework which provides extensions and utilities for iOS commonly used at Wolox.
At Wolox, we complement this framework with Wolmo - Reactive Core.
Carthage is a dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
brew update
brew install carthage
To download wolmo-core-ios, add this to your Cartfile:
github "Wolox/wolmo-core-ios" ~> 4.1.0
Bootstrap the project and then drag it to your workspace.
The framework is divided into 2 sections: Utilities and Extensions.
The main difference between them is that utilities
represent components that are independent of the existance of another component. On the other hand, extensions
represent extra functionality for other existent components. Extensions exist only because the components they rely on exists.
Constitutes a component which is independent from another component.
For example, AlertViewPresenter represents the behaviour of presenting an alert. In this case, any class (struct, enum, etc...) which can adopt this behaviour may be an AlertViewPresenter
.
In this framework, we give a default implementation of UIViewController
as an AlertViewPresenter
. However, note that they are independent one from another.
WolmoCore
provides the following utilities:
- AlertViewPresenter: Abstracts the logic of presenting different type of alerts.
- AssociatedObject: Setter and getter for associated objects. Works with objects and value types.
- Identifiable: Identifies a reusable view. Usually used with
UICollectionView
andUITableView
for cells, headers or footers. - NibLoadable: Provides a way to load a resource from a nib, through Identifiable. Usually used to load a UIViewcontroller's view from a .xib.
- DeviceType: Provides the current device type.
- PathAppendable: Makes a component able to be appended to a URL or string. and more...
Extends the behaviour of a component (class
, struct
, enum
, ...) by adding common functionality (functions, computed properties, initializers, ...).
Extensions contain components which depends exclusively on other components.
For example, Collapsable represents a collapsable element. This behaviour is an addition to a UIView
; it would not make sense to have something which is not renderable as Collapsable
. Furthermore, it doesn't make sense for Collapsable
to exist per se; it is a behaviour added to any view which conforms to it.
WolmoCore
provides the following extensions:
- AVFoundation: Extensions used for AVFoundation elements, such as AVAsset and AVPlayerItem.
- UIKit: Extensions for UIKit elements, such as UIView and UIViewController.
- Foundation: Extensions for Foundation elements, such as String, Array and Date.
- Animations: Extensions for
UIView
to animate it easily, such as SimpleAnimation, MixedAnimation and ChainedAnimation
You can check in the AnimationDemo the contrast between the normal way of doing animations and our way. You can see examples of simple animations and one complex animation. Moreover, you can check some cases which does not work as expected with our extensions so you don't run into those problems.
git clone [email protected]:Wolox/wolmo-core-ios.git
cd wolmo-core-ios
script/bootstrap
- Clone it
- Bootstrap the repository
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Run tests (
./script/test
) - Push your branch (
git push origin my-new-feature
) - Create a new Pull Request to the repository
This project is maintained by Wolox.
WolMo - Core iOS is available under the MIT license.
Copyright (c) 2016 Francisco Depascuali <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.