2016-07-05 38 views
-1

我有一個TextView &一個textFileViewController 當我點擊我的textFile,我的iPhone沒有任何問題 但我的模擬器將下來, ,如果我點擊「Tab」它會再次下來, 它結束了我設置的導航控制器, 有沒有人知道發生了什麼?的UITextView會踏踏實實當我點擊文本框

就這樣,黑色區域是我的問題

enter image description here

回答

0

你可以張貼的代碼段,其中模擬器死機或「下降」?

奇怪的是,它不能在模擬器上工作,並且在設備上工作,通常是相反的:p。您可以重置模擬器的內容(模擬器 - >重置內容...)或刪除並重建應用程序。

0

我發現我的問題是在模擬器的鍵盤..

我取消了hardware > Keyboard > Connect Haredware Keyboard 那麼它就沒問題 正是因爲這個

-(void) keyboardDidShow: (NSNotification *) notification { 
    NSValue * value = [[notification userInfo] valueForKey:UIKeyboardFrameBeginUserInfoKey]; 
    CGFloat keyboardHeight = [value CGRectValue].size.height; 
    [UIView animateWithDuration:0.3f animations:^ 
     { 
     CGRect frame = self.view.frame; 
     frame.origin.y -= keyboardHeight; 
     self.view.frame = frame; 
     } 
    ]; 
}