我想使用参数初始化func downloadChapter(notification : NSNotification){
//fetch on different thread
let qos = Int(QOS_CLASS_USER_INITIATED.value)
dispatch_async(dispatch_get_global_queue(qos, 0), {
//download here
//back to main thread
dispatch_async(dispatch_get_main_queue(), {
//if there is something more you wanna do or you can just go back
})
})
}
@IBAction func downloadBarButton(sender: AnyObject) {
var obtainedMangaNameArray = [self.obtainedMangaName]
let userInfo = ["downloadList" : self.selectedChapters , "mangaName" : obtainedMangaNameArray]
var sdfs = DownloadHandler()
let notification = NSNotification(name: "downloadListNotification", object: DownloadRequestListViewController.self, userInfo: userInfo)
sdfs.downloadChapter(notification)
//NSNotificationCenter.defaultCenter().postNotification(notification)
}
的子类,但是我的UIButton
方法出现EXC_BAD_INSTRUCTION
错误:
init(create: ; coder:)