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

Actionsheet overlay triggers WSTagsField animation and renders tags in gray #106

Open
wousser opened this issue Oct 27, 2018 · 3 comments
Open

Comments

@wousser
Copy link

wousser commented Oct 27, 2018

Which version of the WSTagsField are you using?

4.0.0

On which platform does the issue happen?

iOS 12

Are you using Carthage?

Carthage, latest

Are you using Cocoapods?

No

Which version of Xcode are you using?

Xcode latest

What did you do?

See title

Add a short snippet of code to show the problem

  • Have a tag field with multiple tags
  • Trigger an action sheet overlay

What did you expect to happen?

Tags field should not do an animation and tags should not change color

What happened instead?

See title, and capture:
oct-27-2018 18-47-53

@ricardopereira
Copy link
Member

@wousser Thank you for opening an issue. Could you share an example project please?

@ricardopereira
Copy link
Member

I tested this and I couldn't reproduce your issue.

dec-13-2018 11-19-57

The code that I used for testing:

     @IBAction func touchAddRandomTags(_ sender: UIButton) {
+        let alertController = UIAlertController(title: "Test", message: "Actionsheet overlay triggers animation and renders tags in gray", preferredStyle: .actionSheet)
+        alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
+        present(alertController, animated: true, completion: nil)
+        return;

I'll close this.
Feel free to reopen the issue but please send me a reproducible sample to debug.
Thanks.

@ibeleliev
Copy link

It is reproducible in the example.
In the extension of the "ViewController" you can add this

        tagsField.onValidateTag = { (_, tags) in
            if !tags.isEmpty {
                let alert = UIAlertController(title: "Test", message: "AlertController overlay renders tags in gray", preferredStyle: .alert)
                alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
                self.present(alert, animated: true, completion: nil)
            }
            return true
        }

From the prints in the debug area you can see that the 'Unselect' is called on each WSTagView after the alert is dismissed.

Unselect <WSTagsField.WSTagView: 0x7ff005f06a80; frame = (0 0.25; 49 24.5); clipsToBounds = YES; tintColor = <UIDynamicSystemColor: 0x600001c768a0; name = systemBlueColor>; gestureRecognizers = <NSArray: 0x6000012e3510>; animations = { backgroundColor=<CABasicAnimation: 0x600001cd5020>; }; layer = <CALayer: 0x600001cc9e00>>
Unselect <WSTagsField.WSTagView: 0x7ff005f2b7a0; frame = (59 0.25; 51.5 24.5); clipsToBounds = YES; tintColor = <UIDynamicSystemColor: 0x600001c768a0; name = systemBlueColor>; gestureRecognizers = <NSArray: 0x6000012ce880>; animations = { backgroundColor=<CABasicAnimation: 0x600001cd53c0>; }; layer = <CALayer: 0x600001c3d5a0>>
Unselect <WSTagsField.WSTagView: 0x7ff005e383f0; frame = (120.5 0.25; 51.5 24.5); clipsToBounds = YES; tintColor = <UIDynamicSystemColor: 0x600001c768a0; name = systemBlueColor>; gestureRecognizers = <NSArray: 0x6000012e56b0>; animations = { backgroundColor=<CABasicAnimation: 0x600001cd2080>; }; layer = <CALayer: 0x600001c23bc0>>

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

3 participants