CurrentItem在iOS上不起作用,但在Android上却起作用

时间:2019-12-23 18:07:59

标签: c# xamarin mobile

import org.apache.spark.sql.expressions.Window val df = Seq( (24, "Dev", "Sales", 30, "0"), (24, "Dev", "Sales", 40, "0"), (24, "Dev", "Sales", 20, "0"), (24, "Dev", "Sales", 10, "0"), (24, "Dev", "HR", 30, "0"), (24, "Dev", "HR", 20, "0"), (24, "Dev", "Retail", 50, "0"), (24, "Dev", "Retail", 50, "0") ).toDF("job_id", "job_name", "department", "age", "old") val w = Window.partitionBy($"job_id", $"job_name", $"department").orderBy($"job_id") val dfOut = df.withColumn("sum_age", sum(col("age")).over(w)) .withColumn("old", when($"sum_age" === lit(100), lit("X")).otherwise($"old")) .drop($"sum_age") dfOut.show() +------+--------+----------+---+---+ |job_id|job_name|department|age|old| +------+--------+----------+---+---+ | 24| Dev| HR| 30| 0| | 24| Dev| HR| 20| 0| | 24| Dev| Retail| 50| X| | 24| Dev| Retail| 50| X| | 24| Dev| Sales| 30| X| | 24| Dev| Sales| 40| X| | 24| Dev| Sales| 20| X| | 24| Dev| Sales| 10| X| +------+--------+----------+---+---+ 在iOS上不起作用,但在Android上却起作用,我正在使用xamarin。 这是我的代码:

CurrentItem

启动此异常:

Shell.Current.CurrentItem = new MyPageTest();

有什么方法可以更改CurrentItem吗?

1 个答案:

答案 0 :(得分:0)

解决了,我从项目中删除了Xamarin.forms,并再次从nuget中安装了它。并且此代码Shell.Current.CurrentItem = new MyPageTest();是正确的,但是没有得到我通过await Shell.Current.GoToAsync("//myshellapproot/shellcontentview");更改的正确结果