NSOperation needs -isComplete or similar method
| Originator: | kykimnyc | ||
| Number: | rdar://17363936 | Date Originated: | 2014-06-18 |
| Status: | Open | Resolved: | No |
| Product: | iOS SDK | Product Version: | 7.1.1 |
| Classification: | Enhancement | Reproducible: | YES |
Summary: An NSOperation can return YES for both -isCancelled and -isFinished. It seems counter-intuitive that an NSOperation can be both cancelled and finished. However, since finished does not imply completed, I suggest that an -isCompleted method be added to NSOperation. “Alice finished running a marathon after 3 miles, she didn’t complete it.” Steps to Reproduce: N/A Expected Results: N/A Actual Results: N/A Version: iOS 7.1.1 Notes: Configuration: iPhone 4s Attachments:
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!
There is one.
The API on NSOperation is called isFinished. You can see if the api was complete by looking at isCancelled. Ie, isCancelled == NO and isFinished == YES then the operation completed successfully.