ios - 如何编辑标签

标签 ios soap uilabel

当我向网络服务发送一些值时,我的标签会显示网络服务的一些字段。

StationIDLabel 显示 Web 服务的站点 ID,如 12/345。但我想显示为 12345

didStartElement

if ( [elementName isEqualToString:@"StationID"] ) {
    if (!retornoSOAP) {
        retornoSOAP = [[NSMutableString alloc] init];
    }
    teveRetorno = YES;
  }

didEndElement

  if (

    [elementName isEqualToString:@"StationID"] ) {

    StationIDLabel.text = retornoSOAP;
    retornoSOAP = nil;
    teveRetorno = NO;

 }

 }

最佳答案

试试这个:

    retornoSOAP = [retornoSOAP stringByReplacingOccurrencesOfString:@"/" withString:@""];
    //add above line

    StationIDLabel.text = retornoSOAP;

关于ios - 如何编辑标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16562115/

相关文章:

python - 如何从 suds 请求中获取响应 header

swift - 当 swift 中 tableView 单元格的高度扩展时更改标签文本

ios - iOS中用作系统字体的字体名称是什么

ios - 如何检测路线变化或将路线与带有反应导航的屏幕匹配

javascript - 我们如何使用Javascript单击addeventlistener在Titanium Developer中获取createImageView的图像路径或URL?

ios - 使用 Xcode 进行模拟时,PerformFetchWithCompletionHandler 调用了两次

ios - 未绑定(bind)变量命令 PhaseScriptExecution 失败,退出代码非零

soap - 如何将 WSDL 与 spring-boot 结合使用?

java - 无法读取 com.sun.xml.ws 的工件描述符 :jaxws-rt:jar:2. 2.8 : UnresolvableModelException: Failure to transfer com. sun.xml.ws:bundles:pom

ios - UILabel动态获取字体大小 - swift 3