简体   繁体   中英

Using ReactiveKit, how to bind private array in viewmodel with tableView in viewcontroller?

This function is in my ViewModel, and there is one protocol which defines it as well and my ViewModel conforms to that protocol.

func loadData() -> [Feed]
  {
    return feeds
  }

private let feeds : [Feed] = [Feed(id:1, content: "Content 1 of some User"), Feed(id:2, content: "Some content"), Feed(id:3, content: "Content of some User")]

I have one viewController with tableview. Now in that tableView I want to display all feeds which are private. As per my viewmodel's structure how can I bind it to tableview's datasource using ReactiveKit?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM