Git Product home page Git Product logo

lstpopview's Introduction

Hi there 👋

  • 梦想成为一名工艺人
  • 喜欢科幻悬疑类的电影
  • 会一点点编程,偶尔写一些简单的小东西👨‍💻‍
  • 交流QQ群:1045568246
  • 你已进入监控区域 🤓 visitors 🤓

lstpopview's People

Contributors

kchtin avatar losentrad 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

lstpopview's Issues

pan手势的问题

我在左侧测滑页面上放了一个tableView。
当我拖拽的手势在tableView上的时候,我是想侧滑的,结果y变了

pod install 报错

The 'xxx' target has transitive dependencies that include statically linked binaries: (LSTCategory)

消失动画的问题

点击弹框消失的动画可以自定义嘛,比如我想缩放消失,目前框架提供的只有到顶,左,底,右

点击事件问题

在创建新的弹窗上,在创建一个collecitonView 所有item 不能点击,只有两个手指同时操作,一个手指按住,屏幕,另一个手指点击item 才能生效,应该是某个点击事件处理,响应了方法,响应链无法继续传递下去了

第一个XPopup中创建第二个XPopup经常出现异常

我在第一个XPopup的button按钮创建并显示第二个XPopup,但是经常出现崩溃。在“LSTPopView.m“文件的511行处,代码是“id obj = popViewArr[popViewArr.count-2];”。xcode的bug提示popViewArr这个数组下标越界

这里有个bug , `removePopView` 会 崩溃

/** 移除popView */
+ (void)removePopView:(LSTPopView *)popView {
    if (!popView) { return;}
    NSArray *arr = LSTPopViewM().popViewMarr;
    
    
    for (NSValue *v in arr) {
        LSTPopView *tPopView = v.nonretainedObjectValue;
        if ([tPopView isEqual:popView]) {
            [LSTPopViewM().popViewMarr removeObject:v];
            break;
            return;
        }
    }
}

这里 移除的时候, 应该判断 数组里的类型, 被添加到 数组里的, 不一定 全是 NSValue,
当 依次 添加 priority 越来越小的popview时, 因为没有 添加到 superview, 你 扔到 arr里的就是普通的popview, 所以会闪退

Keyboard 和 customview 并不在同一坐标系,在presentViewController的view中弹出popview的话,customViewMaxY计算不对

Keyboard 和 customview 并不在同一坐标系,在presentViewController的view中弹出popview的话,customViewMaxY计算不对,可以这样修改:
- (void)keyboardWillShow:(NSNotification *)notification这个方法中修改:
CGFloat customViewMaxY = self.customView.pv_Bottom + self.avoidKeyboardSpace;
改成

CGRect cf = [self.customView convertRect:self.customView.bounds toView:[UIApplication sharedApplication].keyWindow];
CGFloat customViewMaxY = cf.origin.y + cf.size.height + self.avoidKeyboardSpace;

customView 未添加到 window,调用 layoutIfNeeded 会有警告

作者你好,感谢你的代码开源!

这是我的代码使用,点击按钮,从底部弹出一个列表:

    @objc func buttonClick(_ button: UIButton) {
        let tableView = MyTableView(frame: CGRect(x: 0, y: 0, width: view.bounds.width, height: 200))
        
        let popView = LSTPopView.initWithCustomView(tableView, parentView: nil, popStyle: .smoothFromBottom, dismissStyle: .smoothToBottom)
        
        popView?.hemStyle = .bottom
        popView?.isClickBgDismiss = true
        popView?.pop()
    }

日志有如下警告:

[TableView] Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window. Table view: <UITableView: 0x7fd841840a00; frame = (0 0; 390 200); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x600002082e20>; layer = <CALayer: 0x600002edce20>; contentOffset: {0, 0}; contentSize: {390, 440}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <OneWord.MyTableView: 0x7fd840413430; frame = (0 0; 390 200); gestureRecognizers = <NSArray: 0x600002066e50>; layer = <CALayer: 0x600002ed6920>>>

详情如图:

image

Bug和实现效果疑问

Bug

1、闪烁问题

问题:陆续弹出两个后,第二个会显示,第一个会被隐藏,当第二个还在展示而第一个消失时,界面会闪一下。
复现:Demo中常用示例场景,在点完 QQ顶部提示栏 后再点击 类微信/微博底部弹窗口 即可复现

2、定时器与生命周期

在使用窗口优先级来做弹窗效果时,第二个弹窗的优先级比第一个的低,并都为它们设置了自动消失时间,在第一个弹窗出现后,触发第二个弹窗,此时第二个不会展示,这是正常的,但是第二个弹窗的定时器和生命周期block(popViewDidPopBlock popViewWillPopBlock)会失效

功能疑问

1、排队展示

想实现如下效果:当弹出第一个后,第二个触发弹窗时,如果前面有弹窗展示了,则等待第一个弹窗消失后,再弹出第二个,并且都支持设置自动消失时间,这种该如何实现?

2、拖拽方向

是否可支持仅下拉和右滑拖拽消失,即拖拽同时只会是下拉或右滑,而不是右下方向移动

Cocospod导入不加 use_frameworks!的问题

  • 作者您好,Cocospod引入LSTPopView,如果Podfile文件里不加 use_frameworks! pod install会报target has transitive dependencies that include statically linked binaries: (LSTCategory)错误

  • 怎样在加入use_frameworks!的情况下pod install导入成功呢?

子视图有UITableView的时候点击cell被拦截了

首先非常喜欢楼主的LSTPopView
以下是我解决点击cell被拦截了的办法、或者楼主是否有更好的
#pragma mark-手势代理,解决和tableview点击发生的冲突
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {//判断如果点击的是tableView的cell,就把手势给关闭了
return NO;//关闭手势
}//否则手势存在
return YES;
}

定时器调试

demo里的定时器调试,倒计时未结束的时候,点击背景消失后,在点击显示弹窗,弹窗会闪一下,貌似是上一个定时任务结束了导致消失闪了一下

hemstyle会失效

masonry约束的自定义customview 宽高是根据subview的约束自适应

动画

能不能添加一个,底部单纯的弹入,弹出,不要淡入淡出的效果

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.