<commit_before># CrossNavigation

if you inherit your view controllers from CNViewController, you'll be able to push them to the stack not just to right side (as you do if you use UINavigationController), but to any of four: left, top, right, bottom. Supports autorotations.

## Usage

### You can make a transition in code

``` objc
XXViewController *nextViewController = ...;
[self presentViewController:nextViewController direction:CNDirectionTop animated:YES];
```

If at least two controllers are in the stack, users can drag back to return interactively to the previous screen (like UINavigationController).

![](https://github.com/artemstepanenko/CrossNavigation/blob/master/demo_present.gif)

### Storyboard

You can specify all transitions in storyboard, as well.

![](https://github.com/artemstepanenko/CrossNavigation/blob/master/demo_storyboard_inspector.png)

Values are storyboard IDs of view controllers. And keys are determined in CNViewController_Storyboard.h. (Also you can set them in code.)

This approach allows users to move forward by dragging, but all the controllers must be created in the **same** storyboard.

### Restrictions

- The only one class that should be used directly is CNViewController.
- The view controllers must be initialized with a xib-file or by a storyboard object.

## Demo

![](https://github.com/artemstepanenko/CrossNavigation/blob/master/demo_storyboard.gif)

## Integration

All you need is CrossNavigation directory. Just copy it to your project.
(CocoaPod is comming soon...)

## Requirements

- iOS 7.0+
- UIKit framework
- Foundation framework<commit_msg>After merge<commit_after># CrossNavigation

if you inherit your view controllers from CNViewController, you'll be able to push them to the stack not just to right side (as you do if you use UINavigationController), but to any of four: left, top, right, bottom. Supports autorotations.

## Usage

### You can make a transition in code

``` objc
XXViewController *nextViewController = ...;
[self presentViewController:nextViewController direction:CNDirectionTop animated:YES];
```

If at least two controllers are in the stack, users can drag back to return interactively to the previous screen (like UINavigationController). Or you can do the same in code (but obviously without interactivity):

``` objc
[nextViewController dismissViewControllerAnimated:YES completion:^{ ... }];
```

This is UIViewController's method which was overridden.

Implement

``` objc
- (void)viewIsAppearing:(CGFloat)percentComplete { ... }
```

method in CNViewController subclass to be notified what is the current rate of a visible part of the screen. This method fires during transitions (both, interactive and noninteractive).

![](https://github.com/artemstepanenko/CrossNavigation/blob/master/demo_present.gif)

### Storyboard

You can specify all transitions in storyboard, as well.

![](https://github.com/artemstepanenko/CrossNavigation/blob/master/demo_storyboard_inspector.png)

Values are storyboard IDs of view controllers. And keys are determined in CNViewController_Storyboard.h. (Also you can set them in code.)

This approach allows users to move forward by dragging, but all the controllers must be created in the **same** storyboard.

### Restrictions

- The only one class that should be used directly is CNViewController.
- The view controllers must be initialized with a xib-file or by a storyboard object.

## Demo

![](https://github.com/artemstepanenko/CrossNavigation/blob/master/demo_storyboard.gif)

## Integration

All you need is CrossNavigation directory. Just copy it to your project and import "CNViewController.h" or "CNViewController_Storyboard.h" (if you're going to use storyboard part of the functionality, as well), nothing else.
(CocoaPod is comming soon...)

## Requirements

- iOS 7.0+
- UIKit framework
- Foundation framework
{'fraction_non_alphanumeric': 0.08164852255054432, 'fraction_numerical': 0.0010368066355624676, 'mean_word_length': 5.010903426791277, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7403045', 'n_tokens_mistral': 1090, 'n_tokens_neox': 998, 'n_words': 439}