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

If select tag and pickker image #124

Closed
SurachetY opened this issue Sep 11, 2019 · 6 comments
Closed

If select tag and pickker image #124

SurachetY opened this issue Sep 11, 2019 · 6 comments

Comments

@SurachetY
Copy link

What did you do?

When i choose image from library wstagfield is cach.

open var selected: Bool = false {
        didSet {
            if selected && !isFirstResponder {
                _ = becomeFirstResponder()
            } else
            if !selected && isFirstResponder {
                _ = resignFirstResponder()
            }
            updateContent(animated: true)
        }
    }

What did you expect to happen?

don't cach when pickker image
**If i want select tag is delete tag. Did you know

What happened instead?

error cach

@ricardopereira
Copy link
Member

@Skyzwing Thank you for opening a issue. Could you send me a code example or a project where I can reproduce your issue?

@SurachetY
Copy link
Author

When I selected tag and i choose image from library

button trigger change image

@IBAction func chooseImage(_ sender: UIButton) {
        imagePickkerController.sourceType = .photoLibrary
        imagePickkerController.allowsEditing = true
        self.present(imagePickkerController, animated: true, completion: nil)
        imagePicker = true
    }

this method call pickker image from library

    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
        if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage{
            imageNovel.image = image
        }
        self.dismiss(animated: true, completion: nil)
    }
    func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
        self.dismiss(animated: true, completion: nil)
    }
}

@ricardopereira
Copy link
Member

@Skyzwing So a crash will happen if you open the UIImagePickerController when you select a tag? Is that it?

@SurachetY
Copy link
Author

yes

@ricardopereira
Copy link
Member

Sorry, I couldn't reproduce this issue.

BTW, we did a new release. Please try it out: https://github.com/whitesmith/WSTagsField/releases/tag/5.1.0

Maybe it fixes your issue. If not then please reopen the issue.
Thanks!

@SurachetY
Copy link
Author

SurachetY commented Sep 19, 2019 via email

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

2 participants