Skip to content

Commit 7641ec4

Browse files
author
Jesse MacFadyen
committed
added command to route the url to the ChildBrowserViewController, and added readme for a brief explaination of use.
1 parent 3b36af9 commit 7641ec4

File tree

4 files changed

+395
-45
lines changed

4 files changed

+395
-45
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// PhoneGap ! ChildBrowserCommand
3+
//
4+
//
5+
// Created by Jesse MacFadyen on 10-05-29.
6+
// Copyright 2010 Nitobi. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "PhoneGapCommand.h"
11+
12+
13+
@interface ChildBrowserCommand : PhoneGapCommand {
14+
15+
16+
}
17+
18+
- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
19+
20+
21+
@end
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//
2+
3+
//
4+
//
5+
// Created by Jesse MacFadyen on 10-05-29.
6+
// Copyright 2010 Nitobi. All rights reserved.
7+
//
8+
9+
#import "ChildBrowserCommand.h"
10+
#import "ChildBrowserViewController.h"
11+
12+
13+
@implementation ChildBrowserCommand
14+
15+
- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
16+
{
17+
ChildBrowserViewController* childBrowser = [ [ ChildBrowserViewController alloc ] initWithScale:FALSE ];
18+
[ [ super appViewController ] presentModalViewController:childBrowser animated:YES ];
19+
20+
NSString *url = (NSString*) [arguments objectAtIndex:0];
21+
//stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
22+
[childBrowser loadURL:url ];
23+
[childBrowser release];
24+
}
25+
26+
27+
@end

0 commit comments

Comments
 (0)