繁体   English   中英

使用未解析的标识符'UIMutableUserNotificationAction'

[英]Use of unresolved identifier 'UIMutableUserNotificationAction'

我有一个单独的Singleton类,包含LocalNotification注册和Action设置代码。 我正进入(状态

Use of unresolved identifier error

添加了所有类到XCTest目标。

在此输入图像描述

只需导入UIKit框架

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        let mutNotification = UIMutableUserNotificationAction()
        mutNotification.identifier = "Y"
    }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM