Skip to content

Commit

Permalink
Release RongCloud CallKit SDK 2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuLinhong committed May 17, 2018
1 parent 1bdc054 commit 0c38c55
Show file tree
Hide file tree
Showing 58 changed files with 2,281 additions and 4,392 deletions.
166 changes: 134 additions & 32 deletions ios-rongcallkit/RongCallKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,16 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// UICollectionView+BackgroundView.h
// RongCallKit
//
// Created by LiuLinhong on 2018/03/30.
// Copyright © 2018年 Rong Cloud. All rights reserved.
//

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

@interface UICollectionView (BackgroundView)

@property (nonatomic, strong) RCCallVideoMultiCallViewController *callVideoMultiCallViewController;

@end
116 changes: 116 additions & 0 deletions ios-rongcallkit/RongCallKit/Category/UICollectionView+BackgroundView.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
//
// UICollectionView+BackgroundView.m
// RongCallKit
//
// Created by LiuLinhong on 2018/03/30.
// Copyright © 2018年 Rong Cloud. All rights reserved.
//

#import "UICollectionView+BackgroundView.h"
#import <objc/runtime.h>

static NSString *key = @"UICollectionView_BackgroundView";

@implementation UICollectionView (BackgroundView)

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
NSInteger userCellCount = [self.callVideoMultiCallViewController.subUserModelList count];
UIView *touchView = self;
if ([self pointInside:point withEvent:event] && self.alpha >= 0.01 && !self.hidden && self.isUserInteractionEnabled)
{
if ([self isTouchEnable:userCellCount withPoint:point])
{
return nil;
}

if ([self.subviews count] > 0)
{
for (NSInteger i = ([self.subviews count] - 1); i >= 0; --i)
{
UIView *subView = self.subviews[i];
CGPoint subPoint = CGPointMake(point.x - subView.frame.origin.x,
point.y - subView.frame.origin.y);
UIView *subTouchView = [subView hitTest:subPoint withEvent:event];
if (subTouchView)
{
touchView = subTouchView;
break;
}
}
}
}
else
{
touchView = nil;
}

return touchView;
}

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
{
return CGRectContainsPoint(self.bounds, point);
}

- (void)setCallVideoMultiCallViewController:(RCCallVideoMultiCallViewController *)vc
{
objc_setAssociatedObject(self, (__bridge const void *)(key), vc, OBJC_ASSOCIATION_ASSIGN);
}

- (RCCallVideoMultiCallViewController *)callVideoMultiCallViewController
{
return objc_getAssociatedObject(self, (__bridge const void *)(key));
}

- (BOOL)isTouchEnable:(NSInteger)count withPoint:(CGPoint)point
{
if (self.tag != 202)
return NO;

switch (count)
{
case 1:
if (point.x > 270 && point.y > 85)
return NO;
else
return YES;
case 2:
if (point.x > 190 && point.y > 85)
return NO;
else
return YES;
case 3:
if (point.x > 110 && point.y > 85)
return NO;
else
return YES;
case 4:
if (point.y > 85)
return NO;
else
return YES;
case 5:
if (point.x < 270 && point.y < 85)
return YES;
else
return NO;
case 6:
if (point.x < 190 && point.y < 85)
return YES;
else
return NO;
case 7:
if (point.x < 110 && point.y < 85)
return YES;
else
return NO;
case 8:
return NO;
default:
return NO;
}
return NO;
}

@end
26 changes: 26 additions & 0 deletions ios-rongcallkit/RongCallKit/Controller/RCCallBaseViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,26 @@
*/
@property(nonatomic, strong) UIButton *cameraSwitchButton;

/*!
+ Button
*/
@property (nonatomic, strong) UIButton *addButton;

/*!
举手Button
*/
@property (nonatomic, strong) UIButton *handUpButton;

/*!
白板Button
*/
@property (nonatomic, strong) UIButton *whiteBoardButton;

/*!
信号强度ImageView
*/
@property (nonatomic, strong) UIImageView *signalImageView;

#pragma mark - 回调
/*!
通话即将接通
Expand Down Expand Up @@ -169,6 +189,12 @@
*/
- (void)resetLayout:(BOOL)isMultiCall mediaType:(RCCallMediaType)mediaType callStatus:(RCCallStatus)callStatus;

- (void)inviteUserButtonClicked;

- (void)whiteBoardButtonClicked;

- (void)hangupButtonClicked;

#pragma mark - 初始化
/*!
初始化呼入的ViewController
Expand Down
Loading

0 comments on commit 0c38c55

Please sign in to comment.