Skip to content

Commit 6f5d450

Browse files
authored
Update README.md
1 parent c0d9718 commit 6f5d450

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ let view: MessageView = try! SwiftMessages.viewFromNib(named: "MyCustomNib")
262262
let view: MyCustomView = try! SwiftMessages.viewFromNib()
263263
````
264264

265-
#### MessageView
265+
#### MessageView Class
266266

267267

268268
[`MessageView`](./SwiftMessages/MessageView.swift) is a light-weight view that all of the bundled designs use. It primarily consists of the following optional `@IBOutlet` properties:
@@ -319,15 +319,15 @@ The suggested method for starting with `MessageView` as a base and __adding new
319319
1. (recommended) override the implementation of `AccessibleMessage` as needed to incorporate new elements into Voice Over.
320320
1. Use one of the nib-loading methods above to load the view.
321321

322-
#### BaseView
322+
#### BaseView Class
323323

324324
[`BaseView`](./SwiftMessages/BaseView.swift) is the superclass of `MessageView` and provides numerous options that aren't specific to the "title + body + icon + button" design of `MessageView`. Custom views that are significantly different from `MessageView`, such as a progress indicator, should subclass `BaseView`.
325325

326-
#### CornerRoundingView
326+
#### CornerRoundingView Class
327327

328328
[`CornerRoundingView`](./SwiftMessages/CornerRoundingView.swift) is a custom view that messages can use for rounding all or a subset of corners with squircles (the smoother method of rounding corners that you see on app icons). The nib files that feature rounded corners have `backgroundView` assigned to a `CornerRoundingView`. It provides a `roundsLeadingCorners` option to dynamically round only the leading corners of the view when presented from top or bottom (a feature used for the tab-style layouts).
329329

330-
#### Animator
330+
#### Animator Protocol
331331

332332
[`Animator`](./SwiftMessages/Animator.swift) is the protocol that SwiftMessages uses for presentation and dismissal animations. Custom animations can be done through the `SwiftMessages.PresentationStyle.custom(animator:)`. Some related components:
333333
* [`TopBottomAnimation`](./SwiftMessages/TopBottomAnimation.swift) is a sliding implementation of `Animator` used internally by `.top` and `.bottom` presentation styles. It provides some customization options.
@@ -336,23 +336,23 @@ The suggested method for starting with `MessageView` as a base and __adding new
336336

337337
High-quality PRs for cool `Animator` implementations are welcome!
338338

339-
#### MarginAdjustable
339+
#### MarginAdjustable Protocol
340340

341341
[`MarginAdjustable`](./SwiftMessages/MarginAdjustable.swift) is a protocol adopted by `BaseView`. If the view being presented adopts `MarginAdjustable`, SwiftMessages takes ownership of the view's layout margins to ensure ideal spacing across the full range of presentation contexts.
342342

343-
#### BackgroundViewable
343+
#### BackgroundViewable Protocol
344344

345345
[`BackgroundViewable`](./SwiftMessages/BackgroundViewable.swift) is a protocol adopted by `BaseView` and requires that a view provide a single `backgroundView` property. `BaseView` initializes `backgroundView = self`, which you can freely re-assign to any subview.
346346

347347
If the view being presented adopts `BackgroundViewable`, SwiftMessages will ignore touches outside of `backgroundView`. This is important because message views always span the full width of the device. Card and tab-style layouts appear inset from the edges of the device because the message view's background is transparent and `backgroundView` is assigned to a subview constrained to the layout margins. In these layouts, touches in the transparent margins should be ignored.
348348

349-
#### Identifiable
349+
#### Identifiable Protocol
350350

351351
[`Identifiable`](./SwiftMessages/Identifiable.swift) is a protocol adopted by `MessageView` and requires that a view provide a single `id` property, which SwiftMessages uses for message deduplication.
352352

353353
`MessageView` computes the `id` based on the message content, but `id` can also be set explicitly as needed.
354354

355-
#### AccessibleMessage
355+
#### AccessibleMessage Protocol
356356

357357
[`AccessibleMessage`](./SwiftMessages/AccessibleMessage.swift) is a protocol adopted by `MessageView`. If the view being presented adopts `AccessibleMessage`, SwiftMessages provides improved Voice Over.
358358

0 commit comments

Comments
 (0)