Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 财产';X';类型为';Y';无法重写类型为';Z';_Swift - Fatal编程技术网

Swift 财产';X';类型为';Y';无法重写类型为';Z';

Swift 财产';X';类型为';Y';无法重写类型为';Z';,swift,Swift,我的代码报告了以下错误: struct BottomTabChildren: HandyJSON { var schema_href: String = "" // sslocal://webview?url=http%3A%2F%2Fwww.guanfumuseum.org.cn%2F var type: String = "" // href var name: String = "" var value: String = "" // http:/

我的代码报告了以下错误:

 struct BottomTabChildren: HandyJSON {

    var schema_href: String = "" // sslocal://webview?url=http%3A%2F%2Fwww.guanfumuseum.org.cn%2F

    var type: String = "" // href

    var name: String = ""

    var value: String = "" // http://www.guanfumuseum.org.cn/
 }
类型为“[BottomTabChildren]”的属性“children”无法重写 类型为“[UIViewController]”的属性

我的错误代码:

var children = [BottomTabChildren]()
相关代码:

 struct BottomTabChildren: HandyJSON {

    var schema_href: String = "" // sslocal://webview?url=http%3A%2F%2Fwww.guanfumuseum.org.cn%2F

    var type: String = "" // href

    var name: String = ""

    var value: String = "" // http://www.guanfumuseum.org.cn/
 }

super
类中,有一个名为
children
的属性,类型为
[UIViewController]
,因此不应使用相同的名称声明另一个类型。将
[BottomTabChildren]
属性重命名为

var tabChildren = [BottomTabChildren]()

欢迎来到stackoverflow。请编辑问题的标题和主体,更好地描述您试图做什么以及何时出现此错误。检查帮助中心中的“如何提出好问题”: