实现隐藏view但不占位置的需求是很常见的(Android里的view.GONE),可iOS里并没有这玩意,只有hidden.于是自己写了一个一般情况下用的category,特殊情况就得看情况做了.其实做法很简单,增加长宽变零的约束就好了.(最好把别的约束优先级调低,否则会报"Probably at least one of the constraints in the following list is one you don't want"的警告,但是不加也可以实现效果)问题是怎么…
写在前面:android中使用地理位置功能,可以借助Google给我们提供的框架,要是有地理位置功能,你需要引用Google Play Services,请在sdk manager中下载.如果你还要使用地图功能,请到google官网申请api-key 如果要看官方例子可以到https://github.com/googlesamples/android-play-location.git下载 使用Google地理服务都需要如下, 引用Google Play Services <meta-data…