Git Product home page Git Product logo

ymcityselect's Introduction

YMCitySelect

  • 快速集成城市选择框架
  • 支持首字母拼音查找城市、全拼查找城市、字体查找城市
  • 注意:请在info.plist文件里面配置key: NSLocationWhenInUseUsageDescription
  • 通过Modal窗口弹出[[YMCitySelect alloc] initWithDelegate:self],需要传入代理控制器
  • 遵守协议:YMCitySelectDelegate
  • 实现代理方法:-(void)ym_ymCitySelectCityName:(NSString *)cityName

GitHub:iosdeveloperSVIP     邮箱:[email protected]

亲爱的各位同行,如果在使用中出现bug,请联系邮箱:[email protected],如果使用不错的话请帮我点下右上角星星Star,非常感谢

操作目录


安装使用

使用 CocoaPods安装

pod 'YMCitySelect'

手动导入文件

  • 将YMCitySelect文件夹中的所有源代码拽入项目中
  • 【导入主头文件:#import "YMCitySelect.h"

一行代码集成


[self presentViewController:[[YMCitySelect alloc] initWithDelegate:self] animated:YES completion:nil];

//通过Modal弹出城市控制器,并传入代理控制器
YMCitySelectDelegate //请遵守协议
-(void)ym_ymCitySelectCityName:(NSString *)cityName
//请实现代理方法cityName就是返回的城市名

亲爱的各位同行,如果你已经浏览到这,请帮我点下右上角星星Star,非常感谢

ymcityselect's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ymcityselect's Issues

pod下来后bundle中的图片加载不到

需要写一个获取bundle的方法(我自己补充了,供予参考):
#pragma mark - 获取bundle地址
/** 获取YMCitySelect.bundle路径 */

  • (NSBundle *)getYMCitySelectBundle{
    static NSBundle *searchBundle = nil;
    if (searchBundle == nil) {
    // 默认使用[NSBundle mainBundle]
    searchBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"YMCitySelect" ofType:@"bundle"]];
    // 如果使用pod导入,并且在Podfile中配置use_frameworks!则[NSBundle mainBundle] 加载不到YMCitySelect.framework中的YMCitySelect.bundle资源文件
    if (searchBundle == nil) { // 为空说明资源文件在YMCitySelect.framework中
    searchBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[YMCitySearch class]] pathForResource:@"YMCitySelect" ofType:@"bundle"]];
    }
    }
    return searchBundle;
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.