SPAlertController icon indicating copy to clipboard operation
SPAlertController copied to clipboard

新版本不设置title不会弹出

Open ivoidcat opened this issue 4 years ago • 5 comments

新版本不设置title不会弹出,demo测试可以,放到项目就不行了,新版本不知道为什么不行,换回老版本就可以了,

ivoidcat avatar Aug 19 '19 09:08 ivoidcat

你好,能把创建SPAlertController的地方代码给我看一下吗

乐升平 许思必客行 中华人民共和国

手机:13879857085 邮箱:[email protected]

电话:000-00000000 地址:上海市浦东新区居里路99号

在2019年08月19日 17:24,ivoidcat[email protected] 写道:

新版本不设置title不会弹出,demo测试可以,放到项目就不行了,新版本不知道为什么不行,换回老版本就可以了,

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

SPStore avatar Aug 20 '19 05:08 SPStore

创建的时候我把demo里面的直接复制进去的都不行,源码的地方我改了个地方就可以了,至今不明白原理

    if (!self.customHeaderView) {
        if ((1 || self.attributedTitle.length || self.message.length || self.attributedMessage.length || self.textFields.count || self.image)) {
            [self.alertView addSubview:headerView];
        }
    }

ivoidcat avatar Aug 20 '19 08:08 ivoidcat

你好,请问是哪种样式,是从地底部弹出来的样式,还是从中间弹出来的样式。你复制的是demo里的哪个示例,我想还原一下你的场景

乐升平 许思必客行 中华人民共和国

手机:13879857085 邮箱:[email protected]

电话:000-00000000 地址:上海市浦东新区居里路99号

在2019年08月20日 16:55,ivoidcat[email protected] 写道:

创建的时候我把demo里面的直接复制进去的都不行,源码的地方我改了个地方就可以了,至今不明白原理

if (!self.customHeaderView) {

    if ((1 || self.attributedTitle.length || self.message.length || self.attributedMessage.length || self.textFields.count || self.image)) {

        [self.alertView addSubview:headerView];

    }

}

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

SPStore avatar Aug 23 '19 05:08 SPStore

SPAlertController *alertController = [SPAlertController alertControllerWithTitle:nil message:nil preferredStyle:SPAlertControllerStyleActionSheet];
alertController.needDialogBlur = _lookBlur;
SPAlertAction *action1 = [SPAlertAction actionWithTitle:@"Default" style:SPAlertActionStyleDefault handler:^(SPAlertAction * _Nonnull action) {
    NSLog(@"点击了Default ");
}];
SPAlertAction *action2 = [SPAlertAction actionWithTitle:@"Destructive" style:SPAlertActionStyleDestructive handler:^(SPAlertAction * _Nonnull action) {
    NSLog(@"点击了Destructive");
}];

ivoidcat avatar Aug 24 '19 02:08 ivoidcat

请问你用的是什么机型

乐升平 许思必客行 中华人民共和国

手机:13879857085 邮箱:[email protected]

电话:000-00000000 地址:上海市浦东新区居里路99号

在2019年08月24日 10:25,ivoidcat[email protected] 写道: SPAlertController *alertController = [SPAlertController alertControllerWithTitle:nil message:nil preferredStyle:SPAlertControllerStyleActionSheet];

alertController.needDialogBlur = _lookBlur;

SPAlertAction *action1 = [SPAlertAction actionWithTitle:@"Default" style:SPAlertActionStyleDefault handler:^(SPAlertAction * _Nonnull action) {

NSLog(@"点击了Default ");

}];

SPAlertAction *action2 = [SPAlertAction actionWithTitle:@"Destructive" style:SPAlertActionStyleDestructive handler:^(SPAlertAction * _Nonnull action) {

NSLog(@"点击了Destructive");

}];

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

SPStore avatar Aug 30 '19 02:08 SPStore