A series of wrappers around the AppKit/UIKit views that adapt them into a declaratively constructed, reactive signal driven framework.
CwlViews requires Swift 5 or newer and targets macOS 10.13 or iOS 11 or newer.
There are a number of ways that CwlViews can be included in a project.
For quickly starting new projects, the "Xcode templates with embedded inclusion" approach is often simplest – it installs Xcode project templates that embed the required CwlViews files directly into newly created CwlViews apps or CwlViews playgrounds. The biggest downside to this approach is that cleaning and rebuilding your project requires rebuilding the CwlViews files too.
For inclusion in existing projects or to keep CwlViews in a separate framework (for compilation performance and dependency management advantages) then use one of the "Manual framework inclusion", "Carthage" or "CocoaPods" approaches.
Scriptsdirectory in the CwlViews repository.
The project template includes some sample code and includes the contents of the CwlViews framework in the "Dependencies" folder. Since these files are directly included in the application, you do not need to use
import statements at the top of your Swift files to use them.
git clone https://github.com/mattgallagher/CwlViews.git
import CwlViewsat the top (all three frameworks will be imported by this single statement).
Adding the "CwlViews.xcodeproj" file to your project's file tree will also add all of its schemes to your scheme list in Xcode. You can hide these from your scheme list from the menubar by selecting "Product" → "Scheme" → "Manage Schemes" (or typing Command-Shift-,) and unselecting the checkboxes in the "Show" column next to the CwlViews, CwlSignal and CwlUtils scheme names.
Add the following line to your Cartfile:
git "https://github.com/mattgallagher/CwlViews.git" "master"
Follow the remaining steps that Carthage requires to fetch and build dependencies. You will need to add the "CwlViews.framework", "CwlSignal.framework" and "CwlUtils.framework" to the copy frameworks phase of your target.
Add the following lines to your target in your "Podfile":
pod 'CwlViews', '~> 0.1.0' pod 'CwlSignal', '~> 2.2.0' pod 'CwlUtils', '~> 2.2.0'