Skip to content

cristianames92/wolmo-core-ios

 
 

Repository files navigation

WolMo - Core iOS

Build Status Codestats GitHub release Carthage compatible Swift 4.1

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.



Table of Contents

Installation

Carthage

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

Manually

Bootstrap the project and then drag it to your workspace.

Usage

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.

Utilities

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:

  1. AlertViewPresenter: Abstracts the logic of presenting different type of alerts.
  2. AssociatedObject: Setter and getter for associated objects. Works with objects and value types.
  3. Identifiable: Identifies a reusable view. Usually used with UICollectionView and UITableView for cells, headers or footers.
  4. NibLoadable: Provides a way to load a resource from a nib, through Identifiable. Usually used to load a UIViewcontroller's view from a .xib.
  5. DeviceType: Provides the current device type.
  6. PathAppendable: Makes a component able to be appended to a URL or string. and more...

Extensions

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:

  1. AVFoundation: Extensions used for AVFoundation elements, such as AVAsset and AVPlayerItem.
  2. UIKit: Extensions for UIKit elements, such as UIView and UIViewController.
  3. Foundation: Extensions for Foundation elements, such as String, Array and Date.
  4. 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.

Bootstrap

git clone git@github.com:Wolox/wolmo-core-ios.git
cd wolmo-core-ios
script/bootstrap

Contributing

  1. Clone it
  2. Bootstrap the repository
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Run tests (./script/test)
  6. Push your branch (git push origin my-new-feature)
  7. Create a new Pull Request to the repository

About

This project is maintained by Wolox.

Wolox

License

WolMo - Core iOS is available under the MIT license.

Copyright (c) 2016 Francisco Depascuali <francisco.depascuali@wolox.com.ar>

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.

About

Wolmo - Wolox Mobile SDK core library for iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 92.5%
  • Shell 4.7%
  • Ruby 2.7%
  • Objective-C 0.1%