---
title: "MACaptionAppearanceExecuteBlockForProfileID(_:_:)"
framework: mediaaccessibility
role: symbol
role_heading: Function
path: "mediaaccessibility/macaptionappearanceexecuteblockforprofileid(_:_:)"
---

# MACaptionAppearanceExecuteBlockForProfileID(_:_:)

## Declaration

```swift
func MACaptionAppearanceExecuteBlockForProfileID(_ profileID: CFString, _ aBlock: @escaping () -> Void)
```

## Parameters

- `profileID`: The profileID which will appear active when executing the block
- `aBlock`: The block of code to execute

## Discussion

Discussion Executes a block of code as if the provided profileID was active. This is used in cases such as a need to get the fonts and colors of a profileID without changing the currently selected profileID.

## See Also

### Profile settings

- [MACaptionAppearanceCopyProfileIDs()](mediaaccessibility/macaptionappearancecopyprofileids().md)
- [MACaptionAppearanceSetActiveProfileID(_:)](mediaaccessibility/macaptionappearancesetactiveprofileid(_:).md)
- [MACaptionAppearanceCopyActiveProfileID()](mediaaccessibility/macaptionappearancecopyactiveprofileid().md)
- [MACaptionAppearanceCopyProfileName(_:)](mediaaccessibility/macaptionappearancecopyprofilename(_:).md)
