基于IMSDK即时通讯插件的社交聊天类APP开源代码

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    _loginView = [[IMLoginView alloc] initWithFrame:self.view.bounds];
     
    [_loginView setDelegate:self];
    [[self view] addSubview:_loginView];
     
 
     
    if ([g_pIMMyself loginStatus] != IMMyselfLoginStatusNone) {
        IMRootViewController *controller = [[IMRootViewController alloc] init];
         
        [self addChildViewController:controller];
        [[self view] addSubview:controller.view];
    }
     
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(logout) name:IMLogoutNotification object:nil];
     
}