LEEAlert
LEEAlert copied to clipboard
如何分开设置, 例如Action不固定, 或根据某条件设置不同属性如何写?
LEEAlertConfig * alert = [LEEAlert alert];
LEEAlertConfigModel * config = alert.config;
config.addXXXXX;
config.addXXXXX;
config.addXXXXX;
config.addXXXXX;
config.addXXXXX;
if (XXXX) {
config.addXXXXX;
}
if (XXXX) {
config.addXXXXX;
}
config.LeeShow();
这个没用,会被直接释放掉
@bolee 你把你写的代码发一下 我康康
@bolee 你把你写的代码发一下 我康康
另外一个issue回你了,是对的
所以最后是如何解决的呢?我是通过数组添加config.addXXXXX。
@yuwanglijun
LEEAlertConfig * alert = [LEEAlert alert];
LEEAlertConfigModel * config = alert.config;
config.addXXXXX;
config.addXXXXX;
config.addXXXXX;
config.addXXXXX;
config.addXXXXX;
if (XXXX) {
config.addXXXXX;
}
for xxx in xxxx {
config.addXXXXX;
}
config.LeeShow();
我后来是这样的,可以满足:
LEEActionSheetConfig *actionsheet = [LEEAlert actionsheet];
actionsheet.config
.LeeAddAction(^(LEEAction *action) {
});
for(...)
{
actionsheet.config
.LeeAddAction
}
actionsheet.config
.LeeShow();