Skip to content

Commit

Permalink
Adding the show method for iOS as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
sagrawal31 committed Mar 15, 2019
1 parent 94aeaa1 commit 10ccdea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/ios/OverAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ - (void) open:(CDVInvokedUrlCommand *)command

}

- (void)show:(CDVInvokedUrlCommand *)command {
NSArray* arguments = [command arguments];
NSUInteger argc = [arguments count];

if (argc < 2) {
return;
}
[self fadeToAlpha:[[arguments objectAtIndex:0] floatValue] duration:[[arguments objectAtIndex:1] floatValue]];
}

- (void)hide:(CDVInvokedUrlCommand *)command {
NSArray* arguments = [command arguments];
NSUInteger argc = [arguments count];
Expand Down
4 changes: 2 additions & 2 deletions www/ios/OverAppBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ OverAppBrowser.prototype = {
close: function () {
exec(null, null, "OverAppBrowser", "close", []);
},
show: function () {
exec(null, null, "OverAppBrowser", "show", []);
show: function (toAlpha, duration) {
exec(null, null, "OverAppBrowser", "show", [toAlpha, duration]);
},
hide: function (toAlpha, duration) {
exec(null, null, "OverAppBrowser", "hide", [toAlpha, duration]);
Expand Down

0 comments on commit 10ccdea

Please sign in to comment.