Latest 1.1.1
Homepage https://github.com/xjh093/JHNoDataEmptyViewForT-C
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

JHNoDataEmptyViewForT-C

empty view for tableview and collectionview

Base on : visibleCells


Pod

pod 'JHNoDataEmptyView'

Logs:

3.add property ‘jh_showNoDataEmptyView’.(2018-9-5)

  • suggest you to use this property, ‘jh_hideNoDataEmptyView’ is alse keeped. You can choose one of them.
  • automatic show effect too big, some system’s collectionView is also effected.

2.replace ‘jh_showAutomatic’ to ‘jh_hideNoDataEmptyView’.(2018-7-24)

  • set ‘YES’ if you do not want to show the ‘JHNoDataEmptyView’

~1.add property ‘jh_showAutomatic’.(2018-07-23)~

  • ~default is ‘YES’~

  • ~set ‘NO’ if you do not want to show the ‘JHNoDataEmptyView’~

implement delegate to offer more infomations

delegate for UICollectionView

@protocol JHNoDataUICollectionViewDelegate <NSObject>

@optional

/// offer a image to show some infomation for user.
- (UIImageView *)imageViewForCollectionViewWhenDataSourceIsEmpty;

/// offer a label to show some infomation for user.
- (UILabel *)labelForCollectionViewWhenDataSourceIsEmpty;

/// the empty view that add to tableView.
- (void)emptyViewForCollectionViewWhenDataSourceIsEmpty:(UIView *)emptyView;

@end

delegate for UITableView

@protocol JHNoDataUITableViewDelegate <NSObject>

@optional

/// offer a image to show some infomation for user.
- (UIImageView *)imageViewForTableViewWhenDataSourceIsEmpty;

/// offer a label to show some infomation for user.
- (UILabel *)labelForTableViewWhenDataSourceIsEmpty;

/// the empty view that add to tableView.
- (void)emptyViewForTableViewWhenDataSourceIsEmpty:(UIView *)emptyView;

@end

Latest podspec

{
    "name": "JHNoDataEmptyView",
    "summary": "A simple empty view for tableview and collectionview.",
    "version": "1.1.1",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "Haocold": "[email protected]"
    },
    "homepage": "https://github.com/xjh093/JHNoDataEmptyViewForT-C",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/xjh093/JHNoDataEmptyViewForT-C.git",
        "tag": "1.1.1"
    },
    "source_files": "JHNoDataEmptyView/*.{h,m}",
    "requires_arc": true,
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This