Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readme readability #3

Merged
merged 1 commit into from
Nov 23, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Description

**VIPER McFlurry** is a modern framework for implementing VIPER architecture in iOS application. It offers several tools and components that helps either start new projects with VIPER or move from MVC.
**VIPER McFlurry** is a modern framework for implementing VIPER architecture in iOS application. It offers several tools and components that help either start new projects with VIPER or move from MVC.

Also it icludes **Templates** folder with Xcode templates for VIPER modules.

Expand Down Expand Up @@ -56,9 +56,9 @@ Copy contents of *Templates/File Templates* folder into `~/Library/Developer/Xco

This works only for Module with ViewController as View.

- Create Module input protocol for target module inherited from 'RamblerViperModuleInput'
- Create Module input protocol for target module inherited from ```RamblerViperModuleInput```

```
```objective-c
@protocol SomeModuleInput <RamblerViperModuleInput>

- (void)moduleConfigurationMethod;
Expand All @@ -72,7 +72,7 @@ This works only for Module with ViewController as View.
- Inject Source ViewController into Source Router as property "transition handler"
- In Router method call transition handler to open target module with configuration during segue.

```
```objective-c
[[self.transitionHandler openModuleUsingSegue:SegueIdentifier]
thenChainUsingBlock:^id<RamblerViperModuleOutput>(id<SomeModuleInput> moduleInput) {
[moduleInput moduleConfigurationMethod];
Expand All @@ -83,9 +83,9 @@ This works only for Module with ViewController as View.

## Working with Module output ##

- Create Module output protocol for target module inherited from 'RamblerViperModuleOutput'
- Create Module output protocol for target module inherited from ```RamblerViperModuleOutput```

```
```objective-c
@protocol SomeModuleOutput <RamblerViperModuleOutput>

- (void)moduleConfigurationMethod;
Expand All @@ -95,13 +95,13 @@ This works only for Module with ViewController as View.
- Make source module presenter to conform to this protocol
- Add to target module presenter method

```
```objective-c
- (void)setModuleOutput:(id<RamblerViperModuleOutput>)moduleOutput;
```

- Return source module presenter from configuration block in router

```
```objective-c
[[self.transitionHandler openModuleUsingSegue:SegueIdentifier]
thenChainUsingBlock:^id<RamblerViperModuleOutput>(id<SomeModuleInput> moduleInput) {
[moduleInput moduleConfigurationMethod];
Expand All @@ -114,15 +114,15 @@ This works only for Module with ViewController as View.

Module factory can be replaced with segues for most cases. Except you need to create complex module or nontrivial module instantiation logic.

- Use **RamblerViperModuleFactory** object as module fabric with Typhoon.
- Set definition Initializer to **initWithStoryboard:andRestorationId:**
- Use ```RamblerViperModuleFactory``` object as module fabric with Typhoon.
- Set definition Initializer to ```initWithStoryboard:andRestorationId:```
- First parameter is UIStoryboard instance
- Second parameter is RestorationID of ViewController
- Typhoon will initialize module from ViewController.
- Inject this Factory into router
- Call Transition Handler's method **openModuleUsingFactory:withTransitionBlock:**
- Call Transition Handler's method ```openModuleUsingFactory:withTransitionBlock:```
- Second block is place where transition from one to another viewController/transitionHandler should be performed
```
```objective-c
[[self.transitionHandler openModuleUsingFactory:self.betaModuleFactory
withTransitionBlock:^(id <RamblerViperModuleTransitionHandlerProtocol> sourceModuleTransitionHandler,
id <RamblerViperModuleTransitionHandlerProtocol> destinationModuleTransitionHandler) {
Expand Down