Home  >  Q&A  >  body text

ios 地区选择控件 传到另一个页面怎么是数字?

ios 地区选择控件 传到另一个页面怎么是数字?

传值过来


怎么变成数字了?

PHP中文网PHP中文网2741 days ago251

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-04-17 17:34:21

    else

    {
        if ([personInfo.district isEqualToString:@"0"]||[personInfo.district isEqualToString:@""]) {
            CD_StateRegional *stateDistrict = [CD_StateRegional MR_findFirstWithPredicate:[NSPredicate predicateWithFormat:@"city_code = %@",personInfo.city]];
            labProvince.text = [NSString stringWithFormat:@"%@ %@",stateDistrict.province_name,stateDistrict.city_name];
        }
        else
        {
            CD_StateRegional *stateDistrict = [CD_StateRegional MR_findFirstWithPredicate:[NSPredicate predicateWithFormat:@"district_code = %@",personInfo.district]];
            labProvince.text = [NSString stringWithFormat:@"%@ %@ %@",stateDistrict.province_name,stateDistrict.city_name,stateDistrict.district_name];
        }
    }

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 17:34:21

    It depends on how the functions related to the regional control you are using are implemented. It is possible that 14 corresponds to Shanxi, 10 corresponds to Linfen, and 31 corresponds to X County.

    reply
    0
  • PHPz

    PHPz2017-04-17 17:34:21

    Are the parameters you passed incorrect?

    reply
    0
  • Cancelreply