Hi,
Can anyone give some hints on how to completely implement the FUISidebar? I've looked at the reference guide found here, but it is only partial (gives no clues on how to show/hide it and if it needs to be part of a FUIFormTableViewcontroller or something else?
I've tried to initialize it and add it with view.addSubview(sidebar) inside ViewDidLoad() but nothing happened.
Both in Xcode docu and in the link above, this code is mentioned
let sidebar = FUISideBar(data: items,
children: \.children,
rowContent: { item in
FUISideBarListItem(icon: item.icon, title: item.title, subtitle: item.subtitle, accessoryIcon: item.status)
},
selectedItem: items.first)<br>
but FUISideBarListItem takes not arguments in its init()
Xcode compiler:<br>Argument passed to call that takes no arguments<br>Remove '(icon: item.icon, title: item.title, subtitle: item.subtitle, accessoryIcon: item.status)'
Request clarification before answering.
Please note that the side bar needs to be added to the root nav view controller.
UIApplication.shared.windows.first?.rootViewController
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI that we created a functional side bar example and please kindly find the implementation in the source code:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We will update the header doc aligned with latest implementation. Stay tuned and I will post when a new version is available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Colleague,
Thanks for the question and happy to help.
You are right, FUISideBarListItem takes no arguments in initialization since they can be update on-demand after initialization. Please kindly refer to the following example:
FUISideBar(footer: isPad ? footer : nil, data: items, children: \.children,
rowContent: { item in
let v = FUISideBarListItem()
v.title.text = item.title
v.subtitle.text = item.subtitle
v.leadingImageView.image = item.icon?.withRenderingMode(.alwaysTemplate)
v.trailingImageView.image = item.status?.withRenderingMode(.alwaysTemplate)
return v},
selectedItem: initialSelection)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.