iTofu / LCActionSheet

一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
https://note.leodev.me/LCActionSheet/
MIT License
821 stars 144 forks source link

swift调用时,destructiveButtonIndexSet无效。 #28

Closed seekcx closed 7 years ago

seekcx commented 7 years ago

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

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

iTofu commented 7 years ago

我刚检查了下代码,这个应该是一个 Bug 而不是你的问题。目测可能是 OC 中的 NSSet -containsObject: 方法传 NSNumber 参数类型时,在 Swift 中由对应的 Set 类型调用时出现问题,我细致看一下,等下修复了会通知你。

iTofu commented 7 years ago

已经修复了这个 Bug,你更新下试试。版本是 2.6.3。

统一配置的需求我这两天抽空实现。

seekcx commented 7 years ago

@iTofu fix 速度非常赞!

但是目前pod上还是2.6.2

seekcx commented 7 years ago

可能跟我使用的coding镜像有关,镜像同步有点延时。

iTofu commented 7 years ago

应该是镜像的延迟,等等就好了。

发自我的 iPhone

在 2016年11月28日,下午7:00,abel notifications@github.com 写道:

可能跟我使用的coding镜像有关,镜像同步有点延时。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.