Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ec47ff

Browse files
author
Ignacio Romero Zurbuchen
committed
Fixes an auto-layout issue when entering the edit mode
1 parent 44c861e commit 7ec47ff

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

Source/Classes/SLKTextViewController.m

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -700,23 +700,16 @@ - (void)editText:(NSString *)text
700700
// Caches the current text, in case the user cancels the edition
701701
[self slk_cacheTextToDisk:self.textView.text];
702702

703-
if (!SLK_IS_LANDSCAPE) {
704-
[self.textView setText:text];
705-
}
706-
707703
[self.textInputbar beginTextEditing];
708704

709-
// Setting the text after calling -beginTextEditing is safer when on landscape orientation
710-
if (SLK_IS_LANDSCAPE) {
711-
[self.textView setText:text];
712-
}
705+
// Setting the text after calling -beginTextEditing is safer
706+
[self.textView setText:text];
713707

714708
[self.textView slk_scrollToCaretPositonAnimated:YES];
715709

716710
// Brings up the keyboard if needed
717711
[self presentKeyboard:YES];
718712
}
719-
720713
- (void)didCommitTextEditing:(id)sender
721714
{
722715
if (!self.textInputbar.isEditing) {

0 commit comments

Comments
 (0)