Shoyu alternatives and similar libraries
Based on the "UITableView" category.
Alternatively, view Shoyu alternatives based on common mentions on social networks and blogs.
-
folding-cell
:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
DGElasticPullToRefresh
Elastic pull to refresh for iOS developed in Swift -
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift -
HGPlaceholders
Nice library to show placeholders and Empty States for any UITableView/UICollectionView in your project -
ReverseExtension
A UITableView extension that enables cell insertion from the bottom of a table view. -
ExpandableCell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 5 -
GridView
Reusable GridView with excellent performance and customization that can be time table, spreadsheet, paging and more. -
DiffableDataSources
💾 A library for backporting UITableView/UICollectionViewDiffableDataSource. -
PullToRefreshSwift
iOS Simple Cool PullToRefresh Library. It is written in pure swift. -
QuickTableViewController
A simple way to create a UITableView for settings in Swift. -
KJCategories
Collection of native ios extensions and classes to boost development process. Such as UIKit, Foundation, QuartzCore, Accelerate, OpenCV, CoreGraphics, os and more. 超实用开发加速工具收集 -
YNExpandableCell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 4 -
CollapsibleTableSectionViewController
:tada: Swift library to support collapsible sections in a table view. -
ExpyTableView
Make your table view expandable just by implementing one method. -
WLEmptyState
WLEmptyState is an iOS based component that lets you customize the view when the dataset of a UITableView or a UICollectionView is empty. We created a sample project with the WLEmptyState component to show how you can use it. -
SwiftyComments
UITableView based component designed to display a hierarchy of expandable/foldable comments. -
AEAccordion
Simple and lightweight UITableViewController with accordion effect (expand / collapse cells) -
SectionScrubber
A component to quickly scroll between collection view sections -
SelectionList
Simple single-selection or multiple-selection checklist, based on UITableView -
SPDiffable
Wrapper of Apple Diffable Data Source. Including side bar and ready-use models. -
OKTableViewLiaison
Framework to help you better manage UITableViews -
AZTableViewController
Elegant and easy way to integrate pagination with dummy views -
CollapsibleTable
Collapsable table view sections with custom section header views. -
FDTextFieldTableViewCell
A UITableViewCell with an editable text field -
Doppelganger-Swift
Array diffs as collection view wants it - now in Swift ✨ -
CKTextFieldTableCell
UITableViewCell drop-in replacement with support of UITextField
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Shoyu or a related project?
README
Shoyu
Shoyu is a library written in Swift to represent UITableView data structures.
Shoyu means Soy Sauce in Japanese.
Usage
Create single section and single row
Use createSection
and createRow
.
tableView.source = Source() { source in
// Create section
source.createSection { section in
// Create row
section.createRow { row in
// Setting reuse identifier
row.reuseIdentifier = "Cell"
// Setting fixed height.
row.height = 52
// Configuring handler for cell.
row.configureCell = { cell, _ in
cell.textLabel?.text = "row 1"
}
}
}
}
if ClassName
and ReuseIdentifier
specified in Storyboard are the same, you don't need to specify the reuseIdentifier.
Create rows for corresponds to the array
Use createRows
.
let members = [
Member(firstName: "Hamada", lastName: "Hiro"),
Member(firstName: "Hamada", lastName: "Tadashi"),
Member(firstName: "Tamago", lastName: "GoGo"),
Member(firstName: "", lastName: "Wasabi"),
Member(firstName: "Lemon", lastName: "Honey"),
Member(firstName: "", lastName: "Fred"),
]
tableView.source = Source() { source in
source.createSection { section in
section.createRows(members) { member, row in
row.height = 52
row.configureCell = { cell, _ in
cell.textLabel?.text = member.fullName
}
}
}
}
Create section header and section footer
Use createHeader
and createFooter
.
tableView.source = Source() { source in
source.createSection { section in
// Create header.
section.createHeader { header in
// Setting title.
header.title = "Big Hero 6"
header.height = 22
header.configureView = { view, _ in
view.backgroundColor = UIColor.lightGrayColor()
}
}
// Create footer.
section.createFooter { footer in
...
}
}
}
Generics
Section
and Row
is compatible with generics.
Section
public class Section<HeaderType: UIView, FooterType: UIView>: SectionType {
...
}
Row
public class Row<CellType: UITableViewCell>: RowType {
...
}
cell
in the arguments of configureCell
is the type specified in the generics.
Section header and section footer are also similar.
// Create generic row.
section.createRows(members) { (member, row: Row<MemberTableViewCell>) in
row.configureCell = { cell, _ in
// cell type is MemberTableViewCell.
cell.nameLabel.text = member.fullName
}
}
Row's delegate
Row
has some delegate methods.
section.createRow { row in
// Configuring handler for height.
row.heightFor = { _ -> CGFloat? in
return 52
}
// Configuring handler for cell.
row.configureCell = { cell, _ in
cell.textLabel?.text = "row"
}
// Event handler for when cell is selected.
row.didSelect = { _ in
print("row is selected.")
}
}
Supported delegate methods
- configureCell
- heightFor
- canRemove
- canMove
- canMoveTo
- didSelect
- didDeselect
- willDisplayCell
- didEndDisplayCell
- willRemove
- didRemove
License
Shoyu is released under the MIT license. See LICENSE for details.
*Note that all licence references and agreements mentioned in the Shoyu README section above
are relevant to that project's source code only.