1
今日の拡張機能では新しいですが、この警告があります。インスタンスメソッド 'widgetPerformUpdate(completionHandler :)'は、オプションの要件とほぼ一致しています 'widgetPerformUpdate(completionHandler :)'
インスタンスメソッド 'widgetPerformUpdate(completionHandlerは:)' ほぼオプションの要件 'widgetPerformUpdate(completionHandler :)' プロトコルの 'にマッチNCWidgetProviding'
func widgetPerformUpdate(completionHandler: ((NCUpdateResult) -> Void)) {
// Perform any setup necessary in order to update the view.
// If an error is encountered, use NCUpdateResult.Failed
// If there's no update required, use NCUpdateResult.NoData
// If there's an update, use NCUpdateResult.NewData
let result = performFetch()
if result == .newData{
tableView.reloadData()
self.preferredContentSize = tableView.contentSize
}
completionHandler(result)
}
'func widgetPerformUpdate(completionHandler:@escaping(NCUpdateResult) - > void){' – rmaddy
@rmaddy、それが動作します! –