NSTextAttachment cannot be tested for equality
| Originator: | steve_w101 | ||
| Number: | rdar://27053531 | Date Originated: | 28-Jun-2016 01:02 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | Xcode 7.3.1 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: The isEqual: method (or == operator in Swift) always returns NO or false. Steps to Reproduce: Create a playground that contains an image resource named “image” and enter the following code: let image = UIImage(named: "image") let attachment1 = NSTextAttachment() let attachment2 = NSTextAttachment() attachment1.image = image attachment2.image = image let equal = attachment1.isEqual(attachment2) Expected Results: The “equal” constant should be true. Actual Results: The “equal” constant is false. Version: Xcode 7.3.1 Notes: This also occurs in Xcode 8.0 / iOS 10 beta 1 Configuration: iPhone 6s Plus Simulator (iOS 9.3), Swift Playground
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!