Home » Source Code » P2P live video chat » RoomViewController.m

RoomViewController.m ( File view )

  • By zhuaijun 2013-11-15
  • View(s):271
  • Download(s):4
  • Point(s): 2
			//
//  RoomViewController.m
//  AnyChat
//
//  Created by bairuitech on 13-7-5.
//
//

#import "RoomViewController.h"
#import "AnyChatAppDelegate.h"
#import "../../sdk/include/AnyChatPlatform.h"


@interface RoomViewController ()

@end

@implementation RoomViewController

@synthesize onlineUserTable;
@synthesize onlineUserList;


- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{

    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {

        // Custom initialization
    
}
    return self;

}

- (void)viewDidLoad
{

    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.

}

- (void)didReceiveMemoryWarning
{

    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.

}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

    return 1;

}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    NSMutableArray *userlist = [AnyChatPlatform GetOnlineUser];
    return userlist.count;

}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    static NSString *CellIdentifier = @"Cell";
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    
    if(cell == nil) {

        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    
}
    
    if(onlineUserList != nil) {

        [onlineUserList release];
    
}
    
    onlineUserList = [[NSMutableArray alloc] initWithArray:[AnyChatPlatform GetOnlineUser]];
    
    NSUInteger row = [indexPath row];
    
    NSString* username = [AnyChatPlatform GetUserName:[[onlineUserList objectAtIndex:row] integerValue] ];
    cell.textLabel.text = [NSString stringWithFormat:@"%@(%d)", username, [[onlineUserList objectAtIndex:row] integerValue]];
    
    return cell;

}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

    int userid = [[self.onlineUserList objectAtIndex:[indexPath row]] integerValue];
    
    [[AnyChatAppDelegate GetApp].viewController showVideoChatView:userid];

}

-(void) RefreshRoomUserList
{

    [self.onlineUserTable reloadData];

}

- (IBAction) OnLeaveRoomBtnClicked:(id)sender
{

    [AnyChatPlatform LeaveRoom:-1];
    [[AnyChatAppDelegate GetApp].viewController showHallView];

}

@end
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 2

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
01.97 kB
AnyChat.ipa2.11 MB2013-09-23 09:10
01.97 kB
AnyChat357.92 kB2013-09-23 09:09
readme.txt1.89 kB2013-09-23 09:09
01.97 kB
01.97 kB
AnyChatDefine.h17.39 kB2013-09-23 09:10
AnyChatErrorCode.h4.05 kB2013-09-23 09:10
AnyChatPlatform.h11.21 kB2013-09-23 09:10
01.97 kB
01.97 kB
libaudio_processing.a1.07 MB2013-09-23 09:09
libsignal_processing.a218.01 kB2013-09-23 09:09
libsystem_wrappers.a1.63 MB2013-09-23 09:09
libvad.a51.80 kB2013-09-23 09:09
libanychatcore.a9.78 MB2013-09-23 09:10
libavcodec.a14.98 MB2013-09-23 09:09
libavdevice.a14.31 kB2013-09-23 09:09
libavformat.a1.28 MB2013-09-23 09:09
libavutil.a850.81 kB2013-09-23 09:09
libcelt0.a838.18 kB2013-09-23 09:09
libmediacore.a692.71 kB2013-09-23 09:10
libmediashow.a223.89 kB2013-09-23 09:10
libmediautil.a1.13 MB2013-09-23 09:10
libogg.a121.38 kB2013-09-23 09:09
libopencore-amrnb.a2.80 MB2013-09-23 09:09
libopencore-amrwb.a948.92 kB2013-09-23 09:09
libpostproc.a135.77 kB2013-09-23 09:09
libspeex.a682.81 kB2013-09-23 09:09
libspeexdsp.a458.86 kB2013-09-23 09:09
libswscale.a1.27 MB2013-09-23 09:09
libtheora.a1.27 MB2013-09-23 09:09
libvo-amrwbenc.a1.15 MB2013-09-23 09:09
libvpx.a4.48 MB2013-09-23 09:09
libx264.a1.42 MB2013-09-23 09:09
01.97 kB
readme.txt613.00 B2013-09-23 09:09
01.97 kB
01.97 kB
AnyChat-Info.plist1.21 kB2012-05-18 06:13
AnyChat-Prefix.pch320.00 B2012-04-26 07:42
AnyChatAppDelegate.h562.00 B2013-08-06 23:43
AnyChatAppDelegate.m5.25 kB2013-08-06 23:43
AnyChatViewController.h1.86 kB2013-08-06 23:43
AnyChatViewController.m5.94 kB2013-08-27 03:15
01.97 kB
anychat.png1.56 kB2012-04-26 07:42
camera.png16.58 kB2012-04-26 07:42
chat_bk.gif37.52 kB2012-04-26 07:42
config.png15.85 kB2012-04-26 07:42
hall_bk.jpg42.03 kB2012-04-26 07:42
login_bk.jpg46.43 kB2012-04-26 07:42
logo.gif6.84 kB2012-04-26 07:42
room.png11.38 kB2012-04-26 07:42
videophonebk.jpg56.50 kB2012-04-26 07:42
01.97 kB
AnyChatViewController.xib29.41 kB2013-07-08 08:46
InfoPlist.strings45.00 B2012-04-26 07:42
MainWindow.xib19.52 kB2012-04-26 07:42
HallViewController.h599.00 B2013-07-08 08:46
HallViewController.m1.85 kB2013-07-08 08:46
HallViewController.xib21.51 kB2013-07-08 08:46
LoginViewController.h1,008.00 B2013-07-08 08:46
LoginViewController.m2.32 kB2013-07-08 08:46
LoginViewController.xib30.26 kB2013-07-08 08:46
main.m355.00 B2012-04-26 07:42
RoomViewController.h506.00 B2013-07-08 08:46
RoomViewController.m2.39 kB2013-07-08 08:46
RoomViewController.xib12.07 kB2013-07-08 08:46
01.97 kB
01.97 kB
Root.strings546.00 B2013-08-05 23:47
Root.plist4.19 kB2013-08-27 03:15
SettingsController.h731.00 B2012-05-09 22:49
SettingsController.m1.81 kB2013-08-06 23:43
SettingsController.xib17.66 kB2012-05-09 22:49
VideoChatController.h803.00 B2013-07-08 08:46
VideoChatController.m3.22 kB2013-08-06 23:43
VideoChatController.xib10.77 kB2013-07-08 09:19
anychat.png1.56 kB2012-04-26 07:42
01.97 kB
project.pbxproj36.89 kB2013-09-23 09:10
01.97 kB
contents.xcworkspacedata152.00 B2012-04-26 07:42
Entitlements.plist224.00 B2012-04-26 07:42
...
Sponsored links

RoomViewController.m (19.21 MB)

Need 2 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D