Skip to content

Commit

Permalink
Add fade method
Browse files Browse the repository at this point in the history
  • Loading branch information
appfeel committed Jun 23, 2015
1 parent 35e3be1 commit f6eb200
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/ios/OverAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ - (void) open:(CDVInvokedUrlCommand *)command

}

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

if (argc < 2) {
return;
}

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:[[arguments objectAtIndex:0] floatValue]];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[self.overWebView setAlpha:[[arguments objectAtIndex:1] floatValue]];
[UIView commitAnimations];
}

- (BOOL)isValidCallbackId:(NSString *)callbackId
{
NSError *err = nil;
Expand Down

0 comments on commit f6eb200

Please sign in to comment.