roycornelissen / GMImagePicker.Xamarin

Port of the original GMImagePicker component to Xamarin.iOS
MIT License
71 stars 39 forks source link

Checkmark image is not visible on selected items #65

Closed sergbuk closed 4 years ago

sergbuk commented 5 years ago

Checkmark images are not visible on selected items. I just run the GMPhotoPicker.Xamarin project without any changes. Please see the screenshot for details.

Sample

sergbuk commented 5 years ago

I found that following change (adding _selectedButton to _coverView) fixes this problem.

//GMGridViewCell.cs public void Initialize () { ... _selectedButton.SetImage (null, UIControlState.Normal); _selectedButton.SetImage (UIImage.FromFile ("GMSelected"), UIControlState.Selected); _coverView.AddSubview(_selectedButton); ...

roycornelissen commented 5 years ago

Hi, cool, would you like to make a PR for it?

sergbuk commented 4 years ago

Hi Roy, could you please check the PR?

divyesh008 commented 4 years ago

@sergbuk I'm facing same issue, have you got any solution?

divyesh008 commented 4 years ago

I found that following change (adding _selectedButton to _coverView) fixes this problem.

//GMGridViewCell.cs public void Initialize () { ... _selectedButton.SetImage (null, UIControlState.Normal); _selectedButton.SetImage (UIImage.FromFile ("GMSelected"), UIControlState.Selected); _coverView.AddSubview(_selectedButton); ...

exactly where this change needs to be add ?

sergbuk commented 4 years ago

@divyesh008 add following line: _coverView.AddSubview(_selectedButton); after this one: _selectedButton.SetImage (UIImage.FromFile ("GMSelected"), UIControlState.Selected);

roycornelissen commented 4 years ago

The PR for this has been merged. Closing the issue.

martin-steglich commented 3 years ago

Hi, I know this issue is closed since Sep 23 but I'm facing with it, image selected checkmark isn't visible.

I'm creating the picker this way: ` var picker = new GMImagePickerController { Title = "Select Photo", CustomDoneButtonTitle = "Finished", CustomCancelButtonTitle = "Cancel", ColsInPortrait = 4, ColsInLandscape = 7,

            DisplaySelectionInfoToolbar = true,
            AllowsMultipleSelection = true,
            ShowCameraButton = true,
            AutoSelectCameraImages = true,

            ModalPresentationStyle = UIModalPresentationStyle.FullScreen,
            MediaTypes = new[] { PHAssetMediaType.Image },
           `

@roycornelissen @sergbuk, Can you help me?

Thank you!

PredatH0r commented 3 years ago

This is still an issue. I'm using NuGet "GMImagePicker.Xamarin" version 2.5.1 in a VS2019 (16.11.3) Xamarin.iOS (14.20.0.25) project running on an iPhone 8 iOS 13.7 Simulator on a Mac Mini M1 with Xcode 12.5.

Selected images receive a blue-ish overlay, but no check box.

FWIW: I can't use any newer Xcode (e.g. 13) or simulator (e.g. iOS 14/15) because of various incompatibilities with Xamarin hot reload and broken ImagePicker running in a simulator on M1 silicon)