---
title: "CTParagraphStyleCreate(_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctparagraphstylecreate(_:_:)"
---

# CTParagraphStyleCreate(_:_:)

Creates an immutable paragraph style.

## Declaration

```swift
func CTParagraphStyleCreate(_ settings: UnsafePointer<CTParagraphStyleSetting>?, _ settingCount: Int) -> CTParagraphStyle
```

## Parameters

- `settings`: The settings with which to preload the paragraph style. If you want to specify the default set of settings, set this parameter to NULL.
- `settingCount`: The number of settings that you have specified in the settings parameter. This must be greater than or equal to 0.

## Return Value

Return Value A valid reference to an immutable CTParagraphStyle object, If the paragraph style creation was successful; otherwise, NULL.

## Discussion

Discussion Using this function is the easiest and most efficient way to create a paragraph style. Paragraph styles should be kept immutable for totally lock-free operation. If an invalid paragraph style setting specifier is passed into the settings parameter, nothing bad will happen, but you will be unable to query for this value. The reason is to allow backward compatibility with style setting specifiers that may be introduced in future versions.

## See Also

### Creating Paragraph Styles

- [CTParagraphStyleCreateCopy(_:)](coretext/ctparagraphstylecreatecopy(_:).md)
