zoukankan      html  css  js  c++  java
  • iOS开发之地域选择

        代码地址:

    https://github.com/boundlessocean/AreaPickViewDome.git

        

        效果:

     

     

    第一步: 将BLAreaPickerView

    导入工程

     

     
     

    第二步: 设置代理

    @interface LHQNewAddCustomersCtrl ()<BLPickerViewDelegate>

     

     

    第三步: 在需要显示控件的地方初始化

     

    - (void)dataBtnClicked1{

        _pickView = [[BLAreaPickerView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 150)];

        _pickView.pickViewDelegate = self;

        [_pickView bl_show];

    }

     

     

    第四步: 实现代理方法,给按钮赋值

     

     

    #pragma mark - - BLPickerViewDelegate

    - (void)bl_selectedAreaResultWithProvince:(NSString *)provinceTitle city:(NSString *)cityTitle area:(NSString *)areaTitle{

    //    NSLog(@"%@,%@,%@",provinceTitle,cityTitle,areaTitle);

        NSString *areaStr = [NSString stringWithFormat:@"%@%@%@",provinceTitle,cityTitle,areaTitle];

        _areaStr = areaStr;

        [_dataBtn1 setTitle:_areaStr forState:UIControlStateNormal];

    }

     

     

     

     

     

                  李洪强

     

            2017年6月14日于北京

     

     

     

     
  • 相关阅读:
    Python pip – error: invalid command ‘bdist_wheel’
    css实现文字两端对齐(兼容所有浏览器)
    webpack中的require.context
    node 的path模块中 path.resolve()和path.join()的区别
    react-native项目中遇到的问题
    react-native针对android改变状态栏样式
    createBottomTabNavigator: 怎么在切换tab的时候让页面重新渲染
    当vue页面异步加载的数据想在页面上渲染怎么办
    git分布式版本控制系统
    $router和$route的区别,路由跳转方式name 、 path 和传参方式params 、query的区别
  • 原文地址:https://www.cnblogs.com/LiLihongqiang/p/7009635.html
Copyright © 2011-2022 走看看