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

Custom images NSRangeException when item selected #8

Open
Kml55 opened this issue Oct 10, 2021 · 0 comments
Open

Custom images NSRangeException when item selected #8

Kml55 opened this issue Oct 10, 2021 · 0 comments

Comments

@Kml55
Copy link

Kml55 commented Oct 10, 2021

Hi,

I want to use this library for custom image assets. It shows the assets but when an item is selected at index except zero, it gives exception like below.

Terminating app due to uncaught exception 'NSRangeException', reason: '0x600002899280: index (3) beyond bounds (1)'
terminating with uncaught exception of type NSException

I use library like below

private let images: [UIImage] = [ UIImage(named: "asset_x")!, UIImage(named: "y")!,UIImage(named: "close")!,UIImage(named: "assetname")!]

self.assetsPickerController = PickerViewController()
        self.assetsPickerController.delegate = self
        self.assetsPickerController.allowMultipleSelection = false
        self.assetsPickerController.images = images 

Is there a solution for this error?

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