Giter Site home page Giter Site logo

itofu / lcactionsheet Goto Github PK

View Code? Open in Web Editor NEW
818.0 22.0 144.0 26.04 MB

一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。

Home Page: https://note.leodev.me/LCActionSheet/

License: MIT License

Ruby 2.31% Objective-C 97.69%
objective-c cocoapods actionsheet alert no-issue swift masonry wechat qq weibo

lcactionsheet's Issues

About iPad 横屏适配问题

在 iPad 默认横屏下,依旧是从左边弹出,是否有相关的属性,可以设置从下往上的弹出。

提个建议

新版本强了很多...不过从v1过来的人表示很忧伤,完全不兼容,全部需要重新写...好尴尬,不清楚当时为什么没有升级上来,也没限制版本.

限制title的行数

添加个属性来初始化 titleLabelnumberOfLines .
类似微博的回复功能...因为我们没有限制回复字数...然后titleView特别高

actionsheet消失时未将_backWindow.hidden 设置未true

如果为了改actionsheet,比如title,在http请求后,更改title,则需要持有actionsheet(即未销毁),由于新建的Uiwindow;则会锁住界面,就是界面点击无反应;
建议:

  • (void)show {
    _backWindow.hidden = NO; //添加hidden
    [UIView animateWithDuration:0.3f
    ...
    }
  • (void)dismiss:(UITapGestureRecognizer *)tap 和 - (void)didClickCancelBtn 在completion:^(BOOL finished) { 添加 _backWindow.hidden = YES;

自定义window没有释放


strongSelf.window.rootViewController = nil;
strongSelf.window.hidden = YES;
后面建议加上
strongSelf.window = nil;

pod 报错

[!] Error installing LCActionSheet
[!] /usr/bin/git clone https://github.com/iTofu/LCActionSheet.git /var/folders/jy/kcv5_tdd3zl8779ssc_2l1r40000gn/T/d20181113-43008-wutd4s --template= --single-branch --depth 1 --branch 3.5.0

Cloning into '/var/folders/jy/kcv5_tdd3zl8779ssc_2l1r40000gn/T/d20181113-43008-wutd4s'...
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

关于 UITableViewCell 取消点击的问题,比较影响用户的取消操作

感谢作者提供的开源控件。thx

前提:当手指在按住 cell 的时候,cell 会进入 highlighted 状态;此时松开手指的话,则会响应 UITableView 的 delegate 的点击事件;但是如果手指稍微滑动一下再松开手指,则不会响应 UITableView 的 delegate 的点击事件,这是比较友好的一个细节,提供用户取消选择的机会。

因为禁止了 UITableView 的滑动事件,所以如果选择了其中某一行,则没办法取消选择了。不知道有什么办法解决没?

carthage install error

*** Checking out LCActionSheet at "3.5.0"
*** xcodebuild output can be found in /var/folders/9z/kqwr9s597_d5cz8z5dk038nm0000gn/T/carthage-xcodebuild.HZ3Q1w.log
*** Skipped building LCActionSheet due to the error:
Dependency "LCActionSheet" has no shared framework schemes

If you believe this to be an error, please file an issue with the maintainers at https://github.com/iTofu/LCActionSheet/issues/new

Cancel button shows Chinese characters, can we modify the text of the cancel button?

I found that "Cancel" button is always attributed with Chinese characters. What if we want to implement an international solution using LCActionSheet? At the present, I implemented it in this way:

- (NSString *)cancelText
{
    if (_cancelText) {
        return _cancelText;
    }

    _cancelText = NSLocalizedString(@"cancel", nil);
    return _cancelText;
}

Thus, I suppose that it's better to provide a function for modifying the text of cancel button.

发现一严重bug

当使用该项目弹出sheet之后。再使用keywindow发生很大的偏移。导致使用你的框架之后,就不能再操作视图的window了

最大高度问题?

因为item个数不定,太多时超出屏幕高度,能否提供api限定view最大高度占屏幕高度的比例

跳转到横屏页面有问题

从2.5.2升级到最新版 点击LcactionSheet跳转到下一界面,下一界面的没有横过来,横屏布局变成了竖屏布局

swift调用时,destructiveButtonIndexSet无效。

           LCActionSheet(
                title: "取消关注后将不再得到关于此话题的更新信息",
                cancelButtonTitle: "取消",
                clicked: { actionSheet, index in
                    print(index)
                },
                otherButtonTitleArray: ["不再关注"]
            )
            .then {
                $0.destructiveButtonIndexSet = Set<Int>(arrayLiteral: 1)
                $0.blurEffectStyle = .light
            }
            .show()

这种方法并不能设置不再关注为红色。是我设置的方式有问题吗?

🐞 状态栏隐藏问题

看到目前只处理了状态栏style问题 #38
在隐藏了状态栏的界面弹出sheet的同时出现了状态栏, 应该参考#38 解决一下.

如果title能够支持多行就好啦


    NSString *alertMsg = @"一个超级长的title一个超级长的title一个超级长的title一个超级长的title一个超级长的title一个超级长的title";
    LCActionSheet *sheet = [[LCActionSheet alloc] initWithTitle:alertMsg
                                                   buttonTitles:@[@"确定"]
                                                 redButtonIndex:0
                                                       delegate:self];

也就是说3.2版本开始status bar就始终只能是黑色了吗?

我有些页面的status bar是黑色, 有些是白色, 在使用旧版本的时候没有影响,原本是什么颜色就是什么颜色, 但是新版本后变得很尴尬。。白色的状态栏在显示sheet后变成了黑色,点击后又变回白色。。你可能为了多种原因重构了代码, 但是我还是选择旧版本好了。。

ipad

用在ipad 横屏时会有bug,显示效果不对,action sheet,不是从底部滑出,而是从边上滑出

关于默认“取消” 按钮的疑问?

你好,你的项目写得非常棒,我也在用它。只是我有个疑问,你为什么把默认的“取消”按钮设置为黑色,或者说你为什么不把它的颜色设定也开放出来!

without title

很多时候是不需要title的 开放个接口咯

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.