Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imagepicker do not take 100% height #322

Open
lyranis opened this issue Mar 18, 2020 · 1 comment
Open

Imagepicker do not take 100% height #322

lyranis opened this issue Mar 18, 2020 · 1 comment

Comments

@lyranis
Copy link

lyranis commented Mar 18, 2020

Make sure to check the demo app(s) for sample usage

Check

Make sure to check the existing issues in this repository

Check

Problem

The image picker, once opened, do not take 100% height of screen. There is a gap on the top of screen. Is this normal?

Which platform(s) does your issue occur on?

  • iOS

Please, provide the following version numbers that your issue occurs with:

  • CLI: (run tns --version to fetch it)
    6.4.1
    package.json:
{
  "nativescript": {
    "id": "xxx",
    "tns-android": {
      "version": "6.4.1"
    },
    "tns-ios": {
      "version": "6.4.0"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "@nativescript/theme": "~2.3.0",
    "nativescript-angular": "~8.21.0",
    "nativescript-imagepicker": "7.1.0",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.4.0",
    "tns-core-modules": "~6.4.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~8.2.0",
    "@ngtools/webpack": "~8.2.0",
    "nativescript-dev-webpack": "~1.5.0",
    "typescript": "~3.5.3"
  },
  "gitHead": "xxx",
  "readme": "NativeScript Application"
}

Please, tell us how to recreate the issue in as much detail as possible.

Create a simple app for IOS and open the picker.

Is there any code involved?

home.component.html

<ActionBar  flat="true" class="action-bar" backgroundColor="black"></ActionBar>
<Label dock="top" (tap)='onSelectSingleTap(2)'  text="Tape-me"></Label>

home.component.ts

import { Component, OnInit } from "@angular/core";
import * as imagepicker from "nativescript-imagepicker";


@Component({
    selector: "Home",
    templateUrl: "./home.component.html"
})
export class HomeComponent implements OnInit {

    constructor() {
        // Constructor
    }

    ngOnInit(): void {
        // init
    }


    onSelectSingleTap(imageIndex) {

        const context = imagepicker.create({
            mode: "single"
        });
        this.startSelection(context, imageIndex);
    }


    private startSelection(context, imageIndex) {
        // tslint:disable-next-line:no-this-assignment
        const that = this;

        context
            .authorize()
            .then(() => {
                return context.present();
            })
            .then((selection) => {

                // Do somethink


                // tslint:disable-next-line:only-arrow-functions
            }).catch(function (e) {
                console.log(e);

            });
    }
}

@lyranis
Copy link
Author

lyranis commented Mar 18, 2020

screenshotTopOfScreen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant