Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS - Row in UITableView contents getting truncated
    primarykey
    data
    text
    <p>I am developing an iOS Application which has an UITableview. There are three items which needs to be displayed in each of the rows in the UITableview. </p> <p>The data to the table is fetched from the web server as a JSON object. All is working fine and I am happy except 2 issues which I am facing. </p> <p>ISSUE 1: The first component in a row is a Label and this label is not displaying the data completely. The label is configured to be multiline (currently with 7 lines). But sometime only one word comes into this label. In that case there is a lot of blank space between the label which is component 1 and component 2 which is again an label. If I configure this label to be single line and if the length of the label content is more, then this row gets displayed as below</p> <p>a quick brown fox jumps over…</p> <p>The sentence gets truncated and ends with three dots. Any idea how to adjust the height of this label dynamically based on the length of the contents in the label without changing the font size and as a result the row size [wrt table] also gets changed .</p> <p>ISSUE 2: This is with respect to the third component in the row. The issue is similar to issue one but very complex in nature compared to ISSUE1. This also mainly deals with truncation. The template which I designed for this component is like below</p> <p>SD contact name1 [SD contact number]-->SD contact name2 [SD contact number2]</p> <p>where SD is Service Desk FYI</p> <p>In actual not all four details are available. </p> <p>If service is closed, Only SD contact name1 should appear like below</p> <p>SD contact name</p> <p>But I am getting like below in actual</p> <p>SD.. [ ]--> [ ]</p> <p>SD contact name1 is truncated to SD.. and empty brackets appear.</p> <p>If service is open and is in second level , I need this component to appear as below</p> <p>SD contact name1 --> SD contact name2[+34434344]. But I am getting like below</p> <p>SD..[ ]--> SD..[+33..]</p> <p>Again, empty brackets and truncated data.</p> <p>How to make the brackets and square invisible. Is there a delegate method available where OI can make them disappear based on some condition.</p> <p>With respect to truncation, I tried the method <strong>adjustsFontSizeToFitWidth</strong> But the font size gets reduced and I am unable to read the sentence or the phone numbers. is there a good way of handling this issue. Thanks for your support.<img src="https://i.stack.imgur.com/z2Lmw.png" alt="enter image description here"></p> <p>I have attached the storyboard for your reference. Thanks for your help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload