我想动态地将牢房的排入点(即细胞分光)。
困难在于,通过检查其扼制内容,需要检查其高度。
两个问题:
1- 我如何根据扼制的透镜正确确定统一分类的编号?
2- How can I reflect this UIlabel height to row.height because delegate method heightForRowAtIndexPath is called before the cellForRow method?
我确信,这里有些法典是错误的。
Nsstring st= "very long text...";
CGSize theSize = [st sizeWithFont:font constrainedToSize:CGSizeMake(250.0f, MAXFLOAT) lineBreakMode:UILineBreakModeWordWrap];
CGRect cg = CGRectMake(0.0f, 0.0f, 250.0f, theSize.height);
UILabel *label=[[UILabel alloc] initWithFrame:cg];
label.textAlignment=UITextAlignmentLeft;
label.text=st;
[label setNumberOfLines:10];// this is trouble!! how to set this!?
[cell addSubview:label];