How can i show the input text from UITextFiled into UITableView
and the UITable Updated automatically once the UITextFiled get field by another user?
like, one the user get online he should be shown in the UITableView so the other users be able to see who's online
i did that already for the room list but!!!
this is the the welcomeViewController.h
#import #import "Room.h"
@interface WelcomeViewController : UIViewController {
IBOutlet UITextField* input;
}
// App delegate will call this whenever this view becomes active
-(void)activate;
@end
This is the implementation
#import "WelcomeViewController.h"
#import "AppConfig.h"
#import "ChattyAppDelegate.h"
@implementation WelcomeViewController
// App delegate will call this whenever this view becomes active - (void)activate { // Display keyboard [input becomeFirstResponder]; }
// This is called whenever "Return" is touched on iPhone's keyboard - (BOOL)textFieldShouldReturn:(UITextField *)theTextField { if ( theTextField.text == nil || [theTextField.text length] < 1 ) { return NO; }
// Save user's name [AppConfig getInstance].name = theTextField.text;
// Dismiss keyboard [theTextField resignFirstResponder];
// Move on to the next screen [[ChattyAppDelegate getInstance] showRoomSelection];
return YES;
}
@end
when the user wrtie her/his name UITextField and press send, the wellcomeViewcontrol should take the user to the online user list,
so the user himselve can see his name in the list and can see other users.. like the other iphone chat
the code i have , one the user enter his name will take him to the roomViewCintroller and will not be able to see the online user.
i prefer to send the code by email !!