所以我有这个代码:
if view.isKindOfClass(classType){...}
Run Code Online (Sandbox Code Playgroud)
这在Swift 2中运行良好,但是现在我在Swift 3中,我得到了这个错误:
类型的值UIView没有成员isKindOfClass
我如何在Swift 3中测试它?
我正在尝试从php获取一个json对象,所以我可以在ajax中使用它.这是我的ajax代码:
$.ajax({
type: 'get',
url: eventsListPath,
dataType : "json",
data: {},
success: function (data) {
$('#eventInformation').html(data.table);
alert(data.table);
}
});
Run Code Online (Sandbox Code Playgroud)
我的PHP:
$obj->table="hey";
echo json_encode($obj, JSON_UNESCAPED_SLASHES);
Run Code Online (Sandbox Code Playgroud)
但行
alert(data.table);
Run Code Online (Sandbox Code Playgroud)
以'undefined'回来.有任何想法吗?