File tree Expand file tree Collapse file tree 4 files changed +34
-10
lines changed
Assets.xcassets/smallDog.imageset Expand file tree Collapse file tree 4 files changed +34
-10
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "images" : [
3+ {
4+ "filename" : " 237-30x40.jpg" ,
5+ "idiom" : " universal"
6+ }
7+ ],
8+ "info" : {
9+ "author" : " xcode" ,
10+ "version" : 1
11+ }
12+ }
Original file line number Diff line number Diff line change @@ -13,18 +13,23 @@ struct ImageProvidersView: View {
1313 """
1414
1515 private let otherContent = """
16- You can use the built-in `AssetImageProvider` to load images from image assets.
16+ You can use the built-in `AssetImageProvider` and `AssetInlineImageProvider`
17+ to load images from image assets.
1718
1819 ```swift
1920 Markdown {
2021 "  "
22+ " A  within a line of text. "
2123 " ― Photo by André Spieker "
2224 }
2325 .markdownImageProvider(.asset)
26+ .markdownInlineImageProvider(.asset)
2427 ```
2528
2629 
2730
31+ A  within a line of text.
32+
2833 ― Photo by André Spieker
2934 """
3035
@@ -36,6 +41,7 @@ struct ImageProvidersView: View {
3641 Section ( " Image Assets " ) {
3742 Markdown ( self . otherContent)
3843 . markdownImageProvider ( . asset)
44+ . markdownInlineImageProvider ( . asset)
3945 }
4046 }
4147 }
Original file line number Diff line number Diff line change @@ -15,25 +15,31 @@ struct ImagesView: View {
1515 ― Photo by Jennifer Trovato
1616 """
1717
18- private let assetContent = """
19- You can configure a `Markdown` view to load images from the asset catalog.
18+ private let inlineImageContent = """
19+ You can also insert images in a line of text, such as
20+  or
21+ .
2022
21- ```swift
22- Markdown {
23- "  "
24- }
25- .markdownImageProvider(.asset)
23+ ```
24+ You can also insert images in a line of text, such as
25+  or
26+ .
2627 ```
2728
28- 
29+ Note that MarkdownUI does not apply any styling to inline
30+ images.
2931
30- ― Photo by André Spieker
32+ ― Photos by André Spieker and Thomas Lefebvre
3133 """
3234
3335 var body : some View {
3436 DemoView {
3537 Markdown ( self . content)
3638
39+ Section ( " Inline images " ) {
40+ Markdown ( self . inlineImageContent)
41+ }
42+
3743 Section ( " Customization Example " ) {
3844 Markdown ( self . content)
3945 }
You can’t perform that action at this time.
0 commit comments