forked from purplecabbage/phonegap-plugins
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
4 changed files
with
395 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.