jjzjj

placesClient

全部标签

swift - placesClient - 正确使用 sharedClient 方法?

placesClient给出了持有nil值的错误,在阅读了googleplaces文档后我读到了这个声明:Thisclassshouldbeaccessedthroughthe[GMSPlacesClientsharedClient]method.我想知道如何实现sharedClient方法以便根据placesID搜索给定地点的信息?varplacesClient:GMSPlacesClient!funclookUpPlaceID(){letplaceID="ChIJPXw5JDZM6IAR4rTXaFQDGys"//WhatvalueshouldplacesClientbeholdi