The default implementation of this method raises an exception.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The object for which a textual representation is returned.
NSString object that textually represents
object for display. Returns
object is not of the correct class.
When implementing a subclass, return the
NSString object that textually represents the cell’s object for display and—if
editing is unimplemented—for editing. First test the passed-in object to see if it’s of the correct class. If it isn’t, return
nil; but if it is of the right class, return a properly formatted and, if necessary, localized string. (See the specification of the
NSString class for formatting and localizing details.)
The following implementation (which is paired with the
get example above) prefixes a two-digit float representation with a dollar sign: