El texto no se muestra en UILabel cuando el texto es demasiado grande.
Tengo un texto (Cuento de un libro). Estoy tomando UILabel para mostrarlo. Pero no me está mostrando a la vista. Estoy usando el siguiente código:
CGSize labelsize;
UILabel *commentsTextLabel = [[UILabel alloc] init];;
[commentsTextLabel setNumberOfLines:0];
commentsTextLabel.textColor = [UIColor blackColor];
[commentsTextLabel setBackgroundColor:[UIColor clearColor]];
[commentsTextLabel setFont:[UIFont fontWithName:@"ACaslonPro-Regular"size:17]];
labelsize=[story sizeWithFont:commentsTextLabel.font constrainedToSize:CGSizeMake(280, 15000) lineBreakMode:NSLineBreakByWordWrapping];
commentsTextLabel.frame=CGRectMake(20, 200, 280, labelsize.height);
commentsTextLabel.text = story;// more than 1000 lines
[self.view addSubview:commentsTextLabel];
Cuando depuro mi código, encontré labelsize.height sale en mi caso 13145. Todavía no se muestra. Si desciendo de 15000 a 11000, el texto se muestra en la vista con ... por fin.
labelsize = [story sizeWithFont: commentsTextLabel.font restricinedToSize: CGSizeMake (280, 15000) lineBreakMode: NSLineBreakByWordWrapping];
Por favor, ayúdame. Gracias