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.6
Browse files Browse the repository at this point in the history
  • Loading branch information
RongRobot committed Nov 11, 2016
1 parent 4cdd09e commit e89a28a
Show file tree
Hide file tree
Showing 235 changed files with 8,170 additions and 5,402 deletions.
17 changes: 9 additions & 8 deletions ios-rongimdemo/Launch Screen.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="7.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -15,14 +16,14 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iOS_loading" translatesAutoresizingMaskIntoConstraints="NO" id="8YK-eI-ovj">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="loading_iOS" translatesAutoresizingMaskIntoConstraints="NO" id="8YK-eI-ovj">
<frame key="frameInset" width="600" height="600"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="8YK-eI-ovj" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" constant="-20" id="0pt-ZX-92N"/>
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="8YK-eI-ovj" secondAttribute="bottom" id="GbV-re-teI"/>
Expand All @@ -37,6 +38,6 @@
</scene>
</scenes>
<resources>
<image name="iOS_loading" width="375" height="667"/>
<image name="loading_iOS" width="750" height="1334"/>
</resources>
</document>
6 changes: 0 additions & 6 deletions ios-rongimdemo/RCDAboutRongCloudTableViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,4 @@

@interface RCDAboutRongCloudTableViewController : UITableViewController<UIAlertViewDelegate>

@property (weak, nonatomic) IBOutlet UIImageView *NewVersionImage;

@property (weak, nonatomic) IBOutlet UILabel *SDKVersionLabel;

@property (weak, nonatomic) IBOutlet UILabel *SealTalkVersionLabel;

@end
223 changes: 199 additions & 24 deletions ios-rongimdemo/RCDAboutRongCloudTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#import "UIColor+RCColor.h"
#import "RCDCommonDefine.h"
#import "RCDUIBarButtonItem.h"
#import "RCDBaseSettingTableViewCell.h"
#import "RCDLogoTableViewCell.h"
#import "RCDVersionCell.h"

@interface RCDAboutRongCloudTableViewController ()
@property(nonatomic, strong) NSArray *urls;
Expand All @@ -34,27 +37,10 @@ - (void)viewDidLoad {
[super viewDidLoad];
[self setPoweredView];
self.tableView.tableFooterView = [UIView new];
self.tableView.backgroundColor = [UIColor colorWithHexString:@"f0f0f6" alpha:1.f];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

NSString *version = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"CFBundleShortVersionString"];
self.SDKVersionLabel.text = version;
self.SDKVersionLabel.textColor = [UIColor colorWithHexString:@"999999" alpha:1.0];

NSString *SealTalkVersion = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"SealTalk Version"];
self.SealTalkVersionLabel.text = SealTalkVersion;
self.SealTalkVersionLabel.textColor = [UIColor colorWithHexString:@"999999" alpha:1.0];

NSString *isNeedUpdate = [[NSUserDefaults standardUserDefaults] objectForKey:@"isNeedUpdate"];
if ([isNeedUpdate isEqualToString:@"YES"]) {
_NewVersionImage.hidden = NO;
}
//设置分割线颜色
self.tableView.separatorColor =
[UIColor colorWithHexString:@"dfdfdf" alpha:1.0f];
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[self.tableView setSeparatorInset:UIEdgeInsetsMake(0, 10, 0, 0)];
}
self.navigationItem.title = @"关于 SealTalk";

RCDUIBarButtonItem *leftBtn =
[[RCDUIBarButtonItem alloc] initContainImage:[UIImage imageNamed:@"navigator_btn_back"]
Expand All @@ -68,8 +54,130 @@ - (void)viewDidLoad {
self.navigationItem.leftBarButtonItem = leftBtn;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 6;
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *reusableCellWithIdentifier = @"RCDBaseSettingTableViewCell";
RCDBaseSettingTableViewCell *cell = [self.tableView
dequeueReusableCellWithIdentifier:reusableCellWithIdentifier];

static NSString *logoCellWithIdentifier = @"RCDLogoTableViewCell";
RCDLogoTableViewCell *logoCell = [self.tableView
dequeueReusableCellWithIdentifier:logoCellWithIdentifier];

static NSString *versionCellWithIdentifier = @"RCDVersionCell";
RCDVersionCell *versionCell = [self.tableView
dequeueReusableCellWithIdentifier:versionCellWithIdentifier];

if (cell == nil) {
cell = [[RCDBaseSettingTableViewCell alloc] init];
}
if (logoCell == nil) {
logoCell = [[RCDLogoTableViewCell alloc] init];
}
if (versionCell == nil) {
versionCell = [[RCDVersionCell alloc] init];
}
switch (indexPath.section) {
case 0: {
switch (indexPath.row) {
case 0: {
return logoCell;
}
break;

case 1: {
[cell setCellStyle:DefaultStyle];
cell.leftLabel.text = @"更新日志";
return cell;
}
break;

case 2: {
[cell setCellStyle:DefaultStyle];
cell.leftLabel.text = @"功能介绍";
return cell;
}
break;

case 3: {
[cell setCellStyle:DefaultStyle];
cell.leftLabel.text = @"官方网站";
return cell;
}
break;

case 4: {
[versionCell setCellStyle:DefaultStyle_RightLabel_WithoutRightArrow];
versionCell.leftLabel.text = @"SealTalk 版本";
NSString *SealTalkVersion = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"SealTalk Version"];
versionCell.rightLabel.text = SealTalkVersion;
NSString *isNeedUpdate = [[NSUserDefaults standardUserDefaults] objectForKey:@"isNeedUpdate"];
if ([isNeedUpdate isEqualToString:@"YES"]) {
[versionCell addNewImageView];
}
return versionCell;
}
break;

case 5: {
[cell setCellStyle:DefaultStyle_RightLabel_WithoutRightArrow];
cell.leftLabel.text = @"SDK 版本";
NSString *version = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"CFBundleShortVersionString"];
cell.rightLabel.text = version;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
break;

default:
break;
}
}
break;

default:
break;
}
return nil;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
CGFloat height;
switch (indexPath.section) {
case 0:{
switch (indexPath.row) {
case 0:
height = 141.f;
break;

default:
height = 44.f;
break;
}
}
break;

default:
break;
}
return height;
}

- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES]; // 取消选中
NSString *isNeedUpdate = [[NSUserDefaults standardUserDefaults] objectForKey:@"isNeedUpdate"];
if (indexPath.section == 0 && indexPath.row == 4) {
if ([isNeedUpdate isEqualToString:@"YES"]) {
Expand Down Expand Up @@ -106,23 +214,44 @@ - (void)tableView:(UITableView *)tableView
-(void)gotoDebugModel
{
NSString *isDisplayID = [[NSUserDefaults standardUserDefaults] objectForKey:@"isDisplayID"];
if ([isDisplayID isEqualToString:@"YES"]) {
NSString *isDisplayOnlineStatus = [[NSUserDefaults standardUserDefaults] objectForKey:@"isDisplayOnlineStatus"];
if ([isDisplayID isEqualToString:@"YES"] && [isDisplayOnlineStatus isEqualToString:@"YES"]) {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:nil
message:@"Debug模式"
delegate:self
cancelButtonTitle:@"确定"
otherButtonTitles:@"强制Crash",@"关闭显示ID", nil];
otherButtonTitles:@"强制Crash",@"关闭显示ID",@"关闭显示在线状态", nil];
alert.delegate = self;
[alert show];

} else {
} else if (isDisplayID == nil && [isDisplayOnlineStatus isEqualToString:@"YES"]) {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:nil
message:@"Debug模式"
delegate:self
cancelButtonTitle:@"确定"
otherButtonTitles:@"强制Crash",@"显示ID",@"关闭显示在线状态", nil];
alert.delegate = self;
[alert show];
} else if ([isDisplayID isEqualToString:@"YES"] && isDisplayOnlineStatus == nil) {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:nil
message:@"Debug模式"
delegate:self
cancelButtonTitle:@"确定"
otherButtonTitles:@"强制Crash",@"关闭显示ID",@"显示在线状态", nil];
alert.delegate = self;
[alert show];
}

else {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:nil
message:@"Debug模式"
delegate:self
cancelButtonTitle:@"确定"
otherButtonTitles:@"强制Crash",@"显示ID", nil];
otherButtonTitles:@"强制Crash",@"显示ID",@"显示在线状态", nil];
alert.delegate = self;
[alert show];
}
Expand All @@ -147,6 +276,19 @@ -(void) setIsDisplayId
}
}

-(void) setIsDisplayOnlineStatus
{
NSString *isDisplayOnlineStatus = [[NSUserDefaults standardUserDefaults] objectForKey:@"isDisplayOnlineStatus"];
if ([isDisplayOnlineStatus isEqualToString:@"YES"]) {
[DEFAULTS setObject:nil forKey:@"isDisplayOnlineStatus"];
[DEFAULTS synchronize];
} else {
[DEFAULTS setObject:@"YES" forKey:@"isDisplayOnlineStatus"];
[DEFAULTS synchronize];

}
}

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
switch (buttonIndex) {
Expand All @@ -158,6 +300,10 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto
[self setIsDisplayId];
break;

case 3:
[self setIsDisplayOnlineStatus];
break;

default:
break;
}
Expand Down Expand Up @@ -205,4 +351,33 @@ -(void)cilckBackBtn:(id)sender
{
[self.navigationController popViewControllerAnimated:YES];
}

- (void)addNewImageView:(RCDBaseSettingTableViewCell *)cell {
UIImageView *newImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"new"]];
newImageView.translatesAutoresizingMaskIntoConstraints = NO;
[cell.contentView addSubview:newImageView];
UILabel *leftLabel = cell.leftLabel;
NSDictionary *views = NSDictionaryOfVariableBindings(leftLabel,newImageView);
[cell.contentView
addConstraints:[NSLayoutConstraint
constraintsWithVisualFormat:@"H:[leftLabel]-10-[newImageView(50)]"
options:0
metrics:nil
views:views]];
[cell.contentView
addConstraints:[NSLayoutConstraint
constraintsWithVisualFormat:@"V:[newImageView(23)]"
options:0
metrics:nil
views:views]];
[cell.contentView
addConstraint:[NSLayoutConstraint constraintWithItem:newImageView
attribute:NSLayoutAttributeCenterY
relatedBy:NSLayoutRelationEqual
toItem:cell.contentView
attribute:NSLayoutAttributeCenterY
multiplier:1
constant:0]];

}
@end
10 changes: 5 additions & 5 deletions ios-rongimdemo/RCDAddFriendViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#import <RongIMLib/RCUserInfo.h>
#import <UIKit/UIKit.h>

@interface RCDAddFriendViewController : UIViewController
@interface RCDAddFriendViewController : UITableViewController

@property(nonatomic, strong) RCUserInfo *targetUserInfo;
@property(weak, nonatomic) IBOutlet UILabel *lblName;
@property(weak, nonatomic) IBOutlet UIImageView *ivAva;
@property(weak, nonatomic) IBOutlet UIButton *addFriendBtn;
@property(weak, nonatomic) IBOutlet UIButton *startChat;
@property(nonatomic, strong) UILabel *lblName;
@property(nonatomic, strong) UIImageView *ivAva;
@property(nonatomic, strong) UIButton *addFriendBtn;
@property(nonatomic, strong) UIButton *startChat;

@end
Loading

0 comments on commit e89a28a

Please sign in to comment.