<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/using-imported-protocol-qualified-classes-in-swift",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Using Imported Protocol-Qualified Classes in Swift"
}
-->

# Using Imported Protocol-Qualified Classes in Swift

Learn how imported Objective-C protocol-qualified classes and metaclasses are represented.

## Overview

Objective-C classes qualified by one or more protocols, like the one in the example
below, are imported by Swift as protocol composition types. The following Objective-C
property refers to a view controller that also acts a data source and delegate:

```occ
@property UIViewController<UITableViewDataSource, UITableViewDelegate> * myController;
```

When you import it, here’s the Swift interface:

```swift
var myController: UIViewController & UITableViewDataSource & UITableViewDelegate
```

An Objective-C protocol-qualified metaclass is imported by Swift as a protocol metatype,
which is a type that represents the type of a protocol itself. For example, given
the following Objective-C method that performs an operation on the specified class:

```occ
- (void)doSomethingForClass:(Class<NSCoding>)codingClass;
```

When you import it, here’s the Swift interface:

```swift
func doSomething(for codingClass: NSCoding.Type)
```

---

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)