Skip to content
This repository has been archived by the owner on Oct 9, 2021. It is now read-only.

Commit

Permalink
Release SealTalk Demo version 1.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
RongRobot committed Nov 24, 2016
1 parent e078803 commit ee0b609
Show file tree
Hide file tree
Showing 149 changed files with 7,299 additions and 413 deletions.
18 changes: 18 additions & 0 deletions ios-rongimdemo/RCDContactSelectedCollectionViewCell.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// RCDContactSelectedCollectionViewCell.h
// RCloudMessage
//
// Created by Jue on 2016/10/20.
// Copyright © 2016年 RongCloud. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "RCDUserInfo.h"

@interface RCDContactSelectedCollectionViewCell : UICollectionViewCell

@property(nonatomic, strong) UIImageView *ivAva;

- (void)setUserModel:(RCUserInfo *)userModel;

@end
59 changes: 59 additions & 0 deletions ios-rongimdemo/RCDContactSelectedCollectionViewCell.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//
// RCDContactSelectedCollectionViewCell.m
// RCloudMessage
//
// Created by Jue on 2016/10/20.
// Copyright © 2016年 RongCloud. All rights reserved.
//

#import "RCDContactSelectedCollectionViewCell.h"
#import "DefaultPortraitView.h"
#import "UIImageView+WebCache.h"

@implementation RCDContactSelectedCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
_ivAva = [[UIImageView alloc] initWithFrame:CGRectZero];
_ivAva.clipsToBounds = YES;
_ivAva.layer.cornerRadius = 5.f;
_ivAva.translatesAutoresizingMaskIntoConstraints = NO;
[_ivAva setBackgroundColor:[UIColor clearColor]];
[self.contentView addSubview:_ivAva];

[self.contentView
addConstraints:
[NSLayoutConstraint
constraintsWithVisualFormat:@"H:|[_ivAva]|"
options:kNilOptions
metrics:nil
views:NSDictionaryOfVariableBindings(
_ivAva)]];

[self.contentView
addConstraints:
[NSLayoutConstraint
constraintsWithVisualFormat:@"V:|[_ivAva]|"
options:kNilOptions
metrics:nil
views:NSDictionaryOfVariableBindings(
_ivAva)]];
}
return self;
}

- (void)setUserModel:(RCUserInfo *)userModel {
self.ivAva.image = nil;
if ([userModel.portraitUri isEqualToString:@""]) {
DefaultPortraitView *defaultPortrait =
[[DefaultPortraitView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
[defaultPortrait setColorAndLabel:userModel.userId Nickname:userModel.name];
UIImage *portrait = [defaultPortrait imageFromView];
self.ivAva.image = portrait;
} else {
[self.ivAva sd_setImageWithURL:[NSURL URLWithString:userModel.portraitUri]
placeholderImage:[UIImage imageNamed:@"icon_person"]];
}
}

@end
6 changes: 3 additions & 3 deletions ios-rongimdemo/RCDContactSelectedTableViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@
#import <UIKit/UIKit.h>
#import <RongIMLib/RongIMLib.h>

@interface RCDContactSelectedTableViewController : UITableViewController
@interface RCDContactSelectedTableViewController : UIViewController<UICollectionViewDelegateFlowLayout,UICollectionViewDataSource,UICollectionViewDelegate>

@property(nonatomic, strong) NSArray *keys;

@property(nonatomic, strong) NSMutableDictionary *allFriends;

@property(nonatomic, strong) NSArray *allKeys;

@property(nonatomic, strong) NSArray *seletedUsers;

@property(nonatomic, strong) NSString *titleStr;

@property(nonatomic, strong) NSMutableArray *addGroupMembers;
Expand All @@ -35,6 +33,8 @@

@property(nonatomic, strong) NSString *discussiongroupId;

@property(nonatomic, strong) UISearchBar *searchBar;

@property(nonatomic, strong) void (^selectUserList)(NSArray<RCUserInfo *> *selectedUserList);

@property BOOL isAllowsMultipleSelection;
Expand Down
Loading

0 comments on commit ee0b609

Please sign in to comment.