<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDeferredMenuElement/usingFocus(identifier:shouldCacheItems:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDeferredMenuElement(cm)elementUsingFocusWithIdentifier:shouldCacheItems:"
  },
  "title" : "usingFocus(identifier:shouldCacheItems:)"
}
-->

# usingFocus(identifier:shouldCacheItems:)

```
class func usingFocus(identifier: UIDeferredMenuElement.Identifier, shouldCacheItems: Bool) -> Self
```

## Parameters

`identifier`

An identifier for this deferred element that responders can check to determine which elements
to provide.

`shouldCacheItems`

Whether or not the deferred element caches items. Passing in @c YES causes this deferred element to
ask the responder chain for elements only once, when the element is first encountered in a menu.
Passing in @c NO asks the responder chain for elements every time the element is displayed.

## Discussion\abstract Returns a placeholder menu element that is replaced with elements provided from the responder chain.
A loading UI takes the place of the element in the menu until it is fulfilled. The element may be stored
and re-used across menus.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)