<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFBitVectorFlipBitAtIndex(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFBitVectorFlipBitAtIndex"
  },
  "title" : "CFBitVectorFlipBitAtIndex(_:_:)"
}
-->

# CFBitVectorFlipBitAtIndex(_:_:)

Flips a bit value in a bit vector.

```
func CFBitVectorFlipBitAtIndex(_ bv: CFMutableBitVector!, _ idx: CFIndex)
```

## Parameters

`bv`

The bit vector to modify.

`idx`

The index of the bit value to flip. The index must be in the range `0…N-1`, where `N` is the count of the vector.

## See Also

[`CFBitVectorGetCount(_:)`](/documentation/CoreFoundation/CFBitVectorGetCount(_:))

Returns the number of bit values in a bit vector.



---

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)