andreamazz / AMBubbleTableView

AMBubbleTableView
MIT License
214 stars 40 forks source link

iOS7 (when compiled with XCode 5) - 2 issues #12

Closed alexeyndru closed 11 years ago

alexeyndru commented 11 years ago
  1. The textView grows at each letter typed and not only at pressing the return key
  2. The animation of the textView at keyboard reveal/dismiss is very strage: it jumps 2 times before sitting at its frame.
vutrongtung commented 11 years ago

1.The textView grows at each letter typed and not only at pressing the return key -in setupview change [self.textView setScrollEnabled:NO]; => //[self.textView setScrollEnabled:NO]; -in resizeTextViewByHeight change self.textView.scrollEnabled = (numLines >= 4); => //self.textView.scrollEnabled = (numLines >= 4);

andreamazz commented 11 years ago

Hi @alexeyndru, apparently in iOS7 the contentSize's height of the textview is always increasing for whatever reason. I have to change the way I'm using to compute the new text height, I should be able to fix it today. As for the animation quirks I need to figure out what's happening :) I'll get back to you as soon as possible.

alexeyndru commented 11 years ago

Thank you very much! Your library helped me a lot.

mckapur commented 11 years ago

Hey Andremazz, have you managed to find the solution yet?

andreamazz commented 11 years ago

Not yet, sorry, I've been swamped at work. I noticed similiar issues in other chat components, so I might need to rethink part of the text input handling and animation. I should have time to work on it this weekend, I'll keep you posted

mckapur commented 11 years ago

Thanks, do you also experience lag?

On Sat, Oct 5, 2013 at 3:31 PM, Andrea Mazzini notifications@github.com wrote:

Not yet, sorry, I've been swamped at work. I noticed similiar issues in other chat components, so I might need to rethink part of the text input handling and animation. I should have time to work on it this weekend, I'll keep you posted

Reply to this email directly or view it on GitHub: https://github.com/andreamazz/AMBubbleTableView/issues/12#issuecomment-25743730

andreamazz commented 11 years ago

What kind of lag?

Anyway, I was able to fix the animation quirkiness in commit 7570af3 I'm still trying to figure out how to fix the textview's sizing though.

mckapur commented 11 years ago

Sorry, I meant quirkiness. Yeah the text view is really odd, and the problem shows up in all the other open source message projects.

andreamazz commented 11 years ago

If you uncomment the lines around 419 in AMBubbleTableViewController.m, the problem mitigates, but the position is then messed up and it won't scroll.

vutrongtung commented 11 years ago

// // AMBubbleTableViewController.m // BubbleTableDemo // // Created by Andrea Mazzini on 30/06/13. // Copyright (c) 2013 Andrea Mazzini. All rights reserved. //

import "AMBubbleTableViewController.h"

import "AMBubbleTableCell.h"

define kInputHeight 40.0f

define kLineHeight 30.0f

define kButtonWidth 78.0f

@interface AMBubbleTableViewController () <UITableViewDataSource, UITableViewDelegate, UITextViewDelegate>

@property (strong, nonatomic) NSMutableDictionary* options; @property (nonatomic, strong) UIImageView* imageInput; @property (nonatomic, strong) UITextView* textView; @property (nonatomic, strong) UIImageView* imageInputBack; @property (nonatomic, strong) UIButton* buttonSend; @property (nonatomic, strong) NSDateFormatter* dateFormatter; @property (nonatomic, assign) float previousTextFieldHeight;

@end

@implementation AMBubbleTableViewController

pragma mark - TableView Delegate

pragma mark - Keyboard Handlers

@end

andreamazz commented 11 years ago

Hi @vutrongtung, as you can see it's kinda hard to make out what part of the file you modified :) Can you please modify your comment by including the source in a comment tag (by using three backquotes as described here. Or you can create a new pull request. Thanks you for your contribution.

andreamazz commented 11 years ago

Ok, all fixed in the last commit. Version 0.5 pushed to cocoapods. Thanks again @vutrongtung