diff --git a/Classes/ChatRoomViewController.h b/Classes/ChatRoomViewController.h index a93f3275e..c1a10d0b7 100644 --- a/Classes/ChatRoomViewController.h +++ b/Classes/ChatRoomViewController.h @@ -22,11 +22,12 @@ #import "UIToggleButton.h" #import "UICompositeViewController.h" #import "ChatRoomTableViewController.h" +#import "HPGrowingTextView.h" #import "ChatModel.h" #include "linphonecore.h" -@interface ChatRoomViewController : UIViewController { +@interface ChatRoomViewController : UIViewController { @private LinphoneChatRoom *chatRoom; NSString *_remoteAddress; @@ -35,14 +36,16 @@ @property (nonatomic, retain) IBOutlet ChatRoomTableViewController* tableController; @property (nonatomic, retain) IBOutlet UIToggleButton *editButton; -@property (nonatomic, retain) IBOutlet UITextView* messageField; +@property (nonatomic, retain) IBOutlet HPGrowingTextView* messageField; @property (nonatomic, retain) IBOutlet UIButton* sendButton; @property (nonatomic, retain) IBOutlet UILabel *addressLabel; @property (nonatomic, retain) IBOutlet UIImageView *avatarImage; @property (nonatomic, retain) IBOutlet UIView *headerView; @property (nonatomic, retain) IBOutlet UIView *footerView; @property (nonatomic, retain) IBOutlet UIView *chatView; -@property (nonatomic, retain) IBOutlet UIImageView *fieldBackgroundImage; +@property (nonatomic, retain) IBOutlet UIView *messageView; +@property (nonatomic, retain) IBOutlet UIImageView *messageBackgroundImage; +@property (nonatomic, retain) IBOutlet UIImageView *footerBackgroundImage; @property (nonatomic, copy) NSString *remoteAddress; - (IBAction)onBackClick:(id)event; diff --git a/Classes/ChatRoomViewController.m b/Classes/ChatRoomViewController.m index 8fe55b620..399230f5f 100644 --- a/Classes/ChatRoomViewController.m +++ b/Classes/ChatRoomViewController.m @@ -34,7 +34,9 @@ @synthesize headerView; @synthesize footerView; @synthesize chatView; -@synthesize fieldBackgroundImage; +@synthesize messageView; +@synthesize messageBackgroundImage; +@synthesize footerBackgroundImage; #pragma mark - Lifecycle Functions @@ -58,7 +60,9 @@ [avatarImage release]; [headerView release]; [footerView release]; - [fieldBackgroundImage release]; + [messageView release]; + [messageBackgroundImage release]; + [footerBackgroundImage release]; [super dealloc]; } @@ -92,6 +96,13 @@ static UICompositeViewDescription *compositeDescription = nil; // Set selected+over background: IB lack ! [editButton setImage:[UIImage imageNamed:@"chat_ok_over.png"] forState:(UIControlStateHighlighted | UIControlStateSelected)]; + + messageField.minNumberOfLines = 1; + messageField.maxNumberOfLines = ([LinphoneManager runningOnIpad])?10:3; + messageField.delegate = self; + messageField.font = [UIFont systemFontOfSize:18.0f]; + messageField.contentInset = UIEdgeInsetsZero; + messageField.backgroundColor = [UIColor clearColor]; } @@ -118,8 +129,11 @@ static UICompositeViewDescription *compositeDescription = nil; [editButton setOff]; [[tableController tableView] reloadData]; - [fieldBackgroundImage setImage:[TUNinePatchCache imageOfSize:[fieldBackgroundImage bounds].size + [messageBackgroundImage setImage:[TUNinePatchCache imageOfSize:[messageBackgroundImage bounds].size forNinePatchNamed:@"chat_field"]]; + + [footerBackgroundImage setImage:[TUNinePatchCache imageOfSize:[footerBackgroundImage bounds].size + forNinePatchNamed:@"chat_background"]]; } - (void)viewWillDisappear:(BOOL)animated { @@ -278,12 +292,25 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta #pragma mark - UITextFieldDelegate Functions -- (BOOL)textFieldShouldReturn:(UITextField *)textField { - [textField resignFirstResponder]; - return YES; +- (void)growingTextView:(HPGrowingTextView *)growingTextView willChangeHeight:(float)height { + int diff = height - growingTextView.bounds.size.height; + + CGRect footerRect = [footerView frame]; + footerRect.origin.y -= diff; + footerRect.size.height += diff; + [footerView setFrame:footerRect]; + + CGRect tableRect = [tableController.view frame]; + tableRect.size.height -= diff; + [tableController.view setFrame:tableRect]; + + [messageBackgroundImage setImage:[TUNinePatchCache imageOfSize:[messageBackgroundImage bounds].size + forNinePatchNamed:@"chat_field"]]; + + [footerBackgroundImage setImage:[TUNinePatchCache imageOfSize:[footerBackgroundImage bounds].size + forNinePatchNamed:@"chat_background"]]; } - #pragma mark - Action Functions - (IBAction)onBackClick:(id)event { diff --git a/Classes/LinphoneUI/UIChatRoomCell.h b/Classes/LinphoneUI/UIChatRoomCell.h index bb76a3c5d..3350c8718 100644 --- a/Classes/LinphoneUI/UIChatRoomCell.h +++ b/Classes/LinphoneUI/UIChatRoomCell.h @@ -26,9 +26,10 @@ @property (nonatomic, retain) ChatModel *chat; @property (nonatomic, retain) IBOutlet UIView *innerView; -@property (nonatomic, retain) IBOutlet UIView *messageView; +@property (nonatomic, retain) IBOutlet UIView *bubbleView; @property (nonatomic, retain) IBOutlet UIImageView* backgroundImage; @property (nonatomic, retain) IBOutlet UILabel *messageLabel; +@property (nonatomic, retain) IBOutlet UIImageView *messageImageView; @property (nonatomic, retain) IBOutlet UIButton *deleteButton; @property (nonatomic, retain) IBOutlet UILabel *dateLabel; @property (nonatomic, retain) IBOutlet UIImageView* statusImage; diff --git a/Classes/LinphoneUI/UIChatRoomCell.m b/Classes/LinphoneUI/UIChatRoomCell.m index d432f37f8..e0bc54616 100644 --- a/Classes/LinphoneUI/UIChatRoomCell.m +++ b/Classes/LinphoneUI/UIChatRoomCell.m @@ -26,8 +26,9 @@ @implementation UIChatRoomCell @synthesize innerView; -@synthesize messageView; +@synthesize bubbleView; @synthesize backgroundImage; +@synthesize messageImageView; @synthesize messageLabel; @synthesize deleteButton; @synthesize dateLabel; @@ -40,6 +41,8 @@ static const CGFloat CELL_MAX_WIDTH = 320.0f; static const CGFloat CELL_MESSAGE_X_MARGIN = 26.0f; static const CGFloat CELL_MESSAGE_Y_MARGIN = 36.0f; static const CGFloat CELL_FONT_SIZE = 17.0f; +static const CGFloat CELL_IMAGE_HEIGHT = 50.0f; +static const CGFloat CELL_IMAGE_WIDTH = 50.0f; static UIFont *CELL_FONT = nil; #pragma mark - Lifecycle Functions @@ -57,8 +60,9 @@ static UIFont *CELL_FONT = nil; - (void)dealloc { [backgroundImage release]; [innerView release]; - [messageView release]; + [bubbleView release]; [messageLabel release]; + [messageImageView release]; [deleteButton release]; [dateLabel release]; [statusImage release]; @@ -88,7 +92,16 @@ static UIFont *CELL_FONT = nil; [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot update chat room cell: null chat"]; return; } - [messageLabel setText:[chat message]]; + if(true/*Change when image will be supported */) { + [messageLabel setHidden:FALSE]; + [messageLabel setText:[chat message]]; + + [messageImageView setHidden:TRUE]; + } else { + [messageLabel setHidden:TRUE]; + + [messageImageView setHidden:FALSE]; + } // Date NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; @@ -131,16 +144,21 @@ static UIFont *CELL_FONT = nil; } } -+ (CGSize)viewSize:(NSString*)message width:(int)width { - if(CELL_FONT == nil) { - CELL_FONT = [UIFont systemFontOfSize:CELL_FONT_SIZE]; ++ (CGSize)viewSize:(ChatModel*)chat width:(int)width { + CGSize messageSize; + if(true/*Change when image will be supported */) { + if(CELL_FONT == nil) { + CELL_FONT = [UIFont systemFontOfSize:CELL_FONT_SIZE]; + } + messageSize = [[chat message] sizeWithFont: CELL_FONT + constrainedToSize: CGSizeMake(width - CELL_MESSAGE_X_MARGIN, 10000.0f) + lineBreakMode: UILineBreakModeTailTruncation]; + } else { + messageSize = CGSizeMake(CELL_IMAGE_WIDTH, CELL_IMAGE_HEIGHT); } - CGSize messageSize = [message sizeWithFont: CELL_FONT - constrainedToSize: CGSizeMake(width - CELL_MESSAGE_X_MARGIN, 10000.0f) - lineBreakMode: UILineBreakModeTailTruncation]; messageSize.height += CELL_MESSAGE_Y_MARGIN; if(messageSize.height < CELL_MIN_HEIGHT) - messageSize.height = CELL_MIN_HEIGHT; + messageSize.height = CELL_MIN_HEIGHT; messageSize.width += CELL_MESSAGE_X_MARGIN; if(messageSize.width < CELL_MIN_WIDTH) messageSize.width = CELL_MIN_WIDTH; @@ -148,7 +166,7 @@ static UIFont *CELL_FONT = nil; } + (CGFloat)height:(ChatModel*)chat width:(int)width { - return [UIChatRoomCell viewSize:[chat message] width:width].height; + return [UIChatRoomCell viewSize:chat width:width].height; } @@ -159,7 +177,7 @@ static UIFont *CELL_FONT = nil; if(chat != nil) { // Resize inner CGRect innerFrame; - innerFrame.size = [UIChatRoomCell viewSize:[chat message] width:[self frame].size.width]; + innerFrame.size = [UIChatRoomCell viewSize:chat width:[self frame].size.width]; if([[chat direction] intValue]) { // Inverted innerFrame.origin.x = 0.0f; innerFrame.origin.y = 0.0f; @@ -169,7 +187,7 @@ static UIFont *CELL_FONT = nil; } [innerView setFrame:innerFrame]; - CGRect messageFrame = [messageView frame]; + CGRect messageFrame = [bubbleView frame]; messageFrame.origin.y = ([innerView frame].size.height - messageFrame.size.height)/2; if([[chat direction] intValue]) { // Inverted [backgroundImage setImage:[TUNinePatchCache imageOfSize:[backgroundImage bounds].size @@ -180,7 +198,7 @@ static UIFont *CELL_FONT = nil; forNinePatchNamed:@"chat_bubble_outgoing"]]; messageFrame.origin.y -= 5; } - [messageView setFrame:messageFrame]; + [bubbleView setFrame:messageFrame]; } } diff --git a/Classes/LinphoneUI/UIChatRoomCell.xib b/Classes/LinphoneUI/UIChatRoomCell.xib index 647825af5..cda2cfccd 100644 --- a/Classes/LinphoneUI/UIChatRoomCell.xib +++ b/Classes/LinphoneUI/UIChatRoomCell.xib @@ -56,42 +56,68 @@ 274 - + 274 + + + + 274 + {294, 104} + + + + _NS:9 + 1 + NO + IBCocoaTouchFramework + + + + 274 + {294, 104} + + + + _NS:9 + + 3 + MCAwAA + + NO + YES + 7 + NO + IBCocoaTouchFramework + They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety. + + 3 + MC4zMzMzMzMzMzMzAA + + + 0 + 10 + 0 + + 1 + 17 + + + Helvetica + 17 + 16 + + NO + + {294, 104} - + _NS:9 - - 3 - MCAwAA - - NO + YES - 7 - NO IBCocoaTouchFramework - They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety. - - 3 - MC4zMzMzMzMzMzMzAA - - - 0 - 10 - 0 - - 1 - 17 - - - Helvetica - 17 - 16 - - NO @@ -133,7 +159,6 @@ {{284, 104}, {10, 10}} - _NS:9 NO IBCocoaTouchFramework @@ -182,7 +207,7 @@ {{13, 13}, {294, 114}} - + _NS:9 YES @@ -205,7 +230,6 @@ {100, 100} - _NS:9 IBCocoaTouchFramework @@ -216,7 +240,6 @@ {100, 100} - _NS:9 IBCocoaTouchFramework @@ -248,14 +271,6 @@ 13 - - - messageLabel - - - - 17 - deleteButton @@ -264,14 +279,6 @@ 19 - - - messageView - - - - 21 - dateLabel @@ -296,6 +303,30 @@ 27 + + + messageLabel + + + + 17 + + + + bubbleView + + + + 30 + + + + messageImageView + + + + 31 + onDeleteClick: @@ -357,19 +388,13 @@ 16 - + - messageView - - - 15 - - - messageLabel + bubbleView 18 @@ -389,6 +414,28 @@ status + + 29 + + + + + + + messageView + + + 28 + + + messageImageView + + + 15 + + + messageLabel + @@ -404,6 +451,8 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -412,7 +461,7 @@ - 27 + 31 @@ -432,11 +481,12 @@ UIImageView + UIView UILabel UIButton UIView + UIImageView UILabel - UIView UIImageView @@ -444,6 +494,10 @@ backgroundImage UIImageView + + bubbleView + UIView + dateLabel UILabel @@ -456,14 +510,14 @@ innerView UIView + + messageImageView + UIImageView + messageLabel UILabel - - messageView - UIView - statusImage UIImageView diff --git a/Classes/en.lproj/ChatRoomViewController.xib b/Classes/en.lproj/ChatRoomViewController.xib index 5bae93e66..3bde993df 100644 --- a/Classes/en.lproj/ChatRoomViewController.xib +++ b/Classes/en.lproj/ChatRoomViewController.xib @@ -18,7 +18,6 @@ IBUITableView IBUITableViewController IBUITapGestureRecognizer - IBUITextView IBUIView @@ -158,13 +157,31 @@ 266 + + + 274 + {320, 59} + + + + _NS:9 + + 1 + MSAwLjI4MzE1ODM3MjYgMC4wNTY3ODY4OTE2MQA + + NO + IBCocoaTouchFramework + + NSImage + chat_background.png + + - 257 + 297 {{250, 0}, {70, 59}} - _NS:9 NO @@ -202,57 +219,50 @@ 16 - + - 258 + 274 + + + + 274 + {250, 59} + + + + _NS:9 + NO + IBCocoaTouchFramework + + NSImage + chat_field.png + + + + + 274 + {{10, 10}, {230, 39}} + + + + _NS:9 + + IBCocoaTouchFramework + + {250, 59} - + _NS:9 - NO + IBCocoaTouchFramework - - NSImage - chat_field.png - - - - - 258 - {{10, 10}, {230, 39}} - - - - _NS:9 - YES - YES - - Enter your message here - - IBCocoaTouchFramework - YES - NO - This is a message - - 2 - IBCocoaTouchFramework - - - 1 - 18 - - - Helvetica - 18 - 16 - {{0, 357}, {320, 59}} - + _NS:9 IBCocoaTouchFramework @@ -426,14 +436,6 @@ 44 - - - fieldBackgroundImage - - - - 48 - footerView @@ -458,13 +460,37 @@ 54 + + + footerBackgroundImage + + + + 67 + messageField - + - 57 + 64 + + + + messageBackgroundImage + + + + 69 + + + + messageView + + + + 70 @@ -650,37 +676,53 @@ 14 - - + + footerView - - 21 - - - fieldBackgroundImage - 15 sendButton - - 55 - - - messageField - 58 listTapGestureRecognizer + + 66 + + + footerBackgroundImage + + + 68 + + + + + + + messageView + + + 21 + + + messageBackgroundImage + + + 63 + + + messageField + @@ -703,9 +745,12 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + HPGrowingTextView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -716,7 +761,7 @@ - 62 + 70 @@ -765,10 +810,12 @@ UIImageView UIView UIToggleButton - UIImageView + UIImageView UIView UIView - UITextView + UIImageView + HPGrowingTextView + UIView UIButton ChatRoomTableViewController @@ -789,8 +836,8 @@ editButton UIToggleButton - - fieldBackgroundImage + + footerBackgroundImage UIImageView @@ -801,9 +848,17 @@ headerView UIView + + messageBackgroundImage + UIImageView + messageField - UITextView + HPGrowingTextView + + + messageView + UIView sendButton @@ -819,6 +874,14 @@ ./Classes/ChatRoomViewController.h + + HPGrowingTextView + UIView + + IBProjectSource + ./Classes/HPGrowingTextView.h + + UIToggleButton UIButton @@ -842,6 +905,7 @@ {131, 131} {320, 88} {320, 88} + {640, 117} {320, 88} {320, 88} {500, 117} diff --git a/Classes/fr.lproj/ChatRoomViewController.xib b/Classes/fr.lproj/ChatRoomViewController.xib index 4998f284e..29e39e959 100644 --- a/Classes/fr.lproj/ChatRoomViewController.xib +++ b/Classes/fr.lproj/ChatRoomViewController.xib @@ -18,7 +18,6 @@ IBUITapGestureRecognizer IBUITableViewController IBUITableView - IBUITextView IBUIButton @@ -153,9 +152,27 @@ 266 + + + 274 + {320, 59} + + + _NS:9 + + 1 + MSAwLjI4MzE1ODM3MjYgMC4wNTY3ODY4OTE2MQA + + NO + IBCocoaTouchFramework + + NSImage + chat_background.png + + - 257 + 297 {{250, 0}, {70, 59}} _NS:9 @@ -195,54 +212,52 @@ 16 - + - 258 + 274 + + + + 274 + {250, 59} + + + _NS:9 + NO + IBCocoaTouchFramework + + NSImage + chat_field.png + + + + + 274 + {{10, 10}, {230, 39}} + + + _NS:9 + + IBCocoaTouchFramework + + {250, 59} - + _NS:9 - NO - IBCocoaTouchFramework - - NSImage - chat_field.png - - - - - 258 - {{10, 10}, {230, 39}} - - - _NS:9 - YES - YES - - Entrez votre message ici + + 3 + MQA + + 2 + IBCocoaTouchFramework - YES - NO - This is a message - - 2 - IBCocoaTouchFramework - - - 1 - 18 - - - Helvetica - 18 - 16 - {{0, 357}, {320, 59}} - + _NS:9 IBCocoaTouchFramework @@ -409,14 +424,6 @@ 44 - - - fieldBackgroundImage - - - - 48 - footerView @@ -441,13 +448,37 @@ 54 + + + footerBackgroundImage + + + + 67 + messageField - + - 57 + 64 + + + + messageBackgroundImage + + + + 69 + + + + messageView + + + + 70 @@ -633,37 +664,53 @@ 14 - - + + footerView - - 21 - - - fieldBackgroundImage - 15 sendButton - - 55 - - - messageField - 58 listTapGestureRecognizer + + 66 + + + footerBackgroundImage + + + 68 + + + + + + + messageView + + + 21 + + + messageBackgroundImage + + + 63 + + + messageField + @@ -686,9 +733,12 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + HPGrowingTextView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -699,7 +749,7 @@ - 62 + 70 @@ -748,10 +798,12 @@ UIImageView UIView UIToggleButton - UIImageView + UIImageView UIView UIView - UITextView + UIImageView + HPGrowingTextView + UIView UIButton ChatRoomTableViewController @@ -772,8 +824,8 @@ editButton UIToggleButton - - fieldBackgroundImage + + footerBackgroundImage UIImageView @@ -784,9 +836,17 @@ headerView UIView + + messageBackgroundImage + UIImageView + messageField - UITextView + HPGrowingTextView + + + messageView + UIView sendButton @@ -802,6 +862,14 @@ ./Classes/ChatRoomViewController.h + + HPGrowingTextView + UIView + + IBProjectSource + ./Classes/HPGrowingTextView.h + + UIToggleButton UIButton @@ -825,6 +893,7 @@ {131, 131} {320, 88} {320, 88} + {640, 117} {320, 88} {320, 88} {500, 117} diff --git a/Resources/chat_field.9.png b/Resources/chat_field.9.png index 3303c1d28..0b8b3e91f 100644 Binary files a/Resources/chat_field.9.png and b/Resources/chat_field.9.png differ diff --git a/Resources/chat_field.9@2x.png b/Resources/chat_field.9@2x.png index 614626e89..d85255114 100644 Binary files a/Resources/chat_field.9@2x.png and b/Resources/chat_field.9@2x.png differ diff --git a/Resources/chat_send_default.png b/Resources/chat_send_default.png index 1bee48a2f..c4f4dfd1f 100644 Binary files a/Resources/chat_send_default.png and b/Resources/chat_send_default.png differ diff --git a/Resources/chat_send_disabled.png b/Resources/chat_send_disabled.png index e16748ec1..237317251 100644 Binary files a/Resources/chat_send_disabled.png and b/Resources/chat_send_disabled.png differ diff --git a/Resources/chat_send_over.png b/Resources/chat_send_over.png index a130fe1bf..0bf29fffb 100644 Binary files a/Resources/chat_send_over.png and b/Resources/chat_send_over.png differ diff --git a/linphone.ldb/Contents.plist b/linphone.ldb/Contents.plist index 15280059c..dc3f49742 100644 --- a/linphone.ldb/Contents.plist +++ b/linphone.ldb/Contents.plist @@ -212,17 +212,17 @@ backup - 3 + 9 class BLWrapperHandle name - Classes/ChatRoomViewController/3/ChatRoomViewController.xib + Classes/ChatRoomViewController/9/ChatRoomViewController.xib change date - 2012-09-13T13:08:20Z + 2012-09-13T15:15:40Z changed values class @@ -232,7 +232,7 @@ flags 0 hash - c2184e590274d82e838a91d16b383b3d + 1d0ac99cbad123783bcb35b0d4031cdb name ChatRoomViewController.xib @@ -386,6 +386,9 @@ snapshots + + old objects + change date 2001-01-01T00:00:00Z @@ -435,16 +438,14 @@ - old objects - snapshots versions en - 3 + 9 fr - 3 + 9 diff --git a/linphone.ldb/Resources/Classes/ChatRoomViewController/3/ChatRoomViewController.xib b/linphone.ldb/Resources/Classes/ChatRoomViewController/9/ChatRoomViewController.xib similarity index 86% rename from linphone.ldb/Resources/Classes/ChatRoomViewController/3/ChatRoomViewController.xib rename to linphone.ldb/Resources/Classes/ChatRoomViewController/9/ChatRoomViewController.xib index 5bae93e66..7ab91d369 100644 --- a/linphone.ldb/Resources/Classes/ChatRoomViewController/3/ChatRoomViewController.xib +++ b/linphone.ldb/Resources/Classes/ChatRoomViewController/9/ChatRoomViewController.xib @@ -18,7 +18,6 @@ IBUITableView IBUITableViewController IBUITapGestureRecognizer - IBUITextView IBUIView @@ -158,13 +157,31 @@ 266 + + + 274 + {320, 59} + + + + _NS:9 + + 1 + MSAwLjI4MzE1ODM3MjYgMC4wNTY3ODY4OTE2MQA + + NO + IBCocoaTouchFramework + + NSImage + chat_background.png + + - 257 + 297 {{250, 0}, {70, 59}} - _NS:9 NO @@ -202,57 +219,56 @@ 16 - + - 258 + 274 + + + + 274 + {250, 59} + + + + _NS:9 + NO + IBCocoaTouchFramework + + NSImage + chat_field.png + + + + + 274 + {{10, 10}, {230, 39}} + + + + _NS:9 + + IBCocoaTouchFramework + + {250, 59} - + _NS:9 - NO - IBCocoaTouchFramework - - NSImage - chat_field.png - - - - - 258 - {{10, 10}, {230, 39}} - - - - _NS:9 - YES - YES - - Enter your message here + + 3 + MQA + + 2 + IBCocoaTouchFramework - YES - NO - This is a message - - 2 - IBCocoaTouchFramework - - - 1 - 18 - - - Helvetica - 18 - 16 - {{0, 357}, {320, 59}} - + _NS:9 IBCocoaTouchFramework @@ -426,14 +442,6 @@ 44 - - - fieldBackgroundImage - - - - 48 - footerView @@ -458,13 +466,37 @@ 54 + + + footerBackgroundImage + + + + 67 + messageField - + - 57 + 64 + + + + messageBackgroundImage + + + + 69 + + + + messageView + + + + 70 @@ -650,37 +682,53 @@ 14 - - + + footerView - - 21 - - - fieldBackgroundImage - 15 sendButton - - 55 - - - messageField - 58 listTapGestureRecognizer + + 66 + + + footerBackgroundImage + + + 68 + + + + + + + messageView + + + 21 + + + messageBackgroundImage + + + 63 + + + messageField + @@ -703,9 +751,12 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + HPGrowingTextView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -716,7 +767,7 @@ - 62 + 70 @@ -765,10 +816,12 @@ UIImageView UIView UIToggleButton - UIImageView + UIImageView UIView UIView - UITextView + UIImageView + HPGrowingTextView + UIView UIButton ChatRoomTableViewController @@ -789,8 +842,8 @@ editButton UIToggleButton - - fieldBackgroundImage + + footerBackgroundImage UIImageView @@ -801,9 +854,17 @@ headerView UIView + + messageBackgroundImage + UIImageView + messageField - UITextView + HPGrowingTextView + + + messageView + UIView sendButton @@ -819,6 +880,14 @@ ./Classes/ChatRoomViewController.h + + HPGrowingTextView + UIView + + IBProjectSource + ./Classes/HPGrowingTextView.h + + UIToggleButton UIButton @@ -842,6 +911,7 @@ {131, 131} {320, 88} {320, 88} + {640, 117} {320, 88} {320, 88} {500, 117} diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 889b7ff35..60e1d94c3 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -377,7 +377,6 @@ D34BD65215C13DB60070C209 /* chat_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D38327F11580FE3A00FA0D23 /* chat_default.png */; }; D34BD65315C13DB60070C209 /* chat_edit_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3EA53FF159852080037DC6B /* chat_edit_default.png */; }; D34BD65415C13DB60070C209 /* chat_edit_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3EA5400159852080037DC6B /* chat_edit_over.png */; }; - D34BD65515C13DB60070C209 /* chat_field.png in Resources */ = {isa = PBXBuildFile; fileRef = D3B9A3DA15A58C440096EA4E /* chat_field.png */; }; D34BD65615C13DB60070C209 /* chat_ok_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3B9A3DB15A58C440096EA4E /* chat_ok_default.png */; }; D34BD65715C13DB60070C209 /* chat_ok_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3B9A3DC15A58C440096EA4E /* chat_ok_over.png */; }; D34BD65815C13DB60070C209 /* chat_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D38327FF158100E400FA0D23 /* chat_over.png */; }; @@ -968,7 +967,6 @@ D3ACB09C15C6D59500E15894 /* dialer_alt_back_default~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = D3ACB09915C6D59500E15894 /* dialer_alt_back_default~ipad.png */; }; D3ACB09D15C6D59500E15894 /* dialer_alt_back_over~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = D3ACB09A15C6D59500E15894 /* dialer_alt_back_over~ipad.png */; }; D3ACB09E15C6D59500E15894 /* dialer_alt_back_over~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = D3ACB09A15C6D59500E15894 /* dialer_alt_back_over~ipad.png */; }; - D3B9A3DF15A58C450096EA4E /* chat_field.png in Resources */ = {isa = PBXBuildFile; fileRef = D3B9A3DA15A58C440096EA4E /* chat_field.png */; }; D3B9A3E115A58C450096EA4E /* chat_ok_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3B9A3DB15A58C440096EA4E /* chat_ok_default.png */; }; D3B9A3E315A58C450096EA4E /* chat_ok_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3B9A3DC15A58C440096EA4E /* chat_ok_over.png */; }; D3B9A3E515A58C450096EA4E /* chat_send_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3B9A3DD15A58C440096EA4E /* chat_send_default.png */; }; @@ -1079,6 +1077,14 @@ D3ED3EA81587334E006C0DE4 /* HistoryTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3ED3EA51587334C006C0DE4 /* HistoryTableViewController.m */; }; D3ED3EB81587392C006C0DE4 /* HistoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3ED3EB615873929006C0DE4 /* HistoryViewController.m */; }; D3ED3EB91587392C006C0DE4 /* HistoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3ED3EB615873929006C0DE4 /* HistoryViewController.m */; }; + D3ED40191602172200BF332B /* HPGrowingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3ED40161602172200BF332B /* HPGrowingTextView.m */; }; + D3ED401A1602172200BF332B /* HPGrowingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3ED40161602172200BF332B /* HPGrowingTextView.m */; }; + D3ED401B1602172200BF332B /* HPTextViewInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = D3ED40181602172200BF332B /* HPTextViewInternal.m */; }; + D3ED401C1602172200BF332B /* HPTextViewInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = D3ED40181602172200BF332B /* HPTextViewInternal.m */; }; + D3ED40241602257400BF332B /* chat_background.9.png in Resources */ = {isa = PBXBuildFile; fileRef = D3ED40221602257400BF332B /* chat_background.9.png */; }; + D3ED40251602257400BF332B /* chat_background.9.png in Resources */ = {isa = PBXBuildFile; fileRef = D3ED40221602257400BF332B /* chat_background.9.png */; }; + D3ED40261602257400BF332B /* chat_background.9@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D3ED40231602257400BF332B /* chat_background.9@2x.png */; }; + D3ED40271602257400BF332B /* chat_background.9@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D3ED40231602257400BF332B /* chat_background.9@2x.png */; }; D3F26BF115986B73005F9CAB /* IncomingCallViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F26BEF15986B71005F9CAB /* IncomingCallViewController.m */; }; D3F26BF215986B73005F9CAB /* IncomingCallViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F26BEF15986B71005F9CAB /* IncomingCallViewController.m */; }; D3F26BF715986DAD005F9CAB /* history_ok_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3F26BF515986DAD005F9CAB /* history_ok_default.png */; }; @@ -2013,6 +2019,13 @@ D3ED3EA51587334C006C0DE4 /* HistoryTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = HistoryTableViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; D3ED3EB515873928006C0DE4 /* HistoryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryViewController.h; sourceTree = ""; }; D3ED3EB615873929006C0DE4 /* HistoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = HistoryViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + D3ED40151602172200BF332B /* HPGrowingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HPGrowingTextView.h; sourceTree = ""; }; + D3ED40161602172200BF332B /* HPGrowingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HPGrowingTextView.m; sourceTree = ""; }; + D3ED40171602172200BF332B /* HPTextViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HPTextViewInternal.h; sourceTree = ""; }; + D3ED40181602172200BF332B /* HPTextViewInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HPTextViewInternal.m; sourceTree = ""; }; + D3ED401D1602223B00BF332B /* chat_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = chat_background.png; path = Resources/chat_background.png; sourceTree = ""; }; + D3ED40221602257400BF332B /* chat_background.9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = chat_background.9.png; path = Resources/chat_background.9.png; sourceTree = ""; }; + D3ED40231602257400BF332B /* chat_background.9@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "chat_background.9@2x.png"; path = "Resources/chat_background.9@2x.png"; sourceTree = ""; }; D3F26BEE15986B71005F9CAB /* IncomingCallViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncomingCallViewController.h; sourceTree = ""; }; D3F26BEF15986B71005F9CAB /* IncomingCallViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IncomingCallViewController.m; sourceTree = ""; }; D3F26BF515986DAD005F9CAB /* history_ok_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = history_ok_default.png; path = Resources/history_ok_default.png; sourceTree = ""; }; @@ -2765,6 +2778,9 @@ D3EA5402159852080037DC6B /* chat_add_over.png */, D3F795DB15A5831C0077328B /* chat_back_default.png */, D3F795DC15A5831C0077328B /* chat_back_over.png */, + D3ED40221602257400BF332B /* chat_background.9.png */, + D3ED40231602257400BF332B /* chat_background.9@2x.png */, + D3ED401D1602223B00BF332B /* chat_background.png */, D389363715A6D53200A3A3AA /* chat_bubble_incoming.9.png */, D3A8BB7715A6CC3200F96BE5 /* chat_bubble_incoming.png */, D389363815A6D53200A3A3AA /* chat_bubble_outgoing.9.png */, @@ -3125,6 +3141,7 @@ D3807FB615C28940005BE9BC /* DCRoundSwitch */, D32B9DFA15A2F131000B6DEC /* FastAddressBook.h */, D32B9DFB15A2F131000B6DEC /* FastAddressBook.m */, + D3ED40141602172200BF332B /* GrowingTextView */, D3807FC715C2894A005BE9BC /* InAppSettingsKit */, D3B90E1115C2CB5700F64F8C /* NinePatch.xcodeproj */, D326483615887D5200930C67 /* OrderedDictionary.h */, @@ -3248,6 +3265,18 @@ name = Products; sourceTree = ""; }; + D3ED40141602172200BF332B /* GrowingTextView */ = { + isa = PBXGroup; + children = ( + D3ED40151602172200BF332B /* HPGrowingTextView.h */, + D3ED40161602172200BF332B /* HPGrowingTextView.m */, + D3ED40171602172200BF332B /* HPTextViewInternal.h */, + D3ED40181602172200BF332B /* HPTextViewInternal.m */, + ); + name = GrowingTextView; + path = Utils/GrowingTextView; + sourceTree = ""; + }; D3F7997E15BD31EC0018C273 /* TPMultiLayoutViewController */ = { isa = PBXGroup; children = ( @@ -3568,7 +3597,6 @@ D38187AD15FE340100C3EDCA /* ChatRoomViewController.xib in Resources */, D3F795DD15A5831C0077328B /* chat_back_default.png in Resources */, D3F795DF15A5831C0077328B /* chat_back_over.png in Resources */, - D3B9A3DF15A58C450096EA4E /* chat_field.png in Resources */, D3B9A3E115A58C450096EA4E /* chat_ok_default.png in Resources */, D3B9A3E315A58C450096EA4E /* chat_ok_over.png in Resources */, D3B9A3E515A58C450096EA4E /* chat_send_default.png in Resources */, @@ -3815,6 +3843,8 @@ D381884415FE447200C3EDCA /* ChatViewController.xib in Resources */, D381885415FE448400C3EDCA /* UICallBar.xib in Resources */, D381885615FE448400C3EDCA /* UICallBar~ipad.xib in Resources */, + D3ED40241602257400BF332B /* chat_background.9.png in Resources */, + D3ED40261602257400BF332B /* chat_background.9@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3907,7 +3937,6 @@ D34BD65215C13DB60070C209 /* chat_default.png in Resources */, D34BD65315C13DB60070C209 /* chat_edit_default.png in Resources */, D34BD65415C13DB60070C209 /* chat_edit_over.png in Resources */, - D34BD65515C13DB60070C209 /* chat_field.png in Resources */, D34BD65615C13DB60070C209 /* chat_ok_default.png in Resources */, D34BD65715C13DB60070C209 /* chat_ok_over.png in Resources */, D34BD65815C13DB60070C209 /* chat_over.png in Resources */, @@ -4264,6 +4293,8 @@ D381884515FE447200C3EDCA /* ChatViewController.xib in Resources */, D381885515FE448400C3EDCA /* UICallBar.xib in Resources */, D381885715FE448400C3EDCA /* UICallBar~ipad.xib in Resources */, + D3ED40251602257400BF332B /* chat_background.9.png in Resources */, + D3ED40271602257400BF332B /* chat_background.9@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4386,6 +4417,8 @@ D380800515C28A7A005BE9BC /* UILinphone.m in Sources */, D380801315C299D0005BE9BC /* ColorSpaceUtilites.m in Sources */, D378AB2A15DCDB4A0098505D /* ContactDetailsImagePickerController.m in Sources */, + D3ED40191602172200BF332B /* HPGrowingTextView.m in Sources */, + D3ED401B1602172200BF332B /* HPTextViewInternal.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4476,6 +4509,8 @@ D380800615C28A7A005BE9BC /* UILinphone.m in Sources */, D380801415C299D0005BE9BC /* ColorSpaceUtilites.m in Sources */, D378AB2B15DCDB4A0098505D /* ContactDetailsImagePickerController.m in Sources */, + D3ED401A1602172200BF332B /* HPGrowingTextView.m in Sources */, + D3ED401C1602172200BF332B /* HPTextViewInternal.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };