Class

PHProjectTypeDescription

An extensible enumerator for PHProjectType that's presented to users in the project picker.

Declaration

class PHProjectTypeDescription : NSObject

Overview

This object represents one project type choice presented in the project picker when a user is creating a project through project extensions. The PHProjectTypeDescriptionDataSource object returns this descriptor from typeDescriptionDataSource(for:invalidator:).

Topics

Creating a Project Type Description

init(projectType: PHProjectType, title: String, description: String?, image: NSImage?, subtypeDescriptions: [PHProjectTypeDescription])

A designated initializer for project type descriptions with the full subtype hierarchy specified up front and a standard string for description text.

init(projectType: PHProjectType, title: String, attributedDescription: NSAttributedString?, image: NSImage?, subtypeDescriptions: [PHProjectTypeDescription])

A designated initializer for project type descriptions with the full subtype hierarchy specified up front and an attributed string for description text.

init(projectType: PHProjectType, title: String, description: String?, image: NSImage?, canProvideSubtypes: Bool)

A designated initializer for project type descriptions with lazily fetched subtypes and a standard description string.

init(projectType: PHProjectType, title: String, attributedDescription: NSAttributedString?, image: NSImage?, canProvideSubtypes: Bool)

A designated initializer for project type descriptions with lazily fetched subtypes and an attributed description string.

Describing a Project Type

var projectType: PHProjectType

An identifier for the project type.

var localizedTitle: String

The localized title of the project type as shown to the user.

var localizedDescription: String?

The localized description of the project type as shown to the user.

var localizedAttributedDescription: NSAttributedString?

The localized attributed description of the project type as shown to the user.

var image: NSImage?

An optional image associated with the project type in the picker.

var subtypeDescriptions: [PHProjectTypeDescription]

An array of type descriptions used for subtype descriptions.

var canProvideSubtypes: Bool

A Boolean variable indicating whether subtypes can be fetched from the data source.

Relationships

Inherits From

See Also

Determining Project Type

var projectType: PHProjectType

The project type that the user selected from the project extension options.

struct PHProjectType

The type descriptor of a project extension.

var creationSource: PHProjectInfo.CreationSource

The source from which the project was created.

var sections: [PHProjectSection]

An array of project sections, each containing one or more section content objects.

protocol PHProjectTypeDescriptionDataSource

A protocol that you use to provide the project with type description data.

protocol PHProjectTypeDescriptionInvalidator

A protocol that you use to tell the project when and how to invalidate type and footer text.

enum PHProjectInfo.CreationSource

Defines the source of a project extension.