将 json 数组从一个视图控制器传递到另一个视图控制器时,我在第二个视图控制器数组中得到 'nil' 值
While passing an json array from one view controller to another,I'm getting 'nil' value in second view controller array
很抱歉重复这个问题,但我不确定我的代码出了什么问题,谁能帮我清除那个错误。
下面我附上了我的代码片段以进行更多说明。
this is my first viewController
在我的 firstViewController 中,我有一个存储子数组的变量,我将它传递给 secondViewController 中的一个变量。
下面是 secondViewControllers 片段。
SecondViewController
在我的 secondViewController 中,我的 Variable 值变成了 bill。
当我传递它有一个值数组时
当我在我的 secondViewController 中访问该变量时,它会显示账单值。
从您的代码中删除 return 和 else 部分,
检查StationDetails.isEmpty时。
将您的代码嵌入到 Whosebug 中也比
要使用外部链接。
很抱歉重复这个问题,但我不确定我的代码出了什么问题,谁能帮我清除那个错误。
下面我附上了我的代码片段以进行更多说明。
this is my first viewController
在我的 firstViewController 中,我有一个存储子数组的变量,我将它传递给 secondViewController 中的一个变量。 下面是 secondViewControllers 片段。
SecondViewController
在我的 secondViewController 中,我的 Variable 值变成了 bill。 当我传递它有一个值数组时 当我在我的 secondViewController 中访问该变量时,它会显示账单值。
从您的代码中删除 return 和 else 部分, 检查StationDetails.isEmpty时。
将您的代码嵌入到 Whosebug 中也比 要使用外部链接。