ShelfView-iOS alternatives and similar libraries
Based on the "UICollectionView" category.
Alternatively, view ShelfView-iOS alternatives based on common mentions on social networks and blogs.
-
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
Gliding Collection
:octocat: Gliding Collection is a smooth, flowing, customizable decision for a UICollectionView Swift Controller. iOS library made by @Ramotion -
CenteredCollectionView
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift -
Card Slider
:octocat: 🃏 Cardslider is a design UI controller that allows you to swipe through cards with pictures and accompanying descriptions. -
RAReorderableLayout
DISCONTINUED. A UICollectionView layout which can move an item with drag and drop. -
GravitySlider
🔄 GravitySlider is a beautiful alternative to the standard UICollectionView flow layout. -
ReplaceAnimation
Pull-to-refresh animation in UICollectionView with a sticky header flow layout, written in Swift :large_orange_diamond: -
Blueprints
DISCONTINUED. :cyclone: Blueprints - A framework that is meant to make your life easier when working with collection view flow layouts. -
CarLensCollectionViewLayout
DISCONTINUED. An easy-to-use Collection View Layout for card-like animation. -
CollectionViewShelfLayout
A UICollectionViewLayout subclass displays its items as rows of items similar to the App Store Feature tab without a nested UITableView/UICollectionView hack. -
AZCollectionViewController
Easy way to integrate pagination with dummy views in CollectionView, make Instagram "Discover" within minutes. -
CheckmarkCollectionViewCell
UICollectionViewCell with checkbox when it isSelected and empty circle when not - like Photos.app "Select" mode. -
FlexibleRowHeightGridLayout
A UICollectionView grid layout designed to support Dynamic Type by allowing the height of each row to size to fit content. -
CustomCollectionLayout
This is an example project for my article called "UICollectionView Tutorial: Changing presentation on the fly" -
GoodProvider
🚀UITableView and UICollectionView provider to simplify basic scenarios of showing the data.
CodeRabbit: AI Code Reviews for Developers
* 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 ShelfView-iOS or a related project?
README
ShelfView (iOS)
iOS custom view to display books on shelf (Android version is available here)
Requirements
- iOS 10.0+
- Swift 4.2
Installation
ShelfView
is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'ShelfView'
Note
Because of book covers whose URLs are http
, update your info.plist
as follows:
- add
App Transport Security Settings
to the list - add
Allow Arbitrary Loads
to the security settings added above; set it toYES
.
Plain Shelf
import ShelfView
class PlainShelfController: UIViewController, PlainShelfViewDelegate {
var shelfView: PlainShelfView!
override func viewDidLoad() {
super.viewDidLoad()
let books = [
BookModel(bookCoverSource: "https://files.kerching.raywenderlich.com/covers/d5693015-46b6-44f8-bf7b-7a222b28d9fe.png",
bookId: "0",
bookTitle: "Realm: Building Modern Swift Apps with Realm"),
BookModel(bookCoverSource: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTYEkCQ_wu8HoGJzzs_gUH_FVusgI2RhntBKQ-WkmqnDJZnriwY6Q",
bookId: "1",
bookTitle: "iOS 10 by Tutorials: Learning the new iOS APIs with Swift 3")
]
shelfView = PlainShelfView(frame: CGRect(x: 0, y: 0, width: 350, height: 500),
bookModel: books, bookSource: PlainShelfView.BOOK_SOURCE_URL)
shelfView.delegate = self
self.view.addSubview(shelfView)
}
func onBookClicked(_ shelfView: PlainShelfView, index: Int, bookId: String, bookTitle: String) {
print("I just clicked \"\(bookTitle)\" with bookId \(bookId), at index \(index)")
}
}
Section Shelf
import ShelfView
class SectionShelfController: UIViewController, SectionShelfViewDelegate {
var shelfView: SectionShelfView!
override func viewDidLoad() {
super.viewDidLoad()
let books = [
BookModel(bookCoverSource: "https://files.kerching.raywenderlich.com/covers/d5693015-46b6-44f8-bf7b-7a222b28d9fe.png",
bookId: "0",
bookTitle: "Realm: Building Modern Swift Apps with Realm"),
BookModel(bookCoverSource: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTYEkCQ_wu8HoGJzzs_gUH_FVusgI2RhntBKQ-WkmqnDJZnriwY6Q",
bookId: "1",
bookTitle: "iOS 10 by Tutorials: Learning the new iOS APIs with Swift 3")
]
let bookModelSectionArray = [BookModelSection(sectionName: "RAYWENDERLICH",
sectionId: "0",
sectionBooks: books)]
shelfView = SectionShelfView(frame: CGRect(x: 0, y: 0, width: 350, height: 500),
bookModelSection: bookModelSectionArray,
bookSource: SectionShelfView.BOOK_SOURCE_URL)
shelfView.delegate = self
self.view.addSubview(shelfView)
}
func onBookClicked(_ shelfView: SectionShelfView, section: Int, index: Int,
sectionId: String, sectionTitle: String, bookId: String,
bookTitle: String) {
print("I just clicked \"\(bookTitle)\" with bookId \(bookId), at index \(index). Section details --> section \(section), sectionId \(sectionId), sectionTitle \(sectionTitle)")
}
}
Add more books to ShelfView
- Plain Shelf
swift addBooks(bookModel: [BookModel])
- Section Shelf
swift addBooks(bookModelSection: [BookModelSection])
Reload books on ShelfView
- Plain Shelf
swift reloadBooks(bookModel: [BookModel])
- Section Shelf
swift reloadBooks(bookModelSection: [BookModelSection])
Loading book covers from other sources
- iPhone/iPad document directory
let books = [
BookModel(bookCoverSource: "bookcover0.png", bookId: "0", bookTitle: "Book Title 0"),
BookModel(bookCoverSource: "bookcover1.png", bookId: "1", bookTitle: "Book Title 1")
]
shelfView = PlainShelfView(frame: CGRect(x: 0, y: 0, width: 350, height: 500),
bookModel: books, bookSource: PlainShelfView.BOOK_SOURCE_DEVICE_DOCUMENTS)
- iPhone/iPad library directory
let books = [
BookModel(bookCoverSource: "bookcover0.png", bookId: "0", bookTitle: "Book Title 0"),
BookModel(bookCoverSource: "bookcover1.png", bookId: "1", bookTitle: "Book Title 1")
]
shelfView = PlainShelfView(frame: CGRect(x: 0, y: 0, width: 350, height: 500),
bookModel: books, bookSource: PlainShelfView.BOOK_SOURCE_DEVICE_LIBRARY)
- iPhone/iPad cache directory
let books = [
BookModel(bookCoverSource: "bookcover0.png", bookId: "0", bookTitle: "Book Title 0"),
BookModel(bookCoverSource: "bookcover1.png", bookId: "1", bookTitle: "Book Title 1")
]
shelfView = PlainShelfView(frame: CGRect(x: 0, y: 0, width: 350, height: 500),
bookModel: books, bookSource: PlainShelfView.BOOK_SOURCE_DEVICE_CACHE)
- Directly from your project's source code
let books = [
BookModel(bookCoverSource: "bookcover0.png", bookId: "0", bookTitle: "Book Title 0"),
BookModel(bookCoverSource: "bookcover1.png", bookId: "1", bookTitle: "Book Title 1")
]
shelfView = PlainShelfView(frame: CGRect(x: 0, y: 0, width: 350, height: 500),
bookModel: books, bookSource: PlainShelfView.BOOK_SOURCE_RAW)
License
ShelfView
is available under the MIT license. See the LICENSE file for more info.
Author
Adeyinka Adediji ([email protected])
Contributions & Bug Reporting
Credits
*Note that all licence references and agreements mentioned in the ShelfView-iOS README section above
are relevant to that project's source code only.