I am creating the label programmatically with dynamic text, and next to label one more textview is present which is dynamic content, and next to text view there is an imageview. These three are not aligning correctly, _textView = [[[JSTwitterCoreTextView alloc] initWithFrame:CGRectMake(10,60,self.view.frame.size.width,130)] autorelease]; _textView.textColor=[UIColor whiteColor]; _textView.linkColor=[UIColor lightTextColor]; [self.view addSubview:_textView]; CGFloat Lsize=_textView.bounds.size.height+_textView.bounds.origin.y; //CGFloat width = [UIScreen mainScreen].bounds.size.width - 50; //CGFloat height = [self textHeight:text] + 10; //CGRect frame = CGRectMake(10.0f, 10.0f, width, height); startLine=[[UILabel alloc]initWithFrame:CGRectMake(0,Lsize, 320, 2)]; [self.view addSubview:startLine]; (责任编辑:) |