diff options
| author | Teddy Wing | 2012-09-29 17:33:05 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2012-09-29 17:33:05 -0400 | 
| commit | d14fe86d8c411ad41635a4736c2c736027f6b19b (patch) | |
| tree | ee6517a2d2cd22bdd0a067b437a8589a05cfe58c /Classes/ChatViewController.m | |
| parent | aaa15ec5beeb3df296b7b0fa6d693f04fd52170b (diff) | |
| download | babblr-iOS-d14fe86d8c411ad41635a4736c2c736027f6b19b.tar.bz2 | |
Got pushing/sending to websockets working. Think I got receiving working too but not sure just yet.
Diffstat (limited to 'Classes/ChatViewController.m')
| -rw-r--r-- | Classes/ChatViewController.m | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/Classes/ChatViewController.m b/Classes/ChatViewController.m index b0bd903..971363c 100644 --- a/Classes/ChatViewController.m +++ b/Classes/ChatViewController.m @@ -12,6 +12,7 @@  @implementation ChatViewController  @synthesize chatTableView = _chatTableView; +@synthesize dataSource = _dataSource;  -(id)init  { @@ -39,7 +40,8 @@      self.view.backgroundColor = [UIColor colorWithRed:219.0f/255.0f green:226.0f/255.0f blue:237.0f/255.0f alpha:1];  	chatTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain]; -	ChatMessagesDataSource *dataSource = [[ChatMessagesDataSource alloc] init]; +	dataSource = [[ChatMessagesDataSource alloc] init]; +	[dataSource startMyWebSocket];  	[chatTableView setDataSource:dataSource];  	[self.view addSubview:chatTableView]; @@ -86,7 +88,7 @@  	UIButton *doneBtn = [UIButton buttonWithType:UIButtonTypeCustom];  	doneBtn.frame = CGRectMake(containerView.frame.size.width - 69, 8, 63, 27);      doneBtn.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin; -	[doneBtn setTitle:@"Done" forState:UIControlStateNormal]; +	[doneBtn setTitle:@"Post" forState:UIControlStateNormal];      [doneBtn setTitleShadowColor:[UIColor colorWithWhite:0 alpha:0.4] forState:UIControlStateNormal];      doneBtn.titleLabel.shadowOffset = CGSizeMake (0.0, -1.0); @@ -102,6 +104,9 @@  -(void)resignTextView  { +	[dataSource sendMessage:textView.text]; +	textView.text = @""; +	[chatTableView reloadData];  	[textView resignFirstResponder];  } | 
