Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to print multiple value on UILabel horizontally in iPhone
    primarykey
    data
    text
    <p>hi friend i now if i use this code it will print multiple value on label but in new line i not want like </p> <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { CGSize labelSize = CGSizeMake(200.0, 20.0); if ([displayTag length] &gt; 0) labelSize = [displayTag sizeWithFont: [UIFont boldSystemFontOfSize: 17.0] constrainedToSize: CGSizeMake(labelSize.width, 1000) lineBreakMode: UILineBreakModeWordWrap]; return 24.0 + labelSize.height; } return 40.0; } </code></pre> <p>this code will print vertical line but i want to print my value on label horizontally how to give multiple value for print on label horizontally on particular cell</p> <p>for that i was create that but is not working where i am wrong this code in my custom cell</p> <pre><code>TagsLable= [[UILabel alloc]initWithFrame:CGRectMake(360, 15, 150, 21)]; TagsLable.font = [UIFont fontWithName:@"Verdana" size:16.0f]; TagsLable.textAlignment=UITextAlignmentRight; TagsLable.backgroundColor=[UIColor clearColor]; CGSize fontSize = [tagList sizeWithFont: [UIFont boldSystemFontOfSize: 17.0]]; double finalWidth = fontSize.width * UIBaselineAdjustmentAlignBaselines; //double finalWidth = fontSize.width + self.numberOfLines; double finalHeight = self.frame.size.height; //expected height of label CGSize theStringSize = [tagList sizeWithFont: [UIFont boldSystemFontOfSize: 17.0] constrainedToSize:CGSizeMake(finalWidth, finalHeight) lineBreakMode: UILineBreakModeWordWrap]; int newLinesToPad = (finalWidth - theStringSize.width) / fontSize.width; for(int i=0; i&lt;newLinesToPad; i++) { //tagList = [tagList stringByAppendingString:@","]; tagList=[tagList stringByAppendingFormat:@"%@, ",tag.TagName]; } </code></pre>
    singulars
    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.
 

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