mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-01-31 03:52:51 +08:00
Merge pull request #299 from Gillardo/master
Fix ios positions when none passed in
This commit is contained in:
commit
11b5db2433
@ -83,10 +83,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
//Opens the file preview
|
||||
CGRect rect;
|
||||
if ([command.arguments count] >= 4
|
||||
&& ![[command.arguments objectAtIndex:3] isEqual: [NSNull null]]) {
|
||||
if ([command.arguments count] >= 4) {
|
||||
NSArray *positionValues = [command.arguments objectAtIndex:3];
|
||||
rect = CGRectMake(0, 0, [[positionValues objectAtIndex:0] floatValue], [[positionValues objectAtIndex:1] floatValue]);
|
||||
|
||||
if (![positionValues isEqual:[NSNull null]] && [positionValues count] >= 2) {
|
||||
rect = CGRectMake(0, 0, [[positionValues objectAtIndex:0] floatValue], [[positionValues objectAtIndex:1] floatValue]);
|
||||
} else {
|
||||
rect = CGRectMake(0, 0, 0, 0);
|
||||
}
|
||||
} else {
|
||||
rect = CGRectMake(0, 0, cont.view.bounds.size.width, cont.view.bounds.size.height);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user