<commit_before>TiSideMenu
===========================================

** iOS 7 / 8 ONLY **

iOS 7 / 8 style side menu with parallax effect.

Wrapper module for the great [RESideMenu](https://github.com/romaonthego/RESideMenu)

Since 1.2 this module supports both left and right menu views.


<img src="https://github.com/mpociot/TiSideMenu/raw/master/Demo.gif" alt="RESideMenu Screenshot" width="320" height="568" />

### Usage

Use TiSideMenu as a replacement for your root window.

	var contentView = Ti.UI.createWindow({
		background: 'red'
	});
	
	var leftMenuView    = Ti.UI.createWindow({
		background: 'transparent'
	});
	var rightMenuView    = Ti.UI.createWindow({
		background: 'transparent'
	});
	
	var win = TiSideMenu.createSideMenu({
		contentView: 		contentView,
		leftMenuView: 		leftMenuView,
		rightMenuView: 		rightMenuView,
		backgroundImage: 	'stars.png',
		contentViewScaleValue: 0.2,
		scaleContentView: true,		
		panGestureEnabled: false,	
		scaleBackgroundImageView: false,
		scaleMenuView: true,		
		parallaxEnabled: false,
		panFromEdge: true,
	});
	win.open();
	
### Replacing the content window

* Setting the content window without animation `Default`

		win.setContentWindow(newWin);
	
* Setting the content window with an animation

		win.setContentWindow({
				window: newWin,
				animated: true 
		});
		
### Alloy

To use this module within Alloy, please take a look at this repository: [de.marcelpociot.alloysidemenu](https://github.com/manumaticx/de.marcelpociot.alloysidemenu)
	
		
### Known issues
If the slide animation is enabled, a bug exists where an incomplete slide results in opening empty windows through a navigation / tabgroup. 
To resolve this issue be sure to manually hide the side Menu before opening the new window.

`win.hideMenuViewController();`


### Configuration
	
* Enable / Disable the pan gesture 
	`win.setPanGestureEnabled( true / false );`

* Enable / Disable pan from left
	`win.setLeftPanEnabled( true / false );`

* Enable / Disable pan from right
	`win.setRightPanEnabled( true / false );`
	
* Enable / Disable then pan from the edge
	`win.setPanFromEdge( true / false ); `

* Enable / Disable Parallax effect	
	`win.setParallaxEnabled( true / false ); `
	
* Enable / Disable Background image scaling
	`win.setScaleBackgroundImageView( true / false );`
	
* Enable / Disable Background menu view scaling
	`win.setScaleBackgroundMenuView( true / false );`
	
* Enable / Disable Content view scaling
	`win.setScaleContentView( true / false );`
	
* Set the content view scale value
	`win.setContentViewScaleValue( 0.0 - 1.0 );`

Manually showing / hiding the menu:

`win.hideMenuViewController()`

`win.presentLeftMenuViewController()`

`win.presentRightMenuViewController()`

### Options


#### backgroundImage

Type: `Blog / Image URL`  
Default: `empty String`

Background image to use for the menu.

#### contentViewScaleValue

Type: `Float`  <commit_msg>why is it so hard to get the documentation right?<commit_after>TiSideMenu
===========================================

** iOS 7 / 8 ONLY **

iOS 7 / 8 style side menu with parallax effect.

Wrapper module for the great [RESideMenu](https://github.com/romaonthego/RESideMenu)

Since 1.2 this module supports both left and right menu views.


<img src="https://github.com/mpociot/TiSideMenu/raw/master/Demo.gif" alt="RESideMenu Screenshot" width="320" height="568" />

### Usage

Use TiSideMenu as a replacement for your root window.

	var contentView = Ti.UI.createWindow({
		background: 'red'
	});
	
	var leftMenuView    = Ti.UI.createWindow({
		background: 'transparent'
	});
	var rightMenuView    = Ti.UI.createWindow({
		background: 'transparent'
	});
	
	var win = TiSideMenu.createSideMenu({
		contentView: 		contentView,
		leftMenuView: 		leftMenuView,
		rightMenuView: 		rightMenuView,
		backgroundImage: 	'stars.png',
		contentViewScaleValue: 0.2,
		scaleContentView: true,		
		panGestureEnabled: false,	
		scaleBackgroundImageView: false,
		scaleMenuView: true,		
		parallaxEnabled: false,
		panFromEdge: true,
	});
	win.open();
	
### Replacing the content window

* Setting the content window without animation `Default`

		win.setContentWindow(newWin);
	
* Setting the content window with an animation

		win.setContentWindow({
				window: newWin,
				animated: true 
		});
		
### Alloy

To use this module within Alloy, please take a look at this repository: [de.marcelpociot.alloysidemenu](https://github.com/manumaticx/de.marcelpociot.alloysidemenu)
	
		
### Known issues
If the slide animation is enabled, a bug exists where an incomplete slide results in opening empty windows through a navigation / tabgroup. 
To resolve this issue be sure to manually hide the side Menu before opening the new window.

`win.hideMenuViewController();`


### Configuration
	
* Enable / Disable the pan gesture 
	`win.setPanGestureEnabled( true / false );`

* Enable / Disable pan from left
	`win.setLeftPanEnabled( true / false );`

* Enable / Disable pan from right
	`win.setRightPanEnabled( true / false );`
	
* Enable / Disable then pan from the edge
	`win.setPanFromEdge( true / false ); `

* Enable / Disable Parallax effect	
	`win.setParallaxEnabled( true / false ); `
	
* Enable / Disable Background image scaling
	`win.setScaleBackgroundImageView( true / false );`
	
* Enable / Disable menu view scaling
	`win.setScaleMenuView( true / false );`
	
* Enable / Disable Content view scaling
	`win.setScaleContentView( true / false );`
	
* Set the content view scale value
	`win.setContentViewScaleValue( 0.0 - 1.0 );`

Manually showing / hiding the menu:

`win.hideMenuViewController()`

`win.presentLeftMenuViewController()`

`win.presentRightMenuViewController()`

### Options


#### backgroundImage

Type: `Blog / Image URL`  
Default: `empty String`

Background image to use for the menu.

#### contentViewScaleValue

Type: `Float`  
{'fraction_non_alphanumeric': 0.11615214054238444, 'fraction_numerical': 0.006140201262152482, 'mean_word_length': 4.193976970770594, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7089568', 'n_tokens_mistral': 1939, 'n_tokens_neox': 1754, 'n_words': 552}