Xamarin.ios 在Prism中导航到的ON不';不能从其中一页触发

Xamarin.ios 在Prism中导航到的ON不';不能从其中一页触发,xamarin.ios,xamarin.forms,prism,Xamarin.ios,Xamarin.forms,Prism,我在棱镜中面对着OnNavigatedTo的奇怪行为。它总是在安卓系统上运行,但在iOS系统上,它对其中一个页面不起作用。见代码: private void OnSpecialtyTapped() { _navigationService.NavigateAsync($"{nameof(SpecialtyFilterPage)}", useModalNavigation: false); } private void OnLocation

我在棱镜中面对着OnNavigatedTo的奇怪行为。它总是在安卓系统上运行,但在iOS系统上,它对其中一个页面不起作用。见代码:

private void OnSpecialtyTapped()
        {
            _navigationService.NavigateAsync($"{nameof(SpecialtyFilterPage)}", useModalNavigation: false);
        }

private void OnLocationTapped()
        {
            _navigationService.NavigateAsync($"{nameof(PlacesFilterPage)}", useModalNavigation: false);
        }


private void OnTakeChosenSpecialties()
        {
            var parameters = new NavigationParameters
            {
                //{"ChosenSpecialtiesIds", CheckedSpecialties.Select(s => s.Id).ToList()}
            };

            _navigationService.GoBackAsync(parameters);
        }

private void OnTakeChosenPlaces()
        {
            var parameters = new NavigationParameters
            {
                //{"ChosenPlaces", CheckedPlaces.Select( p => new Models.PlaceParameter {Id=p.Id, Type=Convert.ToString(p.Type)}).ToList()}
            };

            _navigationService.GoBackAsync(parameters);
        }

public void OnNavigatedTo(NavigationParameters parameters)
        {
            if ( parameters.ContainsKey("ChosenSpecialtiesIds") )
            {
                var chosenSpecialtiestIds = parameters["ChosenSpecialtiesIds"] as List<string>;
                if ( chosenSpecialtiestIds == null ) return;
                _filter.Services.Clear();

                foreach ( var specialtiestId in chosenSpecialtiestIds )
                {
                    _filter.Services.Add(new ServiceParameter { Id = specialtiestId });
                }
            }
            else if ( parameters.ContainsKey("ChosenPlaces") )
            {
                var chosenPlaces = parameters["ChosenPlaces"] as List<PlaceParameter>;
                if ( chosenPlaces == null ) return;
                _filter.Places.Clear();

                _filter.Places = chosenPlaces;
            }

        }
private void OnSpecialtyTapped()
{
_navigationService.NavigateAsync($“{nameof(SpecialtyFilterPage)}”,useModalNavigation:false);
}
私有void OnLocationTapped()
{
_navigationService.NavigateAsync($“{nameof(PlacesFilterPage)}”,useModalNavigation:false);
}
关于Takechosenspecialties()的私人无效
{
var参数=新的导航参数
{
//{“chosenspecialtiesid”,选中Specialistes.Select(s=>s.Id.ToList()}
};
_GoBackAsync(参数);
}
私有void ontakechosensplaces()
{
var参数=新的导航参数
{
//{“ChosenPlaces”,选中places.Select(p=>newmodels.PlaceParameter{Id=p.Id,Type=Convert.ToString(p.Type)}).ToList()}
};
_GoBackAsync(参数);
}
public void OnNavigatedTo(NavigationParameters)
{
if(parameters.ContainsKey(“ChosenSpecialtiesIds”))
{
var chosenspecialtids=参数[“ChosenSpecialtiesIds”]作为列表;
if(chosenspecialtides==null)返回;
_filter.Services.Clear();
foreach(CHOSENSPECIALTITEDS中的特殊变量)
{
_filter.Services.Add(新服务参数{Id=specialtiestId});
}
}
else if(parameters.ContainsKey(“ChosenPlaces”))
{
var chosenPlaces=参数[“chosenPlaces”]作为列表;
if(chosenPlaces==null)返回;
_filter.Places.Clear();
_filter.Places=chosenPlaces;
}
}

它适用于Speciality,而不适用于带有Places的iOS。我使用的是Prism 6.2.0和Xamarin.Forms 2.3.3.193。由于某些错误,我无法使用较新版本。

您能否提供更多详细信息,如复制问题的示例链接?@DanS。在这里,您可以找到更多细节:正如Brian在该线程中已经指出的,以及我在前面的评论中指出的,您需要提供一个复制该问题的示例。“如果没有人能重现这个问题,那就很难帮助你了。”丹斯。请看Xamarin论坛的进展。你真的应该专注于在这里或那里获得帮助。同样,您需要复制问题的样本。