mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
4.1 create liste devices view
This commit is contained in:
parent
87999fabfd
commit
a8e393ba16
14 changed files with 458 additions and 1 deletions
|
|
@ -18,6 +18,7 @@
|
|||
<outlet property="chatView" destination="49" id="Rxt-Zy-19x"/>
|
||||
<outlet property="composeIndicatorView" destination="fx4-ao-53M" id="xk5-nK-lur"/>
|
||||
<outlet property="composeLabel" destination="fpY-Fv-ht2" id="4L6-ik-ZAe"/>
|
||||
<outlet property="encryptedButton" destination="tjL-Vc-5gN" id="zxw-Fs-ofB"/>
|
||||
<outlet property="imagesCollectionView" destination="JGQ-p2-HCX" id="6dt-1f-jpa"/>
|
||||
<outlet property="imagesView" destination="3qd-ys-t2L" id="f9L-FU-PMI"/>
|
||||
<outlet property="infoButton" destination="Vqb-Un-4xv" id="pa1-Iz-5QQ"/>
|
||||
|
|
@ -293,10 +294,13 @@
|
|||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="tjL-Vc-5gN">
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="tjL-Vc-5gN" userLabel="encryptedButton">
|
||||
<rect key="frame" x="320" y="10" width="34" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" image="security_1_indicator.png"/>
|
||||
<connections>
|
||||
<action selector="onEncryptedDevicesClick:" destination="-1" eventType="touchUpInside" id="K1W-Ao-IDg"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@
|
|||
@property NSMutableArray <NSNumber *> *qualitySettingsArray;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *imagesCollectionView;
|
||||
@property (weak, nonatomic) IBOutlet UIView *imagesView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *encryptedButton;
|
||||
|
||||
+ (void)markAsRead:(LinphoneChatRoom *)chatRoom;
|
||||
+ (UIImage *)getSecurityImageForChatRoom:(LinphoneChatRoom *)chatRoom;
|
||||
|
|
@ -80,6 +81,7 @@
|
|||
- (IBAction)onCallClick:(id)sender;
|
||||
- (IBAction)onDeleteClick:(id)sender;
|
||||
- (IBAction)onEditionChangeClick:(id)sender;
|
||||
- (IBAction)onEncryptedDevicesClick:(id)sender;
|
||||
- (void)update;
|
||||
- (void)openFile:(NSString *) filePath;
|
||||
- (void)clearMessageView;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#import "Utils.h"
|
||||
#import "FileTransferDelegate.h"
|
||||
#import "UIChatBubbleTextCell.h"
|
||||
#import "DevicesListView.h"
|
||||
|
||||
@implementation ChatConversationView
|
||||
static NSString* groupName = @"group.belledonne-communications.linphone";
|
||||
|
|
@ -588,6 +589,13 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[self updateSuperposedButtons];
|
||||
}
|
||||
|
||||
- (IBAction)onEncryptedDevicesClick:(id)sender {
|
||||
DevicesListView *view = VIEW(DevicesListView);
|
||||
view.room = _chatRoom;
|
||||
|
||||
[PhoneMainView.instance popToView:view.compositeViewDescription];
|
||||
}
|
||||
|
||||
- (IBAction)onCallClick:(id)sender {
|
||||
bctbx_list_t *participants = linphone_chat_room_get_participants(_chatRoom);
|
||||
LinphoneParticipant *firstParticipant = participants ? (LinphoneParticipant *)participants->data : NULL;
|
||||
|
|
|
|||
29
Classes/DevicesListView.h
Normal file
29
Classes/DevicesListView.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// DevicesListView.h
|
||||
// linphone
|
||||
//
|
||||
// Created by Danmei Chen on 06/11/2018.
|
||||
//
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "UICompositeView.h"
|
||||
|
||||
@interface DevicesMenuEntry : NSObject {
|
||||
@public
|
||||
LinphoneParticipant *participant;
|
||||
NSInteger numberOfDevices;
|
||||
};
|
||||
@end
|
||||
|
||||
@interface DevicesListView : UIViewController <UICompositeViewDelegate, UITableViewDelegate, UITableViewDataSource>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;
|
||||
@property (weak, nonatomic) IBOutlet UITableView *tableView;
|
||||
|
||||
@property(nonatomic) LinphoneChatRoom *room;
|
||||
@property bctbx_list_t *devices;
|
||||
@property NSMutableArray *devicesMenuEntries;
|
||||
@property BOOL isOneToOne;
|
||||
|
||||
- (IBAction)onBackClick:(id)sender;
|
||||
|
||||
@end
|
||||
143
Classes/DevicesListView.m
Normal file
143
Classes/DevicesListView.m
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
//
|
||||
// DevicesListView.m
|
||||
// linphone
|
||||
//
|
||||
// Created by Danmei Chen on 06/11/2018.
|
||||
//
|
||||
|
||||
#import "DevicesListView.h"
|
||||
#import "PhoneMainView.h"
|
||||
#import "UIDevicesDetails.h"
|
||||
|
||||
@implementation DevicesMenuEntry
|
||||
|
||||
- (id)initWithTitle:(LinphoneParticipant *)par number:(NSInteger)num {
|
||||
if ((self = [super init])) {
|
||||
participant = par;
|
||||
numberOfDevices = num;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation DevicesListView
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
||||
static UICompositeViewDescription *compositeDescription = nil;
|
||||
|
||||
+ (UICompositeViewDescription *)compositeViewDescription {
|
||||
if (compositeDescription == nil) {
|
||||
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
|
||||
statusBar:StatusBarView.class
|
||||
tabBar:TabBarView.class
|
||||
sideMenu:SideMenuView.class
|
||||
fullscreen:false
|
||||
isLeftFragment:NO
|
||||
fragmentWith:ChatsListView.class];
|
||||
}
|
||||
return compositeDescription;
|
||||
}
|
||||
|
||||
- (UICompositeViewDescription *)compositeViewDescription {
|
||||
return self.class.compositeViewDescription;
|
||||
}
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
_tableView.dataSource = self;
|
||||
_tableView.delegate = self;
|
||||
_isOneToOne = linphone_chat_room_get_capabilities(_room) & LinphoneChatRoomCapabilitiesOneToOne;
|
||||
bctbx_list_t *participants = linphone_chat_room_get_participants(_room);
|
||||
_devicesMenuEntries = [[NSMutableArray alloc] init];
|
||||
|
||||
if (_isOneToOne) {
|
||||
LinphoneParticipant *firstParticipant = participants ? (LinphoneParticipant *)participants->data : NULL;
|
||||
const LinphoneAddress *addr = firstParticipant ? linphone_participant_get_address(firstParticipant) : linphone_chat_room_get_peer_address(_room);
|
||||
[ContactDisplay setDisplayNameLabel:_addressLabel forAddress:addr];
|
||||
_devices = linphone_participant_get_devices(firstParticipant);
|
||||
} else {
|
||||
LinphoneParticipant *participant;
|
||||
for (int i=0; i<bctbx_list_size(participants); i++) {
|
||||
participant = (LinphoneParticipant *)bctbx_list_nth_data(participants,i);
|
||||
[_devicesMenuEntries
|
||||
addObject:[[DevicesMenuEntry alloc] initWithTitle:participant number:0]];
|
||||
}
|
||||
|
||||
_addressLabel.text = [NSString stringWithUTF8String:linphone_chat_room_get_subject(_room) ?: LINPHONE_DUMMY_SUBJECT];
|
||||
}
|
||||
|
||||
_addressLabel.text = [NSString stringWithFormat:@"%@'s devices", _addressLabel.text];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
[_tableView reloadData];
|
||||
}
|
||||
|
||||
- (void) viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
}
|
||||
|
||||
#pragma mark - Action Functions
|
||||
- (IBAction)onBackClick:(id)sender {
|
||||
ChatConversationView *view = VIEW(ChatConversationView);
|
||||
[PhoneMainView.instance popToView:view.compositeViewDescription];
|
||||
}
|
||||
|
||||
#pragma mark - TableView
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
|
||||
return _isOneToOne ? bctbx_list_size(_devices) : [_devicesMenuEntries count];
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(nonnull NSIndexPath *)indexPath
|
||||
{
|
||||
if (!_isOneToOne) {
|
||||
DevicesMenuEntry *entry = [_devicesMenuEntries objectAtIndex:indexPath.row];
|
||||
return (entry->numberOfDevices + 1) * 56.0;
|
||||
|
||||
}
|
||||
return 56.0;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (_isOneToOne) {
|
||||
UITableViewCell *cell = [[UITableViewCell alloc] init];
|
||||
LinphoneParticipantDevice *device = (LinphoneParticipantDevice *)bctbx_list_nth_data(_devices, (int)[indexPath row]);
|
||||
cell.textLabel.text = [NSString stringWithUTF8String:linphone_address_as_string_uri_only(linphone_participant_device_get_address(device))];
|
||||
cell.selectionStyle =UITableViewCellSelectionStyleNone;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
NSString *kCellId = NSStringFromClass(UIDevicesDetails.class);
|
||||
UIDevicesDetails *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
|
||||
if (cell == nil) {
|
||||
cell = [[UIDevicesDetails alloc] initWithIdentifier:kCellId];
|
||||
}
|
||||
DevicesMenuEntry *entry = [_devicesMenuEntries objectAtIndex:indexPath.row];
|
||||
|
||||
[ContactDisplay setDisplayNameLabel:cell.addressLabel forAddress:linphone_participant_get_address(entry->participant)];
|
||||
cell.devices = linphone_participant_get_devices(entry->participant);
|
||||
UIImage *image = (entry->numberOfDevices != 0) ? [UIImage imageNamed:@"chevron_list_open"] : [UIImage imageNamed:@"chevron_list_close"];
|
||||
[cell.dropMenuButton setImage:image forState:UIControlStateNormal];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (!_isOneToOne) {
|
||||
DevicesMenuEntry *entry = [_devicesMenuEntries objectAtIndex:indexPath.row];
|
||||
NSInteger num = (entry->numberOfDevices != 0) ? 0: bctbx_list_size(linphone_participant_get_devices(entry->participant));
|
||||
[_devicesMenuEntries replaceObjectAtIndex:indexPath.row withObject:[[DevicesMenuEntry alloc] initWithTitle:entry->participant number:num]];
|
||||
[_tableView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
86
Classes/DevicesListView.xib
Normal file
86
Classes/DevicesListView.xib
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DevicesListView">
|
||||
<connections>
|
||||
<outlet property="addressLabel" destination="18k-7l-2Gm" id="f5j-jt-3Im"/>
|
||||
<outlet property="tableView" destination="mOi-nw-XnD" id="lZn-HK-m2k"/>
|
||||
<outlet property="view" destination="8ww-in-Nyd" id="EoG-R3-iy0"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="I5Q-PP-VGe" userLabel="iphone6MetricsView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view tag="1" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8ww-in-Nyd">
|
||||
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view tag="2" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7cG-75-7JN" userLabel="topBar">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" tag="3" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="color_F.png" translatesAutoresizingMaskIntoConstraints="NO" id="uhb-wz-8YN" userLabel="backgroundColor">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
</imageView>
|
||||
<button opaque="NO" tag="4" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VHx-cF-BIt" userLabel="backButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="75" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Back"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="back_default.png">
|
||||
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<state key="disabled" image="back_disabled.png"/>
|
||||
<state key="highlighted" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onBackClick:" destination="-1" eventType="touchUpInside" id="tJZ-ea-vFc"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="5" contentMode="left" fixedFrame="YES" text="Contact1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="18k-7l-2Gm" userLabel="addressLabel">
|
||||
<rect key="frame" x="75" y="0.0" width="142" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Contact name">
|
||||
<accessibilityTraits key="traits" none="YES"/>
|
||||
</accessibility>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="22"/>
|
||||
<color key="textColor" red="0.33333333329999998" green="0.33333333329999998" blue="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</view>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="mOi-nw-XnD">
|
||||
<rect key="frame" x="0.0" y="66" width="375" height="493"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="separatorColor" red="0.67030966280000004" green="0.71867996450000005" blue="0.75078284740000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<gestureRecognizers/>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="GbK-eP-eYK"/>
|
||||
<point key="canvasLocation" x="365.60000000000002" y="-36.431784107946029"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="back_default.png" width="24" height="22"/>
|
||||
<image name="back_disabled.png" width="24" height="22"/>
|
||||
<image name="color_E.png" width="2" height="2"/>
|
||||
<image name="color_F.png" width="2" height="2"/>
|
||||
</resources>
|
||||
</document>
|
||||
18
Classes/LinphoneUI/UIDevicesDetails.h
Normal file
18
Classes/LinphoneUI/UIDevicesDetails.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// UIDevicesDetails.h
|
||||
// linphone
|
||||
//
|
||||
// Created by Danmei Chen on 06/11/2018.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UIDevicesDetails : UITableViewCell <UITableViewDelegate, UITableViewDataSource>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *dropMenuButton;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;
|
||||
@property (weak, nonatomic) IBOutlet UITableView *devicesTable;
|
||||
@property bctbx_list_t *devices;
|
||||
|
||||
- (id)initWithIdentifier:(NSString *)identifier;
|
||||
@end
|
||||
62
Classes/LinphoneUI/UIDevicesDetails.m
Normal file
62
Classes/LinphoneUI/UIDevicesDetails.m
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
//
|
||||
// UIDevicesDetails.m
|
||||
// linphone
|
||||
//
|
||||
// Created by Danmei Chen on 06/11/2018.
|
||||
//
|
||||
|
||||
#import "UIDevicesDetails.h"
|
||||
|
||||
@implementation UIDevicesDetails
|
||||
#pragma mark - Lifecycle Functions
|
||||
- (id)initWithIdentifier:(NSString *)identifier {
|
||||
if ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]) != nil) {
|
||||
NSArray *arrayOfViews =
|
||||
[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self.class) owner:self options:nil];
|
||||
|
||||
// resize cell to match .nib size. It is needed when resized the cell to
|
||||
// correctly adapt its height too
|
||||
UIView *sub = ((UIView *)[arrayOfViews objectAtIndex:0]);
|
||||
[self setFrame:CGRectMake(0, 0, sub.frame.size.width, sub.frame.size.height)];
|
||||
[self addSubview:sub];
|
||||
_devicesTable.dataSource = self;
|
||||
_devicesTable.delegate = self;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - TableView
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return bctbx_list_size(_devices);
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
|
||||
return 56.0;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
UITableViewCell *cell = [[UITableViewCell alloc] init];
|
||||
LinphoneParticipantDevice *device = (LinphoneParticipantDevice *)bctbx_list_nth_data(_devices, (int)[indexPath row]);
|
||||
|
||||
cell.textLabel.text = [NSString stringWithUTF8String:linphone_address_as_string_uri_only(linphone_participant_device_get_address(device))];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
|
||||
{
|
||||
cell.backgroundColor = [UIColor colorWithRed:(245 / 255.0) green:(245 / 255.0) blue:(245 / 255.0) alpha:1.0];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
69
Classes/LinphoneUI/UIDevicesDetails.xib
Normal file
69
Classes/LinphoneUI/UIDevicesDetails.xib
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIDevicesDetails">
|
||||
<connections>
|
||||
<outlet property="addressLabel" destination="X0O-yd-2qT" id="QJ7-lu-E5n"/>
|
||||
<outlet property="devicesTable" destination="Bhw-SW-cbz" id="Fc6-BV-RrV"/>
|
||||
<outlet property="dropMenuButton" destination="fqu-53-vFp" id="qwN-sh-50p"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="wsb-SF-TOc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="156"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="color_F.png" translatesAutoresizingMaskIntoConstraints="NO" id="Uvg-tA-8Jm" userLabel="selectedButtonImage">
|
||||
<rect key="frame" x="0.0" y="55" width="375" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="gUM-dT-1wZ" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<rect key="frame" x="14" y="8" width="40" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="security_1_indicator.png" translatesAutoresizingMaskIntoConstraints="NO" id="kEm-qC-OwR" userLabel="securityImage">
|
||||
<rect key="frame" x="41" y="8" width="18" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" fixedFrame="YES" text="John Doe" lineBreakMode="tailTruncation" minimumFontSize="1" translatesAutoresizingMaskIntoConstraints="NO" id="X0O-yd-2qT" userLabel="addressLabel">
|
||||
<rect key="frame" x="69" y="16" width="237" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Contact name"/>
|
||||
<fontDescription key="fontDescription" name=".SFNSDisplay" family=".SF NS Display" pointSize="21"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fqu-53-vFp" userLabel="dropMenuButton">
|
||||
<rect key="frame" x="336" y="24" width="18" height="10"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" image="chevron_list_close.png"/>
|
||||
</button>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Bhw-SW-cbz">
|
||||
<rect key="frame" x="0.0" y="56" width="375" height="100"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.95887276789999998" green="0.96116071430000005" blue="0.95979352679999996" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="sectionIndexBackgroundColor" red="0.95892507685714279" green="0.95990397074285716" blue="0.96240171367142868" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<viewLayoutGuide key="safeArea" id="TKU-h3-Vmo"/>
|
||||
<point key="canvasLocation" x="250.40000000000001" y="215.8920539730135"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="avatar.png" width="259" height="259"/>
|
||||
<image name="chevron_list_close.png" width="17" height="10"/>
|
||||
<image name="color_F.png" width="2" height="2"/>
|
||||
<image name="security_1_indicator.png" width="27" height="32"/>
|
||||
</resources>
|
||||
</document>
|
||||
BIN
Resources/images/chevron_list_close.png
Normal file
BIN
Resources/images/chevron_list_close.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 437 B |
BIN
Resources/images/chevron_list_close@2x.png
Normal file
BIN
Resources/images/chevron_list_close@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 809 B |
BIN
Resources/images/chevron_list_open.png
Normal file
BIN
Resources/images/chevron_list_open.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 440 B |
BIN
Resources/images/chevron_list_open@2x.png
Normal file
BIN
Resources/images/chevron_list_open@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 841 B |
|
|
@ -124,6 +124,14 @@
|
|||
61AEBEA321906AFC00F35E7F /* mediastreamer2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C601FD220B462B0004FF95C /* mediastreamer2.framework */; };
|
||||
61AEBEAA21906B0700F35E7F /* mediastreamer2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C601FD220B462B0004FF95C /* mediastreamer2.framework */; };
|
||||
61AEBEAB21906B0700F35E7F /* mediastreamer2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8C601FD220B462B0004FF95C /* mediastreamer2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
61AEBEBD2191990A00F35E7F /* DevicesListView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61AEBEBC2191990A00F35E7F /* DevicesListView.m */; };
|
||||
61AEBEBF2191991F00F35E7F /* DevicesListView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61AEBEBE2191991F00F35E7F /* DevicesListView.xib */; };
|
||||
61AEBEC22191D7C800F35E7F /* UIDevicesDetails.m in Sources */ = {isa = PBXBuildFile; fileRef = 61AEBEC12191D7C800F35E7F /* UIDevicesDetails.m */; };
|
||||
61AEBEC42191D7D900F35E7F /* UIDevicesDetails.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61AEBEC32191D7D900F35E7F /* UIDevicesDetails.xib */; };
|
||||
61AEBEC62191E47500F35E7F /* chevron_list_close.png in Resources */ = {isa = PBXBuildFile; fileRef = 61AEBEC52191E47500F35E7F /* chevron_list_close.png */; };
|
||||
61AEBEC82191E48400F35E7F /* chevron_list_close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61AEBEC72191E48400F35E7F /* chevron_list_close@2x.png */; };
|
||||
61AEBECA2191E49300F35E7F /* chevron_list_open.png in Resources */ = {isa = PBXBuildFile; fileRef = 61AEBEC92191E49200F35E7F /* chevron_list_open.png */; };
|
||||
61AEBECC2191E4A300F35E7F /* chevron_list_open@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61AEBECB2191E4A300F35E7F /* chevron_list_open@2x.png */; };
|
||||
61F1997520C6B1D5006B069A /* AVKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61F1996E20C6B1D5006B069A /* AVKit.framework */; };
|
||||
630589E71B4E810900EFAE36 /* ChatTester.m in Sources */ = {isa = PBXBuildFile; fileRef = 630589DF1B4E810900EFAE36 /* ChatTester.m */; };
|
||||
630589E81B4E810900EFAE36 /* ContactsTester.m in Sources */ = {isa = PBXBuildFile; fileRef = 630589E11B4E810900EFAE36 /* ContactsTester.m */; };
|
||||
|
|
@ -1193,6 +1201,16 @@
|
|||
61AE365120C00B370089D9D3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
|
||||
61AE365320C00B370089D9D3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
61AE366320C00C810089D9D3 /* linphoneExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = linphoneExtension.entitlements; sourceTree = "<group>"; };
|
||||
61AEBEB5219198EF00F35E7F /* DevicesListView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DevicesListView.h; sourceTree = "<group>"; };
|
||||
61AEBEBC2191990A00F35E7F /* DevicesListView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DevicesListView.m; sourceTree = "<group>"; };
|
||||
61AEBEBE2191991F00F35E7F /* DevicesListView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DevicesListView.xib; sourceTree = "<group>"; };
|
||||
61AEBEC02191D7B400F35E7F /* UIDevicesDetails.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIDevicesDetails.h; sourceTree = "<group>"; };
|
||||
61AEBEC12191D7C800F35E7F /* UIDevicesDetails.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIDevicesDetails.m; sourceTree = "<group>"; };
|
||||
61AEBEC32191D7D900F35E7F /* UIDevicesDetails.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = UIDevicesDetails.xib; sourceTree = "<group>"; };
|
||||
61AEBEC52191E47500F35E7F /* chevron_list_close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = chevron_list_close.png; sourceTree = "<group>"; };
|
||||
61AEBEC72191E48400F35E7F /* chevron_list_close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "chevron_list_close@2x.png"; sourceTree = "<group>"; };
|
||||
61AEBEC92191E49200F35E7F /* chevron_list_open.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = chevron_list_open.png; sourceTree = "<group>"; };
|
||||
61AEBECB2191E4A300F35E7F /* chevron_list_open@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "chevron_list_open@2x.png"; sourceTree = "<group>"; };
|
||||
61F1996E20C6B1D5006B069A /* AVKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
|
||||
630589DE1B4E810900EFAE36 /* ChatTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatTester.h; sourceTree = "<group>"; };
|
||||
630589DF1B4E810900EFAE36 /* ChatTester.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatTester.m; sourceTree = "<group>"; };
|
||||
|
|
@ -2335,6 +2353,9 @@
|
|||
631098501D4660630041F2B3 /* CountryListView.xib */,
|
||||
631098471D4660580041F2B3 /* CountryListView.h */,
|
||||
631098481D4660580041F2B3 /* CountryListView.m */,
|
||||
61AEBEB5219198EF00F35E7F /* DevicesListView.h */,
|
||||
61AEBEBC2191990A00F35E7F /* DevicesListView.m */,
|
||||
61AEBEBE2191991F00F35E7F /* DevicesListView.xib */,
|
||||
22F2508B107141E100AC9B3F /* DialerView.h */,
|
||||
22F2508C107141E100AC9B3F /* DialerView.m */,
|
||||
D38187C415FE345B00C3EDCA /* DialerView.xib */,
|
||||
|
|
@ -2486,6 +2507,9 @@
|
|||
639E9CAE1C0DB80300019A75 /* UIContactDetailsCell.xib */,
|
||||
2248E90C12F7E4CF00220D9C /* UIDigitButton.h */,
|
||||
2248E90D12F7E4CF00220D9C /* UIDigitButton.m */,
|
||||
61AEBEC02191D7B400F35E7F /* UIDevicesDetails.h */,
|
||||
61AEBEC12191D7C800F35E7F /* UIDevicesDetails.m */,
|
||||
61AEBEC32191D7D900F35E7F /* UIDevicesDetails.xib */,
|
||||
2214EB8712F84EBB002A5394 /* UIHangUpButton.h */,
|
||||
2214EB8812F84EBB002A5394 /* UIHangUpButton.m */,
|
||||
D31C9C96158A1CDE00756B45 /* UIHistoryCell.h */,
|
||||
|
|
@ -2950,6 +2974,10 @@
|
|||
633FEC6D1D3CD5570014B822 /* checkbox_checked@2x.png */,
|
||||
633FEC6E1D3CD5570014B822 /* checkbox_unchecked.png */,
|
||||
633FEC6F1D3CD5570014B822 /* checkbox_unchecked@2x.png */,
|
||||
61AEBEC52191E47500F35E7F /* chevron_list_close.png */,
|
||||
61AEBEC72191E48400F35E7F /* chevron_list_close@2x.png */,
|
||||
61AEBEC92191E49200F35E7F /* chevron_list_open.png */,
|
||||
61AEBECB2191E4A300F35E7F /* chevron_list_open@2x.png */,
|
||||
633FEC701D3CD5570014B822 /* color_A.png */,
|
||||
633FEC711D3CD5570014B822 /* color_C.png */,
|
||||
633FEC721D3CD5570014B822 /* color_D.png */,
|
||||
|
|
@ -3965,6 +3993,7 @@
|
|||
633FEDE91D3CD5590014B822 /* call_status_missed~ipad@2x.png in Resources */,
|
||||
8CE24F4C1F8234A30077AC0A /* next_default@2x.png in Resources */,
|
||||
244523B11E8266CC0037A187 /* chat_read.png in Resources */,
|
||||
61AEBEC62191E47500F35E7F /* chevron_list_close.png in Resources */,
|
||||
CF7602D8210867E800749F76 /* RecordingsListView.xib in Resources */,
|
||||
639E9CAC1C0DB80300019A75 /* UIContactDetailsCell.xib in Resources */,
|
||||
633FEE511D3CD5590014B822 /* deselect_all@2x.png in Resources */,
|
||||
|
|
@ -3974,6 +4003,7 @@
|
|||
633FEE6F1D3CD5590014B822 /* footer_history_default@2x.png in Resources */,
|
||||
633FEF201D3CD55A0014B822 /* presence_unregistered.png in Resources */,
|
||||
61586B8D217A173F0038AC45 /* menu_options.png in Resources */,
|
||||
61AEBEC82191E48400F35E7F /* chevron_list_close@2x.png in Resources */,
|
||||
633FEF341D3CD55A0014B822 /* routes_default.png in Resources */,
|
||||
633FEE061D3CD5590014B822 /* chat_add_default.png in Resources */,
|
||||
633FEDF21D3CD5590014B822 /* call_video_start_default.png in Resources */,
|
||||
|
|
@ -4118,6 +4148,7 @@
|
|||
63E27A521C50EDB000D332AE /* hold.mkv in Resources */,
|
||||
633FEEDC1D3CD55A0014B822 /* numpad_8_default@2x.png in Resources */,
|
||||
633FEDAE1D3CD5590014B822 /* call_add_default.png in Resources */,
|
||||
61AEBEC42191D7D900F35E7F /* UIDevicesDetails.xib in Resources */,
|
||||
633FEE1D1D3CD5590014B822 /* chat_start_body_default~ipad@2x.png in Resources */,
|
||||
633FEEEB1D3CD55A0014B822 /* numpad_hash_default.png in Resources */,
|
||||
633FEF221D3CD55A0014B822 /* route_bluetooth_default.png in Resources */,
|
||||
|
|
@ -4130,6 +4161,7 @@
|
|||
633FEE111D3CD5590014B822 /* chat_list_indicator~ipad@2x.png in Resources */,
|
||||
633FEEFC1D3CD55A0014B822 /* options_add_call_default.png in Resources */,
|
||||
615A2819217F28160060F920 /* chat_list_indicator@2x.png in Resources */,
|
||||
61AEBECC2191E4A300F35E7F /* chevron_list_open@2x.png in Resources */,
|
||||
24BFAAA5209B0630004F47A7 /* contacts_sip_default.png in Resources */,
|
||||
633FEF441D3CD55A0014B822 /* speaker_default.png in Resources */,
|
||||
639CEB031A1DF4EB004DE38F /* UICompositeView.xib in Resources */,
|
||||
|
|
@ -4283,6 +4315,7 @@
|
|||
633FEE761D3CD5590014B822 /* history_all_selected.png in Resources */,
|
||||
8C300D9B1E40E0CC00728EF3 /* lime_ko@2x.png in Resources */,
|
||||
633FEF321D3CD55A0014B822 /* route_speaker_selected.png in Resources */,
|
||||
61AEBEBF2191991F00F35E7F /* DevicesListView.xib in Resources */,
|
||||
633FEDF51D3CD5590014B822 /* call_video_start_disabled@2x.png in Resources */,
|
||||
63B81A0C1B57DA33009604A6 /* LICENSE.txt in Resources */,
|
||||
633FEEDA1D3CD55A0014B822 /* numpad_7~ipad@2x.png in Resources */,
|
||||
|
|
@ -4320,6 +4353,7 @@
|
|||
633FEF501D3CD55A0014B822 /* valid_disabled.png in Resources */,
|
||||
631348321B6FA53300C6BDCB /* rootca.pem in Resources */,
|
||||
633FEEB31D3CD55A0014B822 /* numpad_3_default.png in Resources */,
|
||||
61AEBECA2191E49300F35E7F /* chevron_list_open.png in Resources */,
|
||||
633FEE1C1D3CD5590014B822 /* chat_start_body_default~ipad.png in Resources */,
|
||||
633FEE011D3CD5590014B822 /* camera_switch_over@2x.png in Resources */,
|
||||
633FEEA01D3CD55A0014B822 /* numpad_0_over~ipad@2x.png in Resources */,
|
||||
|
|
@ -4575,6 +4609,7 @@
|
|||
6308F9C51BF0DD6600D1234B /* XMLRPCHelper.m in Sources */,
|
||||
D3ED3E871586291E006C0DE4 /* TabBarView.m in Sources */,
|
||||
D3ED3EA71587334E006C0DE4 /* HistoryListTableView.m in Sources */,
|
||||
61AEBEBD2191990A00F35E7F /* DevicesListView.m in Sources */,
|
||||
D3ED3EB81587392C006C0DE4 /* HistoryListView.m in Sources */,
|
||||
24A345A61D95798A00881A5C /* UIShopTableCell.m in Sources */,
|
||||
8C1B67061E671826001EA2FE /* AudioHelper.m in Sources */,
|
||||
|
|
@ -4613,6 +4648,7 @@
|
|||
D32B9DFC15A2F131000B6DEC /* FastAddressBook.m in Sources */,
|
||||
D350F20E15A43BB100149E54 /* AssistantView.m in Sources */,
|
||||
D3F795D615A582810077328B /* ChatConversationView.m in Sources */,
|
||||
61AEBEC22191D7C800F35E7F /* UIDevicesDetails.m in Sources */,
|
||||
D32B6E2915A5BC440033019F /* ChatConversationTableView.m in Sources */,
|
||||
D3A8BB7015A6C7D500F96BE5 /* UIChatBubbleTextCell.m in Sources */,
|
||||
63D11C531C3D501200E8FCEE /* Log.m in Sources */,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue