ios - stringWithFormat cuts off after %@ -
i'm new this, have created stringwithformat , tried put 2 variables it, string cuts off after first %@
. here's code...
cell.authorview.text = [[nsstring stringwithformat:@"by %@ | %@", [item author], [item category]]uppercasestring];
i've tried taking out second variable, add after first %@
, variable or not, cuts off. doing wrong?
the problem in label, displays text.
1) text can contain \n
, label linescount can set 1 (in case first line visible).
2) text can long, , label cuts string.
so problem in label, can check string ok, via
nslog(@"%@", [[nsstring stringwithformat:@"by %@ | %@", [item author], [item category]]uppercasestring]);
Comments
Post a Comment