ios - Unicode non-breaking space is removed end of label -


i'm using tableview , use 1 cell create many columns.my column number not fixed had create columns using loop inside cellforrowat function.i want give spaces between labels inside cell.this piece of code succesfully inserts non-breaking spaces head of label removes end of label.thanks help.

        let spaces = string(repeating:"\u{00a0}",count : columnspacecount)         if globalsubviewheaderstructarray[i].type == "numeric"{             if globalsubviewheaderstructarray[i].digitsaftercomma != "0" {                 var datanumber = applycomma(comma : globalsubviewheaderstructarray[i].digitsaftercomma , data : globalsubviewdataarray[indexpath.row][i])                 var newstring = "\(spaces)\(checkcurrency(option: globalsubviewheaderstructarray[i].currency, data: datanumber))\(spaces)"                 newlabel.text = newstring             }else{                 var newstring = "\(spaces)\(checkcurrency(option: globalsubviewheaderstructarray[i].currency, data: globalsubviewdataarray[indexpath.row][i]))\(spaces)"                 newlabel.text = newstring             }         }else{             var newstring = "\(spaces)\(checkcurrency(option: globalsubviewheaderstructarray[i].currency, data: globalsubviewdataarray[indexpath.row][i]))\(spaces)"             newlabel.linebreakmode = .bytruncatingmiddle             newlabel.text = newstring         } 

i want give spaces between labels inside cell

don't messing content of label. messing position / size of labels themselves. insert actual space (that is, empty pixels) between labels.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -