---
title: useStoredAccessor()
framework: objectivec
role: symbol
role_heading: Type Method
path: objectivec/nsobject-swift.class/usestoredaccessor()
---

# useStoredAccessor()

Returns true if the stored value methods storedValue(forKey:) and takeStoredValue(_:forKey:) should use private accessor methods in preference to public accessors.

## Declaration

```swift
class func useStoredAccessor() -> Bool
```

## Discussion

Discussion Returning NO causes the stored value methods to use the same accessor method or instance variable search order as the corresponding basic key-value coding methods (value(forKey:) and takeValue(_:forKey:)). The default implementation returns YES. Applications should use the valueForKey: and setValue:forKey: methods instead of storedValueForKey: and takeStoredValue:forKey:.

## See Also

### Deprecated Class Methods

- [defaultPlaceholder(for:with:)](objectivec/nsobject-swift.class/defaultplaceholder(for:with:).md)
- [setDefaultPlaceholder(_:for:with:)](objectivec/nsobject-swift.class/setdefaultplaceholder(_:for:with:).md)
