The component for adding a photographer credit.
Technology
- Apple News Format 1.7+
Properties
role
string
Always photographer
for this component.
text
string
The text to display in the article, including any formatting tags depending on the format
property.
You can also use a subset of HTML tags or Markdown syntax by setting format
to html
or markdown
, respectively. See Using HTML with Apple News Format. Alternatively, you can style ranges of text individually using the InlineTextStyle object.
additions
[Addition]
An array of all the additions that should be applied to ranges of the component's text.
Additions are ignored when format
is set to html
or markdown
.
anchor
An object that defines vertical alignment with another component.
animation
*
An object that defines an animation to be applied to the component.
The none
value is used for conditional design elements. Adding it here has no effect.
behavior
*
conditional
*
An instance or array of text components that can be applied conditionally, and the conditions that cause them to be applied.
format
string
The formatting or markup method applied to the text.
If format
is set to html
or markdown
, neither Additions
nor Inline
are supported.
hidden
boolean
A Boolean value that determines whether the component is hidden.
identifier
string
An optional unique identifier for this component. If used, this identifier
must be unique across the entire document. You will need an identifier
for your component if you want to anchor other components to it.
inline Text Styles
*
An array of Inline
objects that you can use to apply different text styles to ranges of text. For each InlineTextStyle, you should supply a range
, range
, and either a Text
object or the identifier of a TextStyle that is defined at the top level of the document.
Inline text styles are ignored when format
is set to markdown
or html
.
The none
value is used for conditional design elements. Adding it here has no effect.
layout
*
An inline Component
object that contains layout information, or a string reference to a Component
object that is defined at the top level of the document.
If layout
is not defined, size and position are based on various factors, such as the device type, the length of the content, and the role
of this component.
style
*
An inline Component
object that defines the appearance of this component, or a string reference to a Component
object that is defined at the top level of the document.
The none
value is used for conditional design elements. Adding it here has no effect.
text Style
*
An inline Component
object that contains styling information, or a string reference to a Component
object that is defined at the top level of the document.
Discussion
Use the Photographer
component to name the contributor whose photographs appear in the article. An Illustrator component is also available.
Example
{
"components": [
{
"role": "photographer",
"layout": {
"columnStart": 0,
"columnSpan": 7,
"margin": {
"bottom": 15
}
},
"text": "Photos: URNA SEMPER"
}
]
}