Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

区域选择感觉需要再提供一个代理方法 #18

Open
LittleMango opened this issue Jun 20, 2017 · 0 comments
Open

区域选择感觉需要再提供一个代理方法 #18

LittleMango opened this issue Jun 20, 2017 · 0 comments

Comments

@LittleMango
Copy link

LittleMango commented Jun 20, 2017

目前只有一个代理方法
- (void)pickerArea:(STPickerArea *)pickerArea province:(NSString *)province city:(NSString *)city area:(NSString *)area
这样只能得到"广东深圳南山","重庆开县",由于"广东"和"重庆"都存储在province参数中,所以开发者自己判断也不太好判断。

建议是否可以增加多一个接口,返回较为全面的数据,比如只有一个参数叫做addressDesc,然后存储的是"广东省深圳市南山区","重庆市开县区"?

或者是在原来的接口之后再拼接一个addressDesc参数,就类似第三方地图定位SDK,即可以单独调用省市区的属性获取对应值,又可以通过一个addressDesc获得完整的地理位置描述。

或者是将province、city、area变成STPickerArea类的几个属性,然后摒弃旧的代理方法,换一个新的接口,类似:
- (void)didAddressSelectedInPickerArea:(STPickerArea *)pickerArea;
然后开发者自己通过STPickerArea类对应的属性获取自己想要的数据,以后为STPickerArea增加属性也不用再次修改回调接口?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant