XFLegoVIPER
π A seamless framework for build app from MVC, MVVM, VIPER (etc.) design pattern in iOS world. (OC & Swift)
Install / Use
/learn @yizzuide/XFLegoVIPERREADME
Note
π A seamless framework for build app from MVC, MVVM, VIPER (etc.) design pattern in iOS world. (OC & Swift)
- Assemble a VIPER module as fast so far, only need one line code.
- Build-In powerful component event communication.
- Real-Time track Component link π« .
- Consider MVx, VIPER (etc.) module as component, using the same transition and event API.
- Add plugin mechanism for custom extension other design pattern module and URL Route.
- Add URL interceptor for intercept special URL before transition.
πΊ Thanks VIPER!

Component Architecture

Example
Demo

Swift Demo
see Lego-swift
Complete project
Video
Requirements
- Xcode 7.0+
- IOS 6.0+
4.x Release
XFLegoVIPER 4.x is now available (July 2017). π It's now add Swift (all version) language support. π
Installation
CocoaPods
To integrate XFLegoVIPER into your Xcode project using CocoaPods, specify it in your Podfile:
platform :ios, '8.0'
use_frameworks! # for Swift!!!
target '<Your Target Name>' do
pod 'XFLegoVIPER', '~> 4.0'
end
Import the XFLegoVIPER.h umbrella header.
- With
use_frameworks!in your Podfile- Swift:
import XFLegoVIPER - Objective-C:
#import <XFLegoVIPER/XFLegoVIPER.h>(or with Modules enabled:@import XFLegoVIPER;)
- Swift:
- Without
use_frameworks!in your Podfile- Swift: Add
#import "XFLegoVIPER.h"to your bridging header. - Objective-C:
#import "XFLegoVIPER.h"
- Swift: Add
β€Using Templateβ€
Now you can use template file to create a module which make of stuff class as fast as possible.
Too complicated? See Video
1.Install the templates
Xcode templates can be found in the repository's /Template/Architecture folder. To install them, open your terminal and run:
cd PATH/TO/REPO
mkdir -p ~/Library/Developer/Xcode/Templates/
cp -R Template/Architecture ~/Library/Developer/Xcode/Templates/
2.Using xcode create module files
- Quit Xcode and open again
- Right click a group, select
New File... - Scrolling to Architecture Section, double click
VIPERorMVVMitem - Input module name (you need add class prefix), and next, final click
createaction
3.Fix blue folder issue
we have blue folder under select group, what's wrong? Let's fix it:
- Right click blue folder, select
Show in Finder - Back to Xcode, right click blue folder again, select
Delete->Remove References - Back to opened Finder, drag new-folder to Xcode under a group
OK! It Work!
VIPER Module

Documentation
Change log
see change log
Reference
iOS Architecture Patterns English | Chinese
Architecting iOS Apps with VIPER English | Chinese
Author
yizzuide, fu837014586@163.com
QQ GroupοΌ450518005
Contributors
Code Contributors
This project exists thanks to all the people who contribute. [Contribute]. <a href="https://github.com/yizzuide/XFLegoVIPER/graphs/contributors"><img src="https://opencollective.com/xflego/contributors.svg?width=890&button=false" /></a>
Financial Contributors
Become a financial contributor and help us sustain our community. [Contribute]
Individuals
<a href="https://opencollective.com/xflego"><img src="https://opencollective.com/xflego/individuals.svg?width=890"></a>
Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]
<a href="https://opencollective.com/xflego/organization/0/website"><img src="https://opencollective.com/xflego/organization/0/avatar.svg"></a> <a href="https://opencollective.com/xflego/organization/1/website"><img src="https://opencollective.com/xflego/organization/1/avatar.svg"></a> <a href="https://opencollective.com/xflego/organization/2/website"><img src="https://opencollective.com/xflego/organization/2/avatar.svg"></a> <a href="https://opencollective.com/xflego/organization/3/website"><img src="https://opencollective.com/xflego/organization/3/avatar.svg"></a> <a href="https://opencollective.com/xflego/organization/4/website"><img src="https://opencollective.com/xflego/organization/4/avatar.svg"></a> <a href="https://opencollective.com/xflego/organization/5/website"><img src="https://opencollective.com/xflego/organization/5/avatar.svg"></a> <a href="https://opencollective.com/xflego/organization/6/website"><img src="https://opencollective.com/xflego/organization/6/avatar.svg"></a> <a href="https://opencollective.com/xflego/organization/7/website"><img src="https://opencollective.com/xflego/organization/7/avatar.svg"></a> <a href="https://opencollective.com/xflego/organization/8/website"><img src="https://opencollective.com/xflego/organization/8/avatar.svg"></a> <a href="https://opencollective.com/xflego/organization/9/website"><img src="https://opencollective.com/xflego/organization/9/avatar.svg"></a>
License
XFLegoVIPER is available under the MIT license. See the LICENSE file for more info.
