Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
* dev:
  -默认名字也改下吧-
  -Modify 全界面更换皮肤-
  -Modify 修复后台播放音乐,进入另一个会话应该正常显示的问题-
  -Modify 更新成王者荣耀皮肤!-
  init voice add vedio code
  • Loading branch information
zyprosoft committed Dec 18, 2016
2 parents b13b049 + c9409d2 commit 86fda7b
Show file tree
Hide file tree
Showing 91 changed files with 2,316 additions and 111 deletions.
110 changes: 110 additions & 0 deletions ZYChat-EaseMob/ZYChat.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions ZYChat-EaseMob/ZYChat/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#import "HALoginViewController.h"
#import "BTTabBarRootController.h"
#import "GJGCChatSystemNotiReciever.h"
#import "GJGCCallDataManager.h"
#import "ZYThemeUitil.h"

#define EaseMobAppKey @"zyprosoft#zychat"

Expand All @@ -29,11 +31,11 @@ - (void)logOutAction
if (!self.loginNav) {

HALoginViewController *loginVC = [[HALoginViewController alloc]init];
loginVC.title = @"iOS码农之家";
loginVC.title = @"王者荣耀-约战";

self.loginNav = [[UINavigationController alloc]initWithRootViewController:loginVC];

UIImage *navigationBarBack = GJCFQuickImageByColorWithSize([GJGCCommonFontColorStyle mainThemeColor], CGSizeMake(GJCFSystemScreenWidth * GJCFScreenScale, 64.f * GJCFScreenScale));
UIImage *navigationBarBack = ZYThemeImage(kThemeHomeNavBar);
[self.loginNav.navigationBar setBackgroundImage:navigationBarBack forBarMetrics:UIBarMetricsDefault];
}
if (self.window.rootViewController) {
Expand All @@ -49,6 +51,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

NSLog(@"%@",GJCFAppCacheDirectory);

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];

//注册环信
EMOptions *options = [EMOptions optionsWithAppkey:EaseMobAppKey];
options.apnsCertName = @"zychat_apns";
Expand All @@ -59,8 +63,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
loginVC.title = @"iOS码农之家";

self.loginNav = [[UINavigationController alloc]initWithRootViewController:loginVC];

UIImage *navigationBarBack = GJCFQuickImageByColorWithSize([GJGCCommonFontColorStyle mainThemeColor], CGSizeMake(GJCFSystemScreenWidth * GJCFScreenScale, 64.f * GJCFScreenScale));
UIImage *navigationBarBack = ZYThemeImage(kThemeHomeNavBar);
[self.loginNav.navigationBar setBackgroundImage:navigationBarBack forBarMetrics:UIBarMetricsDefault];

self.window.rootViewController = self.loginNav;
Expand Down Expand Up @@ -116,6 +119,8 @@ - (void)observeLoginStatus:(NSNotification *)noti
//启动系统消息收发
[[GJGCChatSystemNotiReciever shareReciever] systemAssistConversation];

[GJGCCallDataManager sharedManager];

[self setupTab];
}
}
Expand Down
38 changes: 12 additions & 26 deletions ZYChat-EaseMob/ZYChat/Base.lproj/LaunchScreen.xib
Original file line number Diff line number Diff line change
@@ -1,41 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015年 ZYProSoft. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ZYChat" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="default.jpg" translatesAutoresizingMaskIntoConstraints="NO" id="n01-Ud-kan">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina55"/>
<point key="canvasLocation" x="558" y="485"/>
</view>
</objects>
<resources>
<image name="default.jpg" width="1080" height="1920"/>
</resources>
</document>
15 changes: 15 additions & 0 deletions ZYChat-EaseMob/ZYChat/Call/GJGCCallDataManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// GJGCCallDataManager.h
// ZYChat
//
// Created by bob on 16/8/25.
// Copyright © 2016年 ZYProSoft. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface GJGCCallDataManager : NSObject

+ (GJGCCallDataManager *)sharedManager;

@end
87 changes: 87 additions & 0 deletions ZYChat-EaseMob/ZYChat/Call/GJGCCallDataManager.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
//
// GJGCCallDataManager.m
// ZYChat
//
// Created by bob on 16/8/25.
// Copyright © 2016年 ZYProSoft. All rights reserved.
//

#import "GJGCCallDataManager.h"
#import "GJGCVoiceCallViewController.h"
#import "GJGCVideoCallViewController.h"
#import "GJGCForwardEngine.h"

@interface GJGCCallDataManager ()<EMCallManagerDelegate>

@end

@implementation GJGCCallDataManager

+ (GJGCCallDataManager *)sharedManager
{
static GJGCCallDataManager *sharedManager;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedManager = [[GJGCCallDataManager alloc]init];
});
return sharedManager;
}

- (instancetype)init
{
if (self = [super init]) {

[[EMClient sharedClient].callManager addDelegate:self delegateQueue:nil];
}
return self;
}

#pragma mark - EMCallManagerDelegate
/*!
* 用户A拨打用户B,用户B会收到这个回调
*
* @param aSession 会话实例
*/
- (void)didReceiveCallIncoming:(EMCallSession *)aSession
{
NSLog(@"收到Call请求");

if (aSession.type == EMCallTypeVoice) {
GJGCVoiceCallViewController *callController = [[GJGCVoiceCallViewController alloc] initWithSession:aSession isIncoming:YES];
callController.modalPresentationStyle = UIModalPresentationOverFullScreen;
[[GJGCForwardEngine tabBarVC] presentViewController:callController animated:NO completion:nil];
}

if (aSession.type == EMCallTypeVideo) {
GJGCVideoCallViewController *callController = [[GJGCVideoCallViewController alloc] initWithSession:aSession isIncoming:YES];
callController.modalPresentationStyle = UIModalPresentationOverFullScreen;
[[GJGCForwardEngine tabBarVC] presentViewController:callController animated:NO completion:nil];
}


}

/*!
* 通话通道建立完成,用户A和用户B都会收到这个回调
*
* @param aSession 会话实例
*/
- (void)didReceiveCallConnected:(EMCallSession *)aSession
{
NSLog(@"建立Call请求");
}

/*!
* 用户A和用户B正在通话中,用户A中断或者继续数据流传输时,用户B会收到该回调
*
* @param aSession 会话实例
* @param aType 改变类型
*
*/
- (void)didReceiveCallUpdated:(EMCallSession *)aSession
type:(EMCallStreamControlType)aType
{
NSLog(@"Call中断");
}

@end
Binary file added ZYChat-EaseMob/ZYChat/Call/Resource/callRing.mp3
Binary file not shown.
18 changes: 18 additions & 0 deletions ZYChat-EaseMob/ZYChat/Call/VideoCall/GJGCVideoCallViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// GJGCVideoCallViewController.h
// ZYChat
//
// Created by bob on 16/8/25.
// Copyright © 2016年 ZYProSoft. All rights reserved.
//

#import "GJGCBaseViewController.h"

@interface GJGCVideoCallViewController : GJGCBaseViewController

- (instancetype)initWithSession:(EMCallSession *)session
isIncoming:(BOOL)isIncoming;

@property (strong, nonatomic) NSString *chatter;

@end
Loading

0 comments on commit 86fda7b

Please sign in to comment.