I will do the following method in viewController
-(void)setupDocsLabel:(NSMutableArray *)documents{ self.lDocumentos.frame = CGRectMake(self.lDocumentos.frame.origin.x, kFirstLabelYPosition+actualLabelYPos,self.lDocumentos.frame.size.width,lDocumentos.frame.size.height); self.Documentos.frame = CGRectMake(self.Documentos.frame.origin.x, kFirstLabelYPosition+actualLabelYPos,self.Documentos.frame.size.width,self.Documentos.frame.size.height); actualLabelYPos +=20.0; for (DocInformation *doc in documents) { NSString *textLabel = [doc.documentDescription stringByAppendingString:@" :"]; UIFont *lblFont = lDocumentos.font; CGSize sizeFont = [textLabel sizeWithFont:lblFont forWidth:120.0 lineBreakMode:NSLineBreakByTruncatingTail]; UILabel *label = [[[UILabel alloc] initWithFrame:CGRectMake(lDocumentos.frame.origin.x+20, kFirstLabelYPosition+actualLabelYPos,sizeFont.width,sizeFont.height)] retain]; label.text = textLabel; [label setFont:lblFont]; [label setTextColor:lDocumentos.textColor]; [label setBackgroundColor:[UIColor clearColor]];
New shortcuts add to scrollView well, but self.lDocumentos (IBOutlet.xib) does not change its position.
Thanks for the help!
source share