UIAlertAction 改變字體顏色

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle: UIAlertControllerStyleActionSheet];it

                

                UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {io

                    

                }];im

                

                UIAlertAction *allAction = [UIAlertAction actionWithTitle:@"看所有" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {animate

                    

                }];handler

                

               [allAction setValue:[UIColor YXColorWithHexCode:@"#181615"] forKey:@"_titleTextColor"];co

                

                UIAlertAction *womanAction = [UIAlertAction actionWithTitle:@"只看女" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {let

                    

                }];message

                [womanAction setValue:[UIColor YXColorWithHexCode:@"#181615"] forKey:@"_titleTextColor"];

                UIAlertAction *manAction = [UIAlertAction actionWithTitle:@"只看男" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

                    

                }];

                [manAction setValue:[UIColor YXColorWithHexCode:@"#181615"] forKey:@"_titleTextColor"];

                [alertController addAction:allAction];

                [alertController addAction:womanAction];

                [alertController addAction:manAction];

                [alertController addAction:cancelAction];

 

                [self presentViewController:alertController animated:YES completion:nil];

相關文章
相關標籤/搜索