Description
This is a set of infrastructure based on MVVM + RxSwift MVVM + RxSwift + CTMediatror + MJRefresh + DZNEmptyDataSet + SkeletonView
Rickenbacker alternatives and similar libraries
Based on the "UI" category.
Alternatively, view Rickenbacker alternatives based on common mentions on social networks and blogs.
-
Charts
Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart. -
folding-cell
:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion -
Animated Tab Bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
NVActivityIndicatorView
A collection of awesome loading animations -
LTMorphingLabel
[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift. -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
SwiftMessages
A very flexible message bar for iOS written in Swift. -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
Alerts Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
AMScrollingNavbar
Scrollable UINavigationBar that follows the scrolling of a UIScrollView -
Pagemenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
Macaw
Powerful and easy-to-use vector graphics Swift library with SVG support -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
TextFieldEffects
Custom UITextFields effects inspired by Codrops, built using Swift -
SPPermission
Universal API for request permission and get its statuses. -
Scrollable-GraphView
An adaptive scrollable graph view for iOS to visualise simple discrete datasets. Written in Swift. -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
PermissionScope
A Periscope-inspired way to ask for iOS permissions. -
Material Components for iOS
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
SCLAlertView
Beautiful animated Alert View. Written in Swift -
ESTabBarController
:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie! -
NotificationBanner
The easiest way to display highly customizable in app notification banners in iOS -
Instructions
Create walkthroughs and guided tours (coach marks) in a simple way, with Swift. -
ActiveLabel
UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift -
SlideMenuControllerSwift
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift. -
PKHUD
A Swift based reimplementation of the Apple HUD (Volume, Ringer, Rotation,…) for iOS 8. -
TLYShyNavBar
Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars! -
Siren
Notify users when a new version of your app is available and prompt them to upgrade. -
DGElasticPullToRefresh
Elastic pull to refresh for iOS developed in Swift -
PopupDialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style. -
StarWars.iOS
This component implements transition animation to crumble view-controller into tiny pieces. -
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift -
KMNavigationBarTransition
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically. -
Whisper
:mega: Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside -
CircleMenu
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion -
RazzleDazzle
A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros. -
Parchment
A paging view controller with a highly customizable menu ✨ -
PaperOnboarding
:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion -
XLActionController
Fully customizable and extensible action sheet controller written in Swift
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 Rickenbacker or a related project?
README
Rickenbacker
👌. MVVM + RxSwift + CTMediatror + MJRefresh + DZNEmptyDataSet + SkeletonView
English | [简体中文](README_CN.md)
This is a set of infrastructure based on MVVM + RxSwift
Features
At the moment, the most important features of Rickenbacker can be summarized as follows:
Adapter
This module is mainly to encapsulate the base class.
- BaseViewController: Support oc base class, public part.
- VMTableViewController: List base class, internally responsive processing.
- VMViewController: You need to specify
ViewModel
or its subclasses as generics. - ViewModel: Basic view model, Subclasses must inherit.
CatHome
Resource module, which mainly deals with image resource and text resource reading.
- Read image resource:
R.image("base_black_back")
- Read text resource:
R.text("base_empty_title")
- Read color resource:
R.color("background")
BeeBox
Mainly collect RxSwift related useful method classes, etc.
CTMediatror
This module mainly solves the cocoapods problem encountered by Swift using this componentized solution.
HBDNavigationBar
This module is based on HBDNavigationBar secondary encapsulation of the underlying basic Navigation.
MJRefresh
This module is based on the refresh function of MJRefresh encapsulated UITableView.
- Inject refresh function, you only need to simply implement the
ViewModelHeaderable
protocol - Inject load more functions, just simply implement the
ViewModelFooterable
protocol
Test case:
extension MJRefreshViewModel: ViewModelHeaderable, ViewModelFooterable {
var enterBeginRefresh: Bool {
return false
}
// Automatic non-sensing pull-up refresh function
var footer: MJRefreshFooter {
let footer = MJRefreshAutoFooter()
footer.triggerAutomaticallyRefreshPercent = -5
return footer
}
}
Remarks: Of course, you can also customize
header
andfooter
according to your needs.
DZNEmptyDataSet
This module is based on the empty data display function of the DZNEmptyDataSet package UITableView.
- To inject empty data display function, you only need to simply implement the
ViewModelEmptiable
protocol
Test case:
class EmptyViewModel: ViewModel, ViewModelEmptiable, ViewModelHeaderable {
let dataSource: BehaviorRelay<[String]> = BehaviorRelay(value: [])
func loadData() {
let driver = NetworkService().randomResult().asObservable()
driver.bind(to: dataSource).disposed(by: disposeBag)
driver.map { $0.isEmpty }.bind(to: isEmptyData).disposed(by: disposeBag)
driver.subscribe { _ in } onCompleted: {
self.refreshSubject.onNext(.endHeaderRefresh)
}.disposed(by: disposeBag)
}
}
- Here also supports custom style design, only need to implement
DZNEmptyDataSetSourceable
orDZNEmptyDataSetDelegateable
agreement, interfaces are directly toDZNEmptyDataSet
do turning processing.
public typealias DZNEmptyDataSetable = DZNEmptyDataSetSourceable & DZNEmptyDataSetDelegateable
public protocol DZNEmptyDataSetSourceable {
/// Asks the data source for the image of the dataset.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: An image for the dataset.
func DZNEmptyDataSetImage(scrollView: UIScrollView) -> UIImage
/// Asks the data source for the title of the dataset.
/// The dataset uses a fixed font style by default, if no attributes are set. If you want a different font style, return a attributed string.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: An attributed string for the dataset title, combining font, text color, text pararaph style, etc.
func DZNEmptyDataSetTitle(scrollView: UIScrollView) -> NSAttributedString?
/// Asks the data source for the description of the dataset.
/// The dataset uses a fixed font style by default, if no attributes are set. If you want a different font style, return a attributed string.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: An attributed string for the dataset description text, combining font, text color, text pararaph style, etc.
func DZNEmptyDataSetDescription(scrollView: UIScrollView) -> NSAttributedString?
/// Asks the data source for a tint color of the image dataset. Default is nil.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: A color to tint the image of the dataset.
func DZNEmptyDataSetImageTintColor(scrollView: UIScrollView) -> UIColor?
/// Asks the data source for the image animation of the dataset.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: image animation
func DZNEmptyDataSetImageAnimation(scrollView: UIScrollView) -> CAAnimation?
/// Asks the data source for the title to be used for the specified button state.
/// The dataset uses a fixed font style by default, if no attributes are set. If you want a different font style, return a attributed string.
/// - Parameters:
/// - scrollView: A scrollView subclass informing the data source.
/// - state: The state that uses the specified title. The possible values are described in UIControlState.
/// - Returns: An attributed string for the dataset button title, combining font, text color, text pararaph style, etc.
func DZNEmptyDataSetButtonTitle(scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString?
/// Asks the data source for the image to be used for the specified button state.
/// This method will override buttonTitleForEmptyDataSet:forState: and present the image only without any text.
/// - Parameters:
/// - scrollView: A scrollView subclass informing the data source.
/// - state: The state that uses the specified title. The possible values are described in UIControlState.
/// - Returns: An image for the dataset button imageview.
func DZNEmptyDataSetButtonImage(scrollView: UIScrollView, for state: UIControl.State) -> UIImage?
/// Asks the data source for a background image to be used for the specified button state.
/// There is no default style for this call.
/// - Parameters:
/// - scrollView: A scrollView subclass informing the data source.
/// - state: The state that uses the specified image. The values are described in UIControlState.
/// - Returns: An attributed string for the dataset button title, combining font, text color, text pararaph style, etc.
func DZNEmptyDataSetButtonBackgroundImage(scrollView: UIScrollView, for state: UIControl.State) -> UIImage?
/// Asks the data source for the background color of the dataset. Default is clear color.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: A color to be applied to the dataset background view.
func DZNEmptyDataSetBackgroundColor(scrollView: UIScrollView) -> UIColor
/// Asks the data source for a custom view to be displayed instead of the default views such as labels, imageview and button. Default is nil.
/// Use this method to show an activity view indicator for loading feedback, or for complete custom empty data set.
/// Returning a custom view will ignore -offsetForEmptyDataSet and -spaceHeightForEmptyDataSet configurations.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: The custom view.
func DZNEmptyDataSetCustomView(scrollView: UIScrollView) -> UIView?
/// Asks the data source for a offset for vertical and horizontal alignment of the content. Default is CGPointZero.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: The offset for vertical and horizontal alignment.
func DZNEmptyDataSetVerticalOffset(scrollView: UIScrollView) -> CGFloat
/// Asks the data source for a vertical space between elements. Default is 11 pts.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: The space height between elements.
func DZNEmptyDataSetSpaceHeight(scrollView: UIScrollView) -> CGFloat
}
public protocol DZNEmptyDataSetDelegateable {
/// Asks the delegate to know if the empty dataset should fade in when displayed. Default is YES.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: YES if the empty dataset should fade in.
func DZNEmptyDataSetShouldFadeIn(_ scrollView: UIScrollView) -> Bool
/// Asks the delegate to know if the empty dataset should still be displayed when the amount of items is more than 0. Default is NO
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: YES if empty dataset should be forced to display
func DZNEmptyDataSetShouldBeForcedToDisplay(_ scrollView: UIScrollView) -> Bool
/// Asks the delegate for touch permission. Default is YES.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: YES if the empty dataset receives touch gestures.
func DZNEmptyDataSetShouldAllowTouch(_ scrollView: UIScrollView) -> Bool
/// Asks the delegate for scroll permission. Default is NO.
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: YES if the empty dataset is allowed to be scrollable.
func DZNEmptyDataSetShouldAllowScroll(_ scrollView: UIScrollView) -> Bool
/// Asks the delegate for image view animation permission. Default is NO.
/// Make sure to return a valid CAAnimation object from imageAnimationForEmptyDataSet:
/// - Parameter scrollView: A scrollView subclass informing the data source.
/// - Returns: YES if the empty dataset is allowed to animate
func DZNEmptyDataSetShouldAnimateImageView(_ scrollView: UIScrollView) -> Bool
/// Tells the delegate that the empty data set will appear.
/// - Parameter scrollView: A scrollView subclass informing the data source.
func DZNEmptyDataSetWillAppear(_ scrollView: UIScrollView)
/// Tells the delegate that the empty data set did appear.
/// - Parameter scrollView: A scrollView subclass informing the data source.
func DZNEmptyDataSetDidAppear(_ scrollView: UIScrollView)
/// Tells the delegate that the empty data set will disappear.
/// - Parameter scrollView: A scrollView subclass informing the data source.
func DZNEmptyDataSetWillDisappear(_ scrollView: UIScrollView)
/// Tells the delegate that the empty data set did disappear.
/// - Parameter scrollView: A scrollView subclass informing the data source.
func DZNEmptyDataSetDidDisappear(_ scrollView: UIScrollView)
}
Test case:
// Configure empty data display information
extension DZNEmptyDataSetViewController: DZNEmptyDataSetable {
func DZNEmptyDataSetImage(scrollView: UIScrollView) -> UIImage {
return R.image("base_network_error_black")
}
func DZNEmptyDataSetImageTintColor(scrollView: UIScrollView) -> UIColor? {
return UIColor.red
}
func DZNEmptyDataSetTitle(scrollView: UIScrollView) -> NSAttributedString? {
NSAttributedString(string: R.text("TEXT"))
}
func DZNEmptyDataSetDescription(scrollView: UIScrollView) -> NSAttributedString? {
NSAttributedString(string: R.text("测试网络异常展示"))
}
func DZNEmptyDataSetVerticalOffset(scrollView: UIScrollView) -> CGFloat {
return -77
}
}
CocoaPods
- If you want use this framework.☠️
pod 'Rickenbacker'
Remarks
The general process is almost like this, the Demo is also written in great detail, you can check it out for yourself.🎷
Tip: If you find it helpful, please help me with a star. If you have any questions or needs, you can also issue.
Thanks.🎇
About the author
- 🎷 E-mail address: [[email protected]]([email protected]) 🎷
- 🎸 GitHub address: yangKJ 🎸
License
Rickenbacker is available under the [MIT](LICENSE) license. See the [LICENSE](LICENSE) file for more info.
*Note that all licence references and agreements mentioned in the Rickenbacker README section above
are relevant to that project's source code only.