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

Ios Thumbnail Graphic Problem #143

Closed
Soapfedan opened this issue Oct 24, 2018 · 15 comments
Closed

Ios Thumbnail Graphic Problem #143

Soapfedan opened this issue Oct 24, 2018 · 15 comments

Comments

@Soapfedan
Copy link

Soapfedan commented Oct 24, 2018

I have an Ionic project that uses this plugin. The plugin on Android has no problem.

But now I'm using it on Ios and I have a problem. When I select an image inside the album, the following behavior happens:

image

Now if I deselect that image and select another one, (without leaving the page), it happens that the thumbnails lose their desired size and assume their natural size:

image

My Ionic Info

cli packages: (my_node_path\npm\node_modules)

@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
local packages:

@ionic/app-scripts : 3.1.9
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2
System:

Node : v9.9.0
npm : 5.6.0
OS : Windows 10

Someone can help me?

@matheustavaresdev
Copy link

Had the same issues. No idea of what to do... Thinking of moving out of ionic though...

@jmarbutt
Copy link

jmarbutt commented Jan 1, 2019

I am having the same issue, have you found any solution?

@Soapfedan
Copy link
Author

Yeah, now i use the HTML5 File API, i think that this native plugin is not ok for iOS.

I hope you find a solution for this trouble.

@Jetro223
Copy link

Jetro223 commented Jan 3, 2019

Same problem here - the behaviour appeared with iOS12.

@jayinai
Copy link

jayinai commented Jan 4, 2019

same here

@abhayjaniit
Copy link

Same Here ..

@ktt9117
Copy link

ktt9117 commented Feb 13, 2019

same here
It happens when I select some image and then unselect it and then select it again.

@ktt9117
Copy link

ktt9117 commented Feb 13, 2019

same here
It happens when I select some image and then unselect it and then select it again.

I found out that things happen when this code is executed.

GMImagePickerController.m


-(void)updateToolbar {

    UINavigationController *nav = (UINavigationController *)self.childViewControllers[0];

    for (UIViewController *viewController in nav.viewControllers) {

        [[viewController.toolbarItems objectAtIndex:1] setTitle:[self toolbarTitle]];

        [viewController.navigationController setToolbarHidden:(self.selectedAssets.count == 0) animated:YES];

    }

}

But I do not know how to fix it. In my case, I annotated them.

@quangpdt
Copy link

Thanks @ktt9117 for your hint. Cause we're all not iOS devs originally, so I don't have enough knowledge to fix this issue. What I think I can do is waiting for the fix (May never happen) or just disable the toolbar for displaying number of Selected image. Just need to switch value of _displaySelectionInfoToolbar from YES to NO.

And there's one more thing that I found out, this issue only happens on iOS 12, iOS 11 still works perfectly

@eeenbnb
Copy link

eeenbnb commented Apr 3, 2019

Thumbnail bug fix.

GMAlbumsViewCell.m edit this line.

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    //[super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

and, this add.

- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
    if( highlighted ) {
        [self setBackgroundColor:[UIColor lightGrayColor]];
    } else {
        [self setBackgroundColor:[UIColor whiteColor]];
    }
}

selected Graphic bug fix.

GMGridViewCell.m

- (id)initWithFrame:(CGRect)frame
{
    ...
        // The image view
        ....
        //_imageView.translatesAutoresizingMaskIntoConstraints = NO;
        //_imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
        ...
}

this line comment out.

@shubhambaghel34
Copy link

I have gone through the code also tried controller changes still I am facing the same issue over ios 12.3

MayankLogiciel added a commit to MayankLogiciel/ImagePicker that referenced this issue Apr 25, 2019
@MayankLogiciel
Copy link

I am able to fix both issues

  1. Thumbnail bug fix : using suggested code by @eeenbnb in above comment
  2. Ios Album Selection Graphic Bug # 142 by using code changes from this commit
    guillermomuntaner/GMImagePicker@1a309e4

Thanks @eeenbnb & @guillermomuntaner

You can use code from below branch
https://github.com/MayankLogiciel/ImagePicker/commits/jp_2.3.2

But this plugin still suffers the one more issue, where selection of images sometimes takes too long.

@shubhambaghel34
Copy link

shubhambaghel34 commented Apr 29, 2019

@MayankLogiciel
Tell me whole process how to edit plugin files like Gridviewcell.m and others and after that what we need to do.
I have done changes in my plugin folder for Telerik plugin in Gridviewcell and Gridview controller files still I'm facing the same issue trying issue since last week.
Cordova plugin version of Telerikplugin is 2.3.2.
ionic en

@mayank-aika
Copy link

@shubhambaghel34 - I believe after making code changes to the files, you have to run cordova prepare command, so these changes get reflected in Platform plugin folder as well.

Other Solutions:

Either you can simply install and use the the forked version from here
https://github.com/MayankLogiciel/ImagePicker#jp_2.3.2

OR you first need to fork this plugin yourself, then change files code, commit. Then simply install plugin from your own repo.

anujraghuvanshi added a commit that referenced this issue Apr 30, 2019
@anujraghuvanshi
Copy link

This Issue has been fixed in v2.3.3, Hence closing the issue. Thanks for using the plugin.

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