From e44000c88418a93badcd18b3b3d7684f7e87eb36 Mon Sep 17 00:00:00 2001 From: Andrew Yang Date: Wed, 10 Sep 2014 21:31:01 +0800 Subject: [PATCH 1/2] Fix: MultilineElment text value won't update Fix: MultilineElment text value won't update in iPhone. Issue: 1, Start the sample with iPhone(device or simulator), go to "Sample Controls" -> "Multiline". 2, Type some words and back. Expected: The label right to "Multiline" should show some of words typed in the step 2. Actually: There is nothing updated, the label in the right is blank. --- quickdialog/QMultilineElement.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickdialog/QMultilineElement.m b/quickdialog/QMultilineElement.m index 990c4ee2..474a895a 100644 --- a/quickdialog/QMultilineElement.m +++ b/quickdialog/QMultilineElement.m @@ -68,7 +68,7 @@ - (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogContro __weak QMultilineTextViewController *weakTextController = textController; textController.willDisappearCallback = ^ { weakSelf.textValue = weakTextController.textView.text; - [[tableView cellForElement:weakSelf] setNeedsDisplay]; + [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:NO]; [tableView deselectRowAtIndexPath:indexPath animated:YES]; }; [controller displayViewController:textController withPresentationMode:self.presentationMode]; From a867e90f06f574ecd889f63a47a950575e9f1343 Mon Sep 17 00:00:00 2001 From: Andrew Yang Date: Sun, 14 Sep 2014 00:56:09 +0800 Subject: [PATCH 2/2] Fix: The multiline text view controller won't Fix: the multiline text view controller won't return in the iPhone(no close button, neither cancel button). --- quickdialog/QMultilineElement.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickdialog/QMultilineElement.m b/quickdialog/QMultilineElement.m index 474a895a..0e19f3ac 100644 --- a/quickdialog/QMultilineElement.m +++ b/quickdialog/QMultilineElement.m @@ -22,7 +22,7 @@ @implementation QMultilineElement - (QEntryElement *)init { self = [super init]; if (self) { - self.presentationMode = QPresentationModePopover; + self.presentationMode = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)?QPresentationModeModalForm:QPresentationModePopover; } return self; @@ -32,7 +32,7 @@ - (QMultilineElement *)initWithTitle:(NSString *)title value:(NSString *)text { if ((self = [super initWithTitle:title Value:nil])) { self.textValue = text; - self.presentationMode = QPresentationModePopover; + self.presentationMode = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)?QPresentationModeModalForm:QPresentationModePopover; } return self; }