2011-07-21 23 views
1

私のUITextViewに問題があります。 何か入力しようとすると、UITextViewがフレームを超えて上がり、何もしないようです。どうしてこれなの?UITextViewの奇妙な問題

いくつかのスクリーンショット:

私は最初の単語を入力する場合:

enter image description here

その後、別の単語を入力し、それはシフトアップ、私はものを見ることができない。

enter image description here

コード:

self.messageTextView = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, 600, 30)]; 
    [self.messageTextView setAutocorrectionType:UITextAutocorrectionTypeNo]; 
    [self.messageTextView setAutocapitalizationType:UITextAutocapitalizationTypeNone]; 
    [self.messageTextView setFont:[UIFont fontWithName:@"ArialMT" size:16.0]]; 
    self.messageTextView.delegate = self; 
+0

UITextViewDelegateメソッドで何かしていますか?すなわちtextDidChange?新しい単語を入力するときは、新しい単語を入力しますか? – sosborn

答えて

1

あなたはtextView.contentInset = UIEdgeInsetsZero;

+0

これは私が探しているものです!ありがとう – adit

+0

乾杯!ようこそ! – EmptyStack

0

があなたのフレームに大きな高さを与え、しようとしました

self.messageTextView = [[UITextViewのalloc] initWithFrame:CGRectMake(0、0、600、80)];