Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added command to route the url to the ChildBrowserViewController, and…
… added readme for a brief explaination of use.
  • Loading branch information
Jesse MacFadyen committed May 31, 2010
1 parent 3b36af9 commit 7641ec4
Show file tree
Hide file tree
Showing 4 changed files with 395 additions and 45 deletions.
21 changes: 21 additions & 0 deletions ChildBrowser/iPhone/ChildBrowserCommand.h
@@ -0,0 +1,21 @@
//
// PhoneGap ! ChildBrowserCommand
//
//
// Created by Jesse MacFadyen on 10-05-29.
// Copyright 2010 Nitobi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PhoneGapCommand.h"


@interface ChildBrowserCommand : PhoneGapCommand {


}

- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;


@end
27 changes: 27 additions & 0 deletions ChildBrowser/iPhone/ChildBrowserCommand.m
@@ -0,0 +1,27 @@
//

//
//
// Created by Jesse MacFadyen on 10-05-29.
// Copyright 2010 Nitobi. All rights reserved.
//

#import "ChildBrowserCommand.h"
#import "ChildBrowserViewController.h"


@implementation ChildBrowserCommand

- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
{
ChildBrowserViewController* childBrowser = [ [ ChildBrowserViewController alloc ] initWithScale:FALSE ];
[ [ super appViewController ] presentModalViewController:childBrowser animated:YES ];

NSString *url = (NSString*) [arguments objectAtIndex:0];
//stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[childBrowser loadURL:url ];
[childBrowser release];
}


@end

0 comments on commit 7641ec4

Please sign in to comment.