Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.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/1/angular/31.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
如何在平台IOS Nativescript中使用GridLayout CODRECT_Ios_Angular_Nativescript_Grid Layout - Fatal编程技术网

如何在平台IOS Nativescript中使用GridLayout CODRECT

如何在平台IOS Nativescript中使用GridLayout CODRECT,ios,angular,nativescript,grid-layout,Ios,Angular,Nativescript,Grid Layout,我有这个密码。在android中工作得很好,在IOS中我无法更改地图 <GridLayout class="page"> <GridLayout columns="*" rows="*,auto,auto"> <StackLayout col='0' row='0'> <MapView class="map" (mapReady)="onMapReady1($event)" (mar

我有这个密码。在android中工作得很好,在IOS中我无法更改地图

<GridLayout class="page">
        <GridLayout columns="*" rows="*,auto,auto">
            <StackLayout col='0' row='0'>
                <MapView class="map" (mapReady)="onMapReady1($event)" (markerSelect)="onMarkerSelect($event)"
                    (cameraChanged)="onCameraChanged($event)"></MapView>
            </StackLayout>
            <StackLayout class="input-field" col='0' row='0' style="margin-top: 10">
                <GridLayout columns="*,*" rows="*">
                    <StackLayout col='0' row='0'>
                        <DropDown itemsTextAlignment="center" itemsPadding="10" title="Comune di:" hint="Comune di:"
                            [items]="citiess" (selectedIndexChanged)="onchangecity($event)" (opened)="onopen()"
                            (closed)="onclose()"
                            style="background-color: rgba(255, 255, 255, 0.918); border-color:slategray; padding: 3%;
                            font-size: 18; color: rgb(70, 70, 70); size: 14px; margin-left: 6%; margin-top: 0.7%; border-style: solid; text-align: center;">
                        </DropDown>
                    </StackLayout>
                </GridLayout>
            </StackLayout>
        </GridLayout>
    </GridLayout>

当我在GridLayout外放置下拉菜单时,我可以更改地图,但我想在地图上放置一个调用下拉菜单的按钮


你知道吗?

你的
堆栈布局
覆盖在整个
地图视图上。在iOS中,所有最上面的视图都阻止事件在下面传播。因此,只有
MapView
之后最顶端的
StackLayout
接收您的单击/拖动事件,即使您没有明确地侦听它

您只需让
下拉列表
元素具有所需的精确宽度和高度,并使用边距将其对齐即可。这将防止在
地图视图
上覆盖任何其他内容


旁注:如果您只想覆盖其他元素,同时保持底部元素的可交互性,则可以向覆盖元素添加
isUserInteractionEnabled=“false”

谢谢您的回答。我试着在这里
地图工作,但下拉菜单不工作。我想用下拉菜单和地图阅读第二段。您应该将下拉元素直接作为固定大小的GridLayout的第二个子元素。没有堆叠布局。然后使用边距将其正确对齐。