Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - Only first line of text is viewable

In two places in our app the text that the user types in only shows first line of text. Both occurances are in external frameworks, first in UIActivityView, the other in Freshdesk MobiHelp.

First, with UIActivityView, when using Twitter:

The problem is that if the text goes beyond one row in the modal, the text goes transparent:

screenshot

NSString *textToShare = [NSString stringWithFormat:NSLocalizedString(@"CHALLENGE-TWITTER-  DEFAULT-TEXT", nil), [UserManager currentUser].displayName];
NSString *urlToShare = [NSURL URLWithString:@"http://example.com"];
NSArray *activityItems = @[textToShare, urlToShare];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion:nil];

Second, in Freshdesk submit a ticket: screenshot

I should also add that the Facebook modal from UIActivityView works just fine: screenshot

Would really appreciate any tips here, as I'm lost.

like image 436
Hans N. Hjort Avatar asked Jan 08 '13 21:01

Hans N. Hjort


1 Answers

I think in the second sreenshot that you have attached here, there is a white screen over a red area which probably might be your label or the text area and I guess its blocking your text area. If the view was added by you, you can get the particular text area to front so that its not blocked and you can see your text. Hope this helps

enter image description here Can you see a white box inside the one I highlighted? There is some view over your textarea. How are you adding your textarea? As a subview?? Can you just get log the main views subviews?? Like

NSLog (@"%@",[self.view subviews]);

And now check the view hierarchy.

like image 162
Meera Avatar answered Oct 04 '22 10:10

Meera