An empty state control to give visually appealing context when building iOS applications.
emptyStateImageViewTintColor
, which allows applying a tint color to the default UIEmptyStateView
's image view.emptyStateViewCenterYOffset
, which allows offsetting the vertical center position for the empty state view.UIEmptyState
pod, to allow for local development and easier testing.UIEmptyStateDataSource.emptyStateView
computed property and the the UIViewController+UIEmptyState.emptyStateView
properties conflicted thus not allowing creation of custom view.UIView
subclass in the UIEmptyStateDataSource.emptyStateView
computed property. Make sure to set any needed constraints, etc.Breaking API changes:
Remove emptyStateView
from view controller extension. This was never intended to be accessible outside of the extension. Use the emptyStateView
computed property in UIEmptyStateDataSource
to create a custom view instead.
Bug fix for retain cycle between delegate, datasource, and the view controller. Thanks to @piotrzuzel for the fix.
Add shared scheme, fixed thanks to @piotrzuzel.
Renamed reloadEmptyState(for: tableView)
to reloadEmptyStateForTableView(_:)
and reloadEmptyState(for: collectionView)
to reloadEmptyStateForCollectionView(_:)
. This fixes an issue where error is thrown for duplicate function declaration with Objective-C selector on Swift versions lower than 4.0.
Renamed the shouldShowEmptyStateView(for:)
datasource method to emptyStateViewShouldShow(for:)
. This was done to be more consistent with the rest of the API.
Renamed titleView
to titleLabel
and detailView
to detailLabel
. This makes it more clear exactly what these views actually are.
Fix a bug where constraints for the UIEmptyStateView
would be added whenever the view appeared thus causing a warning to be thrown by Xcode for duplicate and breaking constraints. Constraints for the view are now only added on initial showing of view.
Fix bug where UIEmptyStateView.detailLabel
would not resize and fit the screen correctly on iOS versions lower than 11.0. detailLabel
now calculates it's width properly and constraints are added accordingly.
Change emptyStateViewAnimatesEverytime
from true
to false
. This seems like a more reasonable default value as it animations can get annoying when repeated multiple times without change.