Coder Social home page Coder Social logo

pprevealsideviewcontroller's People

Contributors

ipodishima avatar lono175 avatar muppetkermit avatar najdanovicivan avatar nerdery-isaac avatar readmecritic avatar rock88 avatar s1m-0n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pprevealsideviewcontroller's Issues

iOS 6 Rotation Issue

As we know, in iOS 6, supporting rotation should be done by overriding method:
-(NSUInteger)supportedInterfaceOrientations

Overriding that method in root view controller of PPRevealSideViewController is ignored.
I fix it by adding this method in PPRevealSideViewController

-(NSUInteger)supportedInterfaceOrientations{
    return [_rootViewController supportedInterfaceOrientations];
} 

What do you think?

Why does a new view have it's view did disappear called?

Hi,

viewDidDissapear is no behaving properly in views of controllers being pushed. Their viewDidDissapear method is being called when they first appear. I have commented out the below line which seems to work but I'm not entirely sure of the consequences.

Are you able to elaborate?

The method is:

- (void) pushViewController:(UIViewController *)controller onDirection:(PPRevealSideDirection)direction withOffset:(CGFloat)offset animated:(BOOL)animated forceToPopPush:(BOOL)forcePopPush {
[self informDelegateWithOptionalSelector:@selector(pprevealSideViewController:willPushController:) withParam:controller];

The code in question is:

// TODO DAN CHANGE
//[self removeControllerFromView:controller animated:animated];

// TODO remove then adding not so good ... Maybe do something different 
if (PPSystemVersionGreaterOrEqualThan(5.0))
{
    [controller willMoveToParentViewController:self];
 ...

You can see I've commented out the [self removeControllerFromView:controller animated:animated]; line.

viewDidAppear called twice

Hi there!
I run into a strange issue and was wondering if I am doing something wrong or if there is something wrong: the viewDidAppear method of my first viewController on the TabBarController gets called twice. This how I "create" the navigation:

self.employeeListController = [[GOEmployeeListViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *empoloyeeNavigationController = [[UINavigationController alloc] initWithRootViewController:self.employeeListController];

self.siteController = [[GOSiteViewController alloc] initWithStyle:UITableViewStyleGrouped];
UINavigationController *siteNavigationController = [[UINavigationController alloc] initWithRootViewController:self.siteController];

self.tabBarController = [[UITabBarController alloc] init];
[self.tabBarController setViewControllers:[NSArray arrayWithObjects:empoloyeeNavigationController, siteNavigationController, nil]];

self.slideController = [[PPRevealSideViewController alloc] initWithRootViewController:self.tabBarController];

self.window.rootViewController = self.slideController;

Now the viewDidAppear on the employeeListController gets called twice.
When I am not using the slideController but the tabBarContorller as rootViewController the vievDidAppear method is called once.

Am i doing something wrong? is there a way to prevent that viewDidAppear gets called twice?

Thanks :)

EasySample preloading view not working

Hi

It seems like if I first clic on the "left" button, the left view is preloaded (and shown) right, then the pan gesture works right
But if I close and open the sample and I try to do first the pan gesture over the navigation bar, the left view is not preloaded and it is shown without any row.

Any help?

openCompletelyAnimated and replaceAfterOpenedCompletelyAnimated

  1. Used openCompletelyAnimated: open the whole side menu
  2. After some actions, used replaceAfterOpenedCompletelyAnimated: the view back again to offset 70.0
  3. Trying to use the same button again,(that should be closing the side menu, and revealing the whole center view),
    it only animate from offset:70.0 to offset:70.0,

Rotation with statusbar hidden

In my application, i hide status bar when got to landscape mode.
If i rotate the device in portrait to landscape and restore from landscape to portrait, the right panel get all the size in width (and hide the center view).

The log show me that:

__55-[PPRevealSideViewController statusBarFrameWillChange:]_block_invoke_0 [Line 640] {{-468, 0}, {568, 271}}

I have patched the code (but not sure it's a good fix but can help some ppl):

- (void) statusBarFrameWillChange:(NSNotification*)notif {
    // Could be needed in future bug fixes
    //    NSValue* rectValue = [[notif userInfo] valueForKey:UIApplicationStatusBarFrameUserInfoKey];
    //    CGRect newFrame;
    //    [rectValue getValue:&newFrame];

+    if ([UIApplication sharedApplication].statusBarHidden)
+      return;

    // PPRSLog(@"old %f new %f", _oldStatusBarHeight, PPStatusBarHeight());
    if (PPStatusBarHeight() != _oldStatusBarHeight)
    {

Delegate methods missing information

I think it would be beneficial if the delegate methods knew from which direction they were going / coming from. This would help with some logic aimed at specific controllers in the delegate methods.

Reveal Controller doesn't ever release resources

The code below simply creates a UIViewController, then creates a reveal controller using the newViewController object as root. Then the revealController is pushed onto a navigation controller called _parentNavigationController.

Later, when the _parentNavigationController is popped, the newViewController is never released.

However if the newViewController is pushed onto the _parentNavigationController, later when the pop happens it IS released.

What am I missing here? Why does the revealController not release newViewController?

Thanks in advance - simple code below!

UIViewController *newViewController = alloc come view controller;

PPRevealSideViewController* revealController = [[PPRevealSideViewController alloc] initWithRootViewController:newViewController];

[_parentNavigationController pushViewController:revealController animated:NO];

[revealController release];
[newViewController release];

---- later ------

[_parentNavigationController popViewControllerAnimated:NO]

Visually, everything is popped just fine and seemingly works, but I realized that although the navigation controller popped the revealController visually, both the revealController and it's resources (newViewController) are still in memory and never get their deallocs called.

Rounded Corners?

Hey there,
is there a way to make the centered ViewController have rounded corners? (Like for e.g. the Path App).
When I set the cornerRadius on the ViewController it goes well until I start dragging it, then the corners aren't rounded anymore :/

Thank you very much from Germany,

sKeLeTr0n

Build error in PPrevealSideViewController.m

Hi,
by trying to build your easy app I receive the following error in PPRevealSideViewController.m line 526:

Receiver type 'PPRevealSideViewController' for instance message does not declare a method with selector 'preloadViewController:forSide:withOffset:forceRemoval:'

Did I miss anything or is there a bug? I'm on Mac OSx Lion with xCode 4.2.1.

memory warning

There is a bug that CustomCell's _disclosureButton can not update position when receive memory warning.

Disable interaction when side views open

Is there a way to disable interaction the center view when one the side views is visible. For example, prevent the center view from scrolling or being able to hit buttons in the center view when the menu is visible. This is how the Facebook app works, but in the sample app, you can scroll and select buttons when the menu is visible.

Disable panning when navigationbar push to deital view

This is a great project, but i have a problem

My center view control is a table view when I push to detail view I want to disable panning navigationbar, I use the

[self.navigationController.navigationBar setUserInteractionEnabled:NO];

but this will disable the back button, pls help

showLeft works only 1 time

SearchViewController is a tableview...
FilterviewController is a UIView

in the appdelegate i do this:

SearchViewController *searchViewController = [[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil];

    _nav = [[UINavigationController alloc] initWithRootViewController:searchViewController];
    searchViewController.revealSideViewController = [[PPRevealSideViewController alloc] initWithRootViewController:_nav];
    self.window.rootViewController = searchViewController.revealSideViewController;

In searchViewController i do this:

ViewDidLoad

UIBarButtonItem *left = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch                         target:self action:@selector(showLeft)];
self.navigationItem.leftBarButtonItem = PP_AUTORELEASE(left);

Down i add the selector for it..

- (void) showLeft {
NSLog(@"Pushed left");

FilterViewController *c = [[FilterViewController alloc] initWithNibName:@"FilterViewController" bundle:nil];
[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionLeft withOffset:20 animated:YES];
PP_RELEASE(c);

    [self.revealSideViewController pushOldViewControllerOnDirection:PPRevealSideDirectionLeft animated:YES];

}

In filterview i have a searchbutton that when pushed

SearchViewController *controller = [[SearchViewController alloc]initWithNibName:@"SearchViewController" bundle:nil];

UINavigationController *n = [[UINavigationController alloc] initWithRootViewController:controller];
[self.revealSideViewController popViewControllerWithNewCenterController:n animated:YES];

The first time the tap on the bar button item works great, but after i have used search it does not want to push the side...gesture (dragging) still works...

Keeping views in memory

How would I keep views in memory?
So for instance, if a map is selected in the side menu, and you zoom into New York, when you come back to that view later, it's already zoomed in.

Keeping the top view while allowing left view.

This might be a bit obscure, but I'd like to be able to keep a top view fixed while having the center view and side menu available below.. like this:

------------------     Normal Mode
|*               |     Press button to reveal left
|                |
|                |
|                |
|                |
|                |
|                |
|                |
|                |
------------------

------------------     Menu revealed in normal mode 
| 1   *          |     
| 2              |
| 3              |
| 4              |
| 5              |
|                |
|                |
|                |
|                |
------------------


tapping a button puts app into 'top fixed view mode'

------------------     Top Fixed View Mode
|                |     
|   fixed view   |
|                |
|----------------|
|*               |
|                |
|                |
|                |
|                |
------------------

------------------     
|                |     
|   fixed view   |
|                |
|----------------|    Button reveals left, 
| 1   *          |    but keeps top fixed 
| 2              |    view, which does not move
| 3              |
| 4              |
| 5              |
------------------


'top fixed view mode' can be exited by 
tapping button or sliding bottom section up

Is this at all possible?

const UIViewAnimationCurveEaseInOut - deprecated, please change to UIViewAnimationOptionCurveEaseInOut, meets 2 times in PPRevealSideViewController.m (line 370 and 383)

const UIViewAnimationCurveEaseInOut - deprecated, please change to UIViewAnimationOptionCurveEaseInOut, meets 2 times in PPRevealSideViewController.m (line 370 and 383)

Sorry for my bad english, I have question about using navigation controller with PPRevealSideViewController, when i use [self.navigationcontroller pushViewController .... it lost PPRevealSideViewController gesture recognizer, how can i resolve this problem? i use pushViewController:onDirection:animated: after [self.navigationcontroller pushViewController .... and popViewControllerAnimated: when bach button pressed - it help me, but i'm not shure is this right way?

And second question: sometimes, when i fast click left side menu - central controller does not have time to update and show clear navigation bar and not work gesture recognizer, i use method: popViewControllerWithNewCenterController:animated: for change central controller, i think it becouse animation for change not complete when i fast click menu buttons - what can i do in this case?

Thanks for PPRevealSideViewController! =)

[Line 1156] ****** No controller to push ****** Think to preload controller ! ******

Hi im using the PPRevealSideViewController and have some Questions.

In Every View Controller i have added to center the Touch Gesture is not called and the PPRevealSideViewController logs out this

"-[PPRevealSideViewController gestureRecognizerDidPan:] [Line 1156] ****** No controller to push ****** Think to preload controller ! ******"

How can i fix this?

Left Menu is gone when I dissmiss the ModalViewController

In the Left Menu I present a ModalViewController,

if (PPSystemVersionGreaterOrEqualThan(5.0)){
[self presentModalViewController:n animated:YES];
} else {
[self.revealSideViewController presentModalViewController:n animated:YES];
}

and then I close it in the ModalViewController,

[self dismissModalViewControllerAnimated:YES];

the modalViewController is closed ,but My left menu is gone,can you help me? thank you very much.

20 pixels problem?

If i run the demo and click "Left" to show the SideView everything is fine.
But if i slide with my finger to show the SlideView the leftController which shows up is a out of the screen. It jumps down after the slide is completed.

Bug with panes from the right and from bottom

The property OFFSET_TRIGGER_CHOSE_DIRECTION is being incorrectly checked in the code for triggering the paning of the side view.

It is basically missing a minus sign on detecting right and bottom movements as it is checking if the difY and difX are smaller than OFFSET_TRIGGER_CHOSE_DIRECTION, instead of -OFFSET_TRIGGER_CHOSE_DIRECTION.

This is the corrected code:

if (panDiffX > 0 && panDiffX > OFFSET_TRIGGER_CHOSE_DIRECTION)
    _currentPanDirection = PPRevealSideDirectionLeft;
    else
        if (panDiffX < 0 && panDiffX < -OFFSET_TRIGGER_CHOSE_DIRECTION)
            _currentPanDirection = PPRevealSideDirectionRight;
        else
            if (panDiffY > 0 && panDiffY > OFFSET_TRIGGER_CHOSE_DIRECTION)
                _currentPanDirection = PPRevealSideDirectionTop;
            else
                if (panDiffY < 0 && panDiffY < -OFFSET_TRIGGER_CHOSE_DIRECTION)
                    _currentPanDirection = PPRevealSideDirectionBottom;

Offset and DefaultOffset

Sometimes the offset setting methods products unexpected behaviour due to the presence of the define and the absence of an explicit offset value upon call.
We're thinking about moving those value to instance variables with defaults.
IS there a deeper reason for having those as defines (and we're missing it), or we can go ahead and change it a little bit (and perhaps send a pull request)?

regards
lucio

iOS6 Status Bar Color

In my app, the UINavigationBar tintColor is Purple, and status bar adopt this color.

I preloadViewController:menu forSide:PPRevealSideDirectionLeft and, when I tried to popViewControllerWithNewCenterController, the status bar color changes to black, insted of adopt the UINavigationBar color.

Any ideas?

Thxs!

How can I show a UITableView from the right side?

In the sample app you provide, if you replace the showRight method with the contents of the showLeft method

  • (void) showRight {
    TableViewController *c = [[TableViewController alloc] initWithStyle:UITableViewStylePlain];
    [self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionLeft withOffset:_offset animated:_animated];
    PP_RELEASE(c);
    }

You get a tableview with an incorrect frame. (It starts at origin 0,0, behind the main view controller.
How do I get the tableview on the right side to show with an origin that starts at the correct place?

reveal left side viewcontroller completely (i.e. in the new facebook app)

Currently I have three view controllers : center, left, right
I can reveal the left side by calling :

[self.revealSideViewController pushOldViewControllerOnDirection:PPRevealSideDirectionLeft withOffset:DEFAULT_MENU_OFFSET animated:YES];

from the center viewcontroller. This works perfect. But now I want to
reveal the whole left side by pushing the center viewcontroller even
more to the right (as a second step).

This also happens in the new Facebook app. When you tap on the
Searchbar in the left revealed 'sidemenu' the "home/center"
viewcontroller is pushed away (or the left side is completely revealed)
so you have the full screen space for the search viewcontroller.

I hope the question is clear...... and I hope you can help out!

cheers, gitjoe

Disabling sliding of content view more than set offset

When view controller is opened (for example left side) and after that slide the content view, it continues to slide to right, revealing the background underneath it. Here is the screenshot:

Screeshot

I want to disable this behavior. I know you can disable sliding gestures when view controller is opened, however this will also disable the closing of side view by sliding. So I want to keep the closing by sliding, but remove sliding of the content view more than the set offset.

Thank you for help

iOS 6 auto-rotation problem

I modified the code a bit so that it works correctly in iOS 6.

Here is the code in PPRevealSiderViewController:

// for ios 6

  • (NSUInteger)supportedInterfaceOrientations
    {
    UIViewController* viewController = _rootViewController;
    if ( [_rootViewController isKindOfClass:[UINavigationController class] ] )
    {
    UINavigationController* naviController = (UINavigationController *)_rootViewController;
    viewController = naviController.topViewController;
    }
    // TODO: for UITabBarController
    return [viewController supportedInterfaceOrientations];
    }

RootView's TableView can't be selected?

Hi,
While I add a subview of UITableView to MainView above the view, and I found that I can't selected any cell of UITableView but can drag the tableview.

New viewController from the right side

When the underRightSideViewController is shown, I would like to push a new viewController from the right side. The topViewController and the underRightSideViewController shall move the left.

This behaviour is also shown in Path when selecting a friends profile.

I didn't find any solution to do that so far. Thanks.

NO shadow on ios6 Device

When I use PPRevealSideViewController on ios5.1 device or simulator, shadow works fine. But when I test it on ios6 device, shadow not showing, what should I do?

Edit: My app only works in landscape mode. after rotate my device from one landscape mode to another landscapemode, the shadow was showed up. But how could I make the shadow show up without rotation.

Edit: I added the following code after init the PPRevealSideViewController
CGRect frame = self.revealSideViewController.view.frame;
CGFloat width = frame.size.width;
frame.size.width = frame.size.height;
frame.size.height = width;
[self.revealSideViewController.view setFrame:frame];
don't know if there any better way to solve that problem.

Orientation issues

I'm having an issue where I'm presenting a modal view from the root view of my instance of PPRevealSideViewController.

I'm presenting a modal view with the code:

[self presentViewController:movieViewController animated:YES completion:^{
 // completed
}];

Inside movieViewController, the controller is dismissed with:

[self dismissViewControllerAnimated:YES completion:^{
    // back to previous view controller
}];

At the moment, all my view controllers can be viewed in portrait and the two landscape orientations.

How would I restrict all view controllers to portrait EXCEPT the modal view controller?

Is there a way I can make the app do this?

Problems with autosizing

I want to disable the resizing of the side view, however no matter I set PPRevealSideOptionsResizeSideView option or not, my given frame sizes are ignored. When I set the size of the side view controller and after that preload it, PPRevealSideViewController somehow ignores my settings. Here is what happens. I set the size, and when I reveal side view, only after the side view is completely opened my side view is resized. After closing side view controller returns to size set inside PPRevealSideViewController code. To demonstrate this see screenshots. First is during opening, second when the controller is opened. During opening center button is large, so only a part of it is seen, after opening side view is automatically resized to fit the space, which es determined by the offset property of side view.
reveal1
reveal2

How can I make the side view to have fixed width, no matter what happens? Because this resizing after opening causes the graphics to be redrawn and makes the side view interface some kind of jump after opening, which is not pleasant.

Thanks for help.

UITableView in side views won't scroll to top

Instead when you tap on status bar, the center controller's UITableView will scroll to top. Seems status bar tap responds to center controller not the side controllers, which is not correct when the side bar is opened.

Crash when dismissing modalViewController

Hi,

I've been using your viewController class for few months and it's great!
Just when using UIImagePickerViewController app sometimes crashes. I was debugging this issue by my self and this is what XCode tells me:

When I dismiss UIImagePickerViewController sometimes, not always, I get NSInvalidArgumentException, this one:
-[__NSArrayM insertObject:atIndex:]: object cannot be nil

Since in your code you don't use any arrays I debugged it more deeper using Crittercism crash report system I got this stack when app crashes:

CoreFoundation 0x3394c8bf __exceptionPreprocess + 162

libobjc.A.dylib 0x3196e1e5 objc_exception_throw + 32

CoreFoundation 0x338a120f -[__NSArrayM insertObject:atIndex:] + 186

UIKit 0x36b08903 -[UIViewController _addChildViewController:performHierarchyCheck:] + 302

MyApp 0x0007b355 -[PPRevealSideViewController setRootViewController:replaceToOrigin:] + 748

MyApp 0x0007b8c5 -[PPRevealSideViewController setRootViewController:] + 28

MyApp 0x0007843d -[PPRevealSideViewController viewDidLoad] + 160

UIKit 0x36b037ff -[UIViewController view] + 166

UIKit 0x36b0dd53 -[UIViewController viewControllerForRotation] + 58

UIKit 0x36b0dcc1 -[UIViewController _visibleView] + 100

UIKit 0x36bad339 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 3220

UIKit 0x36c07461 -[UIViewController _dismissViewControllerWithTransition:from:completion:] + 1732

UIKit 0x36b6aaf1 -[UIViewController dismissViewControllerWithTransition:completion:] + 756

UIKit 0x36b6aaf1 -[UIViewController dismissViewControllerWithTransition:completion:] + 756

MyApp 0x000bfe89 __80-[YDAddPlaceViewController imagePickerController:didFinishPickingMediaWithInfo:]_block_invoke_0 + 104

libdispatch.dylib 0x361bdd55 _dispatch_call_block_and_release + 12

libdispatch.dylib 0x361c8e8d _dispatch_main_queue_callback_4CF$VARIANT$up + 196

CoreFoundation 0x3391f2dd __CFRunLoopRun + 1268

CoreFoundation 0x338a24dd CFRunLoopRunSpecific + 300

CoreFoundation 0x338a23a5 CFRunLoopRunInMode + 104

GraphicsServices 0x31cf7fcd GSEventRunModal + 156

UIKit 0x36af8743 UIApplicationMain + 1090

MyApp 0x000772e1 main + 108

MyApp 0x00076008 start + 40

As you can see this method:

  • (void) setRootViewController:(UIViewController *)controller replaceToOrigin:(BOOL)replace;

    gets called with nil controller pointer.

disable the main view when the side view is showing

this might be something simple, and i might not be thinking of it the right way..

when a side has been pushed, i want to stop the user from being able to press any controls on the main view..
of course disabling the whole view is not smart, as in the things like the button that opens/closes the pushed side view, or the title nav bar etc

but some way of if the user taps the main view that it just closes the side view and re-activates the main view

sort of like how the facebook app you can still see the [Like Comment ] bar, but that bar doesnt do anything when the side view is open except for closing the side use.. it is only active when the side view is not there

do i need to create some type of cover.. uiview or uiimageview and make it fill the main view when the side is activated so that none of the controls on the view can be used?? or is there a simple disable controls??

Oz

YouTube-like dragging

The new YouTube iPhone app (from the App Store, not the built-in one), has the functionality of allowing the user to drag to the side-view by dragging from the centre content left edge only, perhaps the leftmost 50 pixels.

Is tit possible to adapt the app to do this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.