我使用动态文本以编程方式创建标签,并在标签旁边显示了另一个textview,它是动态内容,文本视图旁边有一个imageview。这三个不对齐正确,iphone objective-c以编程方式创建标签
_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];
是以编程方式编程 – 2012-03-14 14:44:07