Coder Social home page Coder Social logo

lyemptyview's People

Contributors

abnerzj avatar dev-liyang avatar wenxiangjiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lyemptyview's Issues

1.3.1版本bug

描述:
tableview空页面,不采用reloadData方式刷新数据源,而使用insertRowAtIndexPath插入一条,emptyView没有hidden。

场景:
采用wiki 6.延迟显示emptyView方式

问题验证:
修改insertRowAtIndexPath为reloadData可修复

代码:
[self.dataArray insertObject:obj atIndex:0];
[self.tableView beginUpdates];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow: 0];
[self.tableView insertRowAtIndexPath:indexPath withRowAnimation:UITableViewRowAnimationNone];
[self.tableView endUpdates];

其他页面也会受到影响

有一个页面我没使用到emptyview,我在那个页面执行insertrow方法是还进行交换了,请问这个怎么避免

ly_startLoading 刷新tableView会闪动

设置 self.tableView.ly_emptyView.autoShowEmptyView = NO;

然后在tableView reloadData 之后设置[self.tableView ly_endLoading];

刷新的时候tableView闪动是怎么回事

为何使用customView时如果Autolayout布局会导致APP卡住

`
let v = UIView()
let iv = UIView()
v.addSubview(iv)

// 只要CustomView添加了约束就会卡死主线程?
iv.snp.makeConstraints { (make) in
make.edges.equalToSuperview()
}

let ev = LYEmptyView.emptyView(withCustomView: v)
tableView.ly_emptyView = ev
`

iOS 13 CUP 100%

在iOS13 系统,在App进入后台然后在回到前台会,导致CPU达到100%,具体问题位置没定位出来

ios 10和ios9 下, 用自定义调用会卡死线程

我自定义的MyDIYEmpty继承于 LYEmptyView, 然后 MyDIYEmpty 调用emptyViewWithCustomView方法封装, ios11正常, ios9和ios10 会卡死. 项目比较近,没时间研究是哪里的问题, 我就自己判断展位页面显示和隐藏.

tableview设置contentinset会有问题

可以在setSubViewFrame方法中加上这个(uicollectionview同理):
//有无设置偏移
if (self.contentViewOffset) {
self.ly_centerY += self.contentViewOffset;
}else{
if ([self.superview isKindOfClass:[UITableView class]]) {
UITableView *tableView = (UITableView *)self.superview;
self.ly_centerY -= tableView.contentInset.top;
}
}

//有无设置Y坐标值
if (self.contentViewY < 1000) {
    self.ly_y = self.contentViewY;
}else{
    if ([self.superview isKindOfClass:[UITableView class]]) {
        UITableView *tableView = (UITableView *)self.superview;
        self.ly_centerY -= tableView.contentInset.top;
    }
}

用了这个可能会被苹果拒绝审核通过

1.自己遇到的情况是,用了这个之后,提交审核不通过
2.删除之后就审核通过了

拒绝审核通过的原因是:

Your app, extension, or linked framework appears to contain code designed explicitly with the capability to change your app’s behavior or functionality after App Review approval, which is not in compliance with App Store Review Guideline 2.5.2 and section 3.3.2 of the Apple Developer Program License Agreement.
This code, combined with a remote resource, can facilitate significant changes to your app’s behavior compared to when it was initially reviewed for the App Store. While you may not be using this functionality currently, it has the potential to load private frameworks, private methods, and enable future feature changes. This includes any code which passes arbitrary parameters to dynamic methods such as dlopen(), dlsym(), respondsToSelector:, performSelector:, method_exchangeImplementations(), and running remote scripts in order to change app behavior and/or call SPI, based on the contents of the downloaded script. Even if the remote resource is not intentionally malicious, it could easily be hijacked via a Man In The Middle (MiTM) attack, which can pose a serious security vulnerability to users of your app.
Next Steps
To resolve this issue, please perform an in-depth review of your app and remove any code, frameworks, or SDKs that fall in line with the functionality described above and resubmit your app’s binary for review.

怎么更换空视图展示内容

有个需求:当前页面进来时无数据展示了无数据的图片,但是关掉网络后,重新加载之后应该显示无网络的图片,但是tableView创建的时候给ly_emptyView赋值时已经决定了空视图的样子,所以我想问一下能不能再每次刷新的时候再访问该展示什么内容。我看DZNEmptyDataSet是用代理来做的,但是不太想用那个,各种代理写一大堆。

cocopod1.4.0搜不到

你好我这为啥搜不到?
Mac:~ gxz$ pod --version
1.4.0

Mac:~ $ pod search LYEmptyView
[!] Unable to find a pod with name, author, summary, or description matching LYEmptyView

不居中问题

当collectionView的contentInset的left边距大于0时,emptyView不居中,貌似只考虑left没考虑right?

ly_startLoading

ly_startLoading 网络加载时 采用的方法 看心情生效

设置collectionView没有起作用

let emptyLabel = UILabel()
emptyLabel.text = "暂无查询内容"
emptyLabel.font = UIFont.systemFont(ofSize: 14)
emptyLabel.textColor = colorWithHexString(hex: "CCCCCC")
collection.ly_emptyView = LYEmptyView.emptyView(withCustomView: emptyLabel)
view.addSubview(collection)
这样添加没有用吗

actionBtnCornerRadius 设置为 0 无效

原因是actionBtnCornerRadius设置为 0 后

CGFloat cornerRadius = self.actionBtnCornerRadius ? self.actionBtnCornerRadius : 5.f;

这行代码会走 false 逻辑。

CUICatalog: Invalid asset name supplied: (null)

CUICatalog: Invalid asset name supplied: (null)
自定空页面 报错
UIView * contentView = [[UIView alloc] init];
contentView.frame = CGRectMake(0, 0, 100, 100);
contentView.backgroundColor = [UIColor redColor];

没加子视图没问题,添加子视图报错
// UILabel * titleLab = [[UILabel alloc] init];
// titleLab.text = titleStr;
// titleLab.font = FONT_MAIN;
// titleLab.textColor = COLORF_MAIN;
// [contentView addSubview:titleLab];
// [titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
// (void)make.centerX.centerY;
// }];
//
// UILabel * desLab = [[UILabel alloc] init];
// desLab.text = detailStr;
// desLab.font = FONT_MAIN;
// desLab.textColor = COLORF_MAIN;
// [contentView addSubview:desLab];
// [desLab mas_makeConstraints:^(MASConstraintMaker *make) {
// (void)make.centerX;
// make.top.mas_equalTo(titleLab.mas_bottom);
// }];

inView.ly_emptyView = [LYEmptyView emptyViewWithCustomView:contentView];

scrollView调用,会一直显示在背后

_scrollView.ly_emptyView = [LYEmptyView emptyActionViewWithImageStr:@"net"
titleStr:@"无数据" detailStr:@"查看网络设置,稍后再试!"
btnTitleStr:@"重新加载"
target:self
有数据的时候,也是显示在背后!

搜不到啊

我也搜不到
MR_THT$ pod --version
1.3.1
Mac:~ $ pod search LYEmptyView
[!] Unable to find a pod with name, author, summary, or description matching LYEmptyView

关于空图片字符串时的警告问题-CUICatalog: Invalid asset name supplied: '(null)'

使用情况是,我用图片直接进行的初始化,所以图片字符串直接就是nil了,于是就会出现这个警告,CUICatalog: Invalid asset name supplied: '(null)',看源码后发现是LYEmptyView.m文件的setupSubviews方法中,进行图片初始化时的这段代码
//占位图片 UIImage *image = [UIImage imageNamed:self.imageStr]; if(self.image){ [self setupPromptImageView:self.image]; }else if (image) { [self setupPromptImageView:image]; } else{ if (_promptImageView) { [self.promptImageView removeFromSuperview]; self.promptImageView = nil; } }
在这个里面,self.imageStr为nil,所以报了这个警告,暂时不影响运行,只有警告。如果这儿可以加上一个对于self.imageStr为空的检测,就更好了,可以消除掉这个警告。目前如果要消除这个警告,只能用图片名称字符串来初始化才行。

UICollectionView (LJEmptyView) insertItemsAtIndexPaths crash 交换的方法会引起crash,目前是IOS 10.1

0 CoreFoundation __exceptionPreprocess
1 libobjc.A.dylib objc_exception_throw
2 CoreFoundation +[NSException raise:format:]
3 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4 UIKit -[UICollectionViewData indexPathForItemAtGlobalIndex:]
5 UIKit -[UICollectionViewData layoutAttributesForGlobalItemIndex:]
6 UIKit -[UICollectionView _viewAnimationsForCurrentUpdate]
7 UIKit __71-[UICollectionView _updateWithItems:tentativelyForReordering:animator:]_block_invoke.1983
8 UIKit +[UIView(Animation) performWithoutAnimation:]
9 UIKit -[UICollectionView _updateWithItems:tentativelyForReordering:animator:]
10 UIKit -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:]
11 UIKit -[UICollectionView _updateRowsAtIndexPaths:updateAction:]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.