ra1028 / Carbon

🚴 A declarative library for building component-based user interfaces in UITableView and UICollectionView.

Home Page:https://ra1028.github.io/Carbon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What's the difference between these two methods?

bofeizhu opened this issue · comments

Checklist

What's the difference between these two methods?

/// Returns a new instance of `Content`.
///
/// - Returns: A new `Content` instance.
func renderContent() -> Content

/// Render properties into the content.
///
/// - Parameter:
///   - content: An instance of `Content` laid out on the element of list UI.
func render(in content: Content)

@bofeizhu

Sorry for my late reply.

As described in the API doc, it makes an instance by the renderContent() method for the first time, and sets the appearance for the instance by the render(in content: Content) method, such as color and text.