我刚将我的项目转换为Swift 2,将整个代码转换为新语法。但是,当我尝试构建应用程序时,我收到了Segmentation Fault错误。下面是构建输出。
$( "#datepicker" ).datepicker({
onSelect: function() {
var date = $(this).datepicker('getDate');
if (date.getDate() > 27)
{
$(this).datepicker('setDate', new Date(date.getFullYear(), date.getMonth()+1, 0));
}
}
});
这个错误的原因是什么?我看到它与类型检查有关,但我无法弄清楚原因。我也在使用最新版本的Parse SDK。
答案 0 :(得分:3)
PFQuery.findObjectsInBackgroundWithBlock的方法签名已更改。请参阅:https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/280
将(speakerObjects:[AnyObject]?, error:NSError?) -> Void in
替换为(speakerObjects:[PFObject]?, error:NSError?) -> Void in