---
title: "CFRunLoopContainsObserver(_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfrunloopcontainsobserver(_:_:_:)"
---

# CFRunLoopContainsObserver(_:_:_:)

Returns a Boolean value that indicates whether a run loop mode contains a particular CFRunLoopObserver object.

## Declaration

```swift
func CFRunLoopContainsObserver(_ rl: CFRunLoop!, _ observer: CFRunLoopObserver!, _ mode: CFRunLoopMode!) -> Bool
```

## Parameters

- `rl`: The run loop to examine.
- `observer`: The run loop observer for which to search.
- `mode`: The run loop mode in which to search for observer. Use the constant doc://com.apple.corefoundation/documentation/CoreFoundation/CFRunLoopMode/commonModes to search for observer in the set of objects monitored by all the common modes.

## Return Value

Return Value true if observer is in mode mode of the run loop rl, otherwise false.

## Discussion

Discussion If observer was added to commonModes, this function returns true if mode is either commonModes or any of the modes that has been added to the set of common modes.

## See Also

### Managing Observers

- [CFRunLoopAddObserver(_:_:_:)](corefoundation/cfrunloopaddobserver(_:_:_:).md)
- [CFRunLoopRemoveObserver(_:_:_:)](corefoundation/cfrunloopremoveobserver(_:_:_:).md)
