forked from mirrors/linphone-iphone
Change Avatar Image on all views
This commit is contained in:
parent
e984af2418
commit
26fcac9bef
27 changed files with 79 additions and 69 deletions
|
|
@ -40,7 +40,7 @@
|
|||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button hidden="YES" opaque="NO" tag="3" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bPQ-aJ-Lk6" userLabel="cancelButton" customClass="UIInterfaceStyleButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="78" height="66"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="79" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Delete all"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="4" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9" userLabel="backButton" customClass="UIInterfaceStyleButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="78" height="66"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="79" 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"/>
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="5" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MuB-yy-R9o" userLabel="deleteButton" customClass="UIInterfaceStyleToggleButton">
|
||||
<rect key="frame" x="235" y="0.0" width="79" height="66"/>
|
||||
<rect key="frame" x="236" y="0.0" width="78" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Delete"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
<rect key="frame" x="0.0" y="66" width="393" height="678"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView tag="8" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="B6X-C9-2vm" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView tag="8" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="B6X-C9-2vm" userLabel="avatarImage">
|
||||
<rect key="frame" x="150" y="10" width="90" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<connections>
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" tag="9" contentMode="scaleToFill" fixedFrame="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="J67-KE-kHm" userLabel="activityIndicatorView">
|
||||
<rect key="frame" x="187" y="358" width="20" height="20"/>
|
||||
<rect key="frame" x="188" y="358" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
|
|
@ -255,7 +255,7 @@
|
|||
<rect key="frame" x="0.0" y="66" width="667" height="267"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView tag="8" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="IJJ-eZ-rC2" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView tag="8" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="IJJ-eZ-rC2" userLabel="avatarImage">
|
||||
<rect key="frame" x="46" y="8" width="62" height="62"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<device id="retina6_0" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
<rect key="frame" x="0.0" y="66" width="389" height="250"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" tag="8" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="23" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView userInteractionEnabled="NO" tag="8" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="23" userLabel="avatarImage">
|
||||
<rect key="frame" x="141" y="8" width="104" height="100"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Contact avatar">
|
||||
|
|
@ -251,7 +251,7 @@
|
|||
<rect key="frame" x="0.0" y="66" width="391" height="102"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" tag="8" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="d9m-G0-1u3" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView userInteractionEnabled="NO" tag="8" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="d9m-G0-1u3" userLabel="avatarImage">
|
||||
<rect key="frame" x="16" y="8" width="51" height="86"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Contact avatar">
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@
|
|||
cell.addressLabel.text = linphoneContact ? [NSString stringWithUTF8String:str] : phoneOrAddr;
|
||||
ms_free(str);
|
||||
cell.selectedImage.hidden = ![_contactsGroup containsObject:cell.addressLabel.text];
|
||||
[cell.avatarImage setImage:[FastAddressBook imageForAddress:addr] bordered:NO withRoundedRadius:YES];
|
||||
[cell.avatarImage setImage:[FastAddressBook imageForAddress:addr]];
|
||||
cell.contentView.userInteractionEnabled = false;
|
||||
cell.contentView.backgroundColor = UIColor.clearColor;
|
||||
cell.backgroundColor = UIColor.clearColor;
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
cell.uri = _contacts[indexPath.row];
|
||||
LinphoneAddress *addr = linphone_address_new(cell.uri.UTF8String);
|
||||
cell.nameLabel.text = (addr == nil? cell.uri : [FastAddressBook displayNameForAddress:addr]);
|
||||
[cell.avatarImage setImage:[FastAddressBook imageForAddress:addr] bordered:YES withRoundedRadius:YES];
|
||||
[cell.avatarImage setImage:[FastAddressBook imageForAddress:addr]];
|
||||
cell.controllerView = self;
|
||||
if(![_admins containsObject:cell.uri]) {
|
||||
cell.adminLabel.enabled = FALSE;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
@property(nonatomic, strong) IBOutlet UIToggleButton *editButton;
|
||||
@property(nonatomic, strong) IBOutlet UIButton *backButton;
|
||||
@property(nonatomic, strong) IBOutlet UIButton *cancelButton;
|
||||
@property(weak, nonatomic) IBOutlet UIRoundedImageView *avatarImage;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView *avatarImage;
|
||||
@property(weak, nonatomic) IBOutlet UILabel *nameLabel;
|
||||
@property(weak, nonatomic) IBOutlet UILabel *organizationLabel;
|
||||
@property(weak, nonatomic) IBOutlet UIToggleButton *deleteButton;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
}
|
||||
|
||||
LOGI(@"Reset data to contact %p", _contact);
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact] bordered:NO withRoundedRadius:YES];
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact]];
|
||||
[_tableController setContact:_contact];
|
||||
_emptyLabel.hidden = YES;
|
||||
_avatarImage.hidden = !_emptyLabel.hidden;
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
_deleteButton.hidden = !_emptyLabel.hidden || [_contact createdFromLdapOrProvisioning];
|
||||
_editButton.hidden = !_emptyLabel.hidden || [_contact createdFromLdapOrProvisioning];
|
||||
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact] bordered:NO withRoundedRadius:YES];
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact]];
|
||||
[ContactDisplay setDisplayNameLabel:_nameLabel forContact:_contact];
|
||||
_organizationLabel.text = _contact.organizationName;
|
||||
[_tableController setContact:_contact];
|
||||
|
|
@ -456,7 +456,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
_contact.firstName = _tmpContact.firstName.copy;
|
||||
_contact.lastName = _tmpContact.lastName.copy;
|
||||
_contact.avatar = _tmpContact.avatar.copy;
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact] bordered:NO withRoundedRadius:YES];
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact]];
|
||||
|
||||
while (_contact.sipAddresses.count > 0) {
|
||||
[_contact removeSipAddressAtIndex:0];
|
||||
|
|
@ -633,7 +633,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
[_contact setAvatar:image];
|
||||
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact] bordered:NO withRoundedRadius:YES];
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact]];
|
||||
}
|
||||
|
||||
- (void)imagePickerDelegateVideo:(NSURL*)url info:(NSDictionary *)info {
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) {
|
|||
|
||||
// Cached avatar
|
||||
UIImage *image = [FastAddressBook imageForContact:contact];
|
||||
[cell.avatarImage setImage:image bordered:NO withRoundedRadius:YES];
|
||||
[cell.avatarImage setImage:image];
|
||||
[cell setContact:contact];
|
||||
[super accessoryForCell:cell atPath:indexPath];
|
||||
cell.contentView.userInteractionEnabled = false;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
}
|
||||
@property(weak, nonatomic) IBOutlet UIButton *backButton;
|
||||
@property(weak, nonatomic) IBOutlet UILabel *contactLabel;
|
||||
@property(nonatomic, strong) IBOutlet UIRoundedImageView *avatarImage;
|
||||
@property(nonatomic, strong) IBOutlet UIImageView *avatarImage;
|
||||
@property(nonatomic, strong) IBOutlet UILabel *addressLabel;
|
||||
@property(nonatomic, strong) IBOutlet UIButton *addContactButton;
|
||||
@property(nonatomic, copy, setter=setCallLogId:) NSString *callLogId;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
const LinphoneAddress *addr = linphone_call_log_get_remote_address(callLog);
|
||||
_addContactButton.hidden = ([FastAddressBook getContactWithAddress:addr] != nil);
|
||||
[ContactDisplay setDisplayNameLabel:_contactLabel forAddress:addr withAddressLabel:_addressLabel];
|
||||
[_avatarImage setImage:[FastAddressBook imageForAddress:addr] bordered:NO withRoundedRadius:YES];
|
||||
[_avatarImage setImage:[FastAddressBook imageForAddress:addr]];
|
||||
Contact *contact = [FastAddressBook getContactWithAddress:addr];
|
||||
const LinphonePresenceModel *model = contact.friend ? linphone_friend_get_presence_model(contact.friend) : NULL;
|
||||
_linphoneImage.hidden = [LinphoneManager.instance lpConfigBoolForKey:@"hide_linphone_contacts" inSection:@"app"] ||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="189" height="64"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="hBI-Xz-aEV" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="hBI-Xz-aEV" userLabel="avatarImage">
|
||||
<rect key="frame" x="6" y="20" width="27" height="27"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="86"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="19" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="19" userLabel="avatarImage" customClass="UIImageView">
|
||||
<rect key="frame" x="10" y="11" width="42" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" insetsLayoutMarginsFromSafeArea="NO" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="Z2U-vm-azg" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" insetsLayoutMarginsFromSafeArea="NO" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="Z2U-vm-azg" userLabel="avatarImage">
|
||||
<rect key="frame" x="0.0" y="8" width="44" height="28"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
</imageView>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina5_5" orientation="landscape" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
<action selector="onDelete:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="gSd-t2-eDY"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="Zsv-H9-9Dv" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="Zsv-H9-9Dv" userLabel="avatarImage">
|
||||
<rect key="frame" x="8" y="0.0" width="35" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Linphone"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="ktO-jm-Ra6" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="ktO-jm-Ra6" userLabel="avatarImage">
|
||||
<rect key="frame" x="10" y="10" width="40" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="360" height="49"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="23" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="23" userLabel="avatarImage">
|
||||
<rect key="frame" x="6" y="9" width="32" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIHistoryCell">
|
||||
|
|
@ -18,31 +20,27 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" image="avatar.png" id="J9B-Wl-Qgm" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="J9B-Wl-Qgm" userLabel="avatarImage">
|
||||
<rect key="frame" x="6" y="6" width="32" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="history_missed_default.png" id="Jpe-IK-xK1" userLabel="stateImage">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="history_missed_default.png" translatesAutoresizingMaskIntoConstraints="NO" id="Jpe-IK-xK1" userLabel="stateImage">
|
||||
<rect key="frame" x="46" y="6" width="32" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="John Doe" lineBreakMode="tailTruncation" minimumFontSize="10" id="zG2-Kg-0jD" userLabel="displayNameLabel">
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" fixedFrame="YES" text="John Doe" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="zG2-Kg-0jD" userLabel="displayNameLabel">
|
||||
<rect key="frame" x="86" y="0.0" width="237" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Firstname"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="21"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Lfl-dI-bSt" userLabel="detailsButton" customClass="UIIconButton">
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Lfl-dI-bSt" userLabel="detailsButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="331" y="0.0" width="44" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" image="list_details_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<state key="highlighted" image="list_details_over.png"/>
|
||||
<connections>
|
||||
|
|
@ -50,17 +48,16 @@
|
|||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="366.5" y="248"/>
|
||||
<point key="canvasLocation" x="559.5419847328244" y="174.64788732394368"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="avatar.png" width="255" height="255"/>
|
||||
<image name="history_missed_default.png" width="32" height="32"/>
|
||||
<image name="list_details_default.png" width="33" height="34"/>
|
||||
<image name="list_details_over.png" width="33" height="34"/>
|
||||
<image name="avatar.png" width="414.39999389648438" height="414.39999389648438"/>
|
||||
<image name="history_missed_default.png" width="52.799999237060547" height="52.799999237060547"/>
|
||||
<image name="list_details_default.png" width="54.400001525878906" height="55.200000762939453"/>
|
||||
<image name="list_details_over.png" width="54.400001525878906" height="55.200000762939453"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
@property(readonly, nonatomic) LinphoneEventLog *event;
|
||||
@property(readonly, nonatomic) LinphoneChatMessage *message;
|
||||
@property(nonatomic, weak) IBOutlet UIImageView *backgroundColorImage;
|
||||
@property(nonatomic, weak) IBOutlet UIRoundedImageView *avatarImage;
|
||||
@property(nonatomic, weak) IBOutlet UIImageView *avatarImage;
|
||||
@property(nonatomic, weak) IBOutlet UILabel *contactDateLabel;
|
||||
//@property(weak, nonatomic) IBOutlet UIActivityIndicatorView *statusInProgressSpinner;
|
||||
@property(nonatomic, weak) IBOutlet UITextViewNoDefine *messageText;
|
||||
|
|
|
|||
|
|
@ -201,9 +201,7 @@
|
|||
_avatarImage.hidden = TRUE;
|
||||
|
||||
} else {
|
||||
[_avatarImage setImage:[FastAddressBook imageForAddress:linphone_chat_message_get_from_address(_message)]
|
||||
bordered:NO
|
||||
withRoundedRadius:YES];
|
||||
[_avatarImage setImage:[FastAddressBook imageForAddress:linphone_chat_message_get_from_address(_message)]];
|
||||
_contactDateLabel.text = [self.class ContactDateForChat:_message];
|
||||
_contactDateLabel.textAlignment = NSTextAlignmentLeft;
|
||||
_avatarImage.hidden = !_isFirst;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
}
|
||||
|
||||
@property(readonly, nonatomic) LinphoneEventLog *event;
|
||||
@property(nonatomic, strong) IBOutlet UIRoundedImageView *avatarImage;
|
||||
@property(nonatomic, strong) IBOutlet UIImageView *avatarImage;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *securityImage;
|
||||
@property(nonatomic, strong) IBOutlet UILabel *addressLabel;
|
||||
@property(nonatomic, strong) IBOutlet UILabel *chatContentLabel;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
const LinphoneAddress *addr = firstParticipant ? linphone_participant_get_address(firstParticipant) : linphone_chat_room_get_peer_address(chatRoom);
|
||||
if (addr) {
|
||||
[ContactDisplay setDisplayNameLabel:_addressLabel forAddress:addr];
|
||||
[_avatarImage setImage:[FastAddressBook imageForAddress:addr] bordered:NO withRoundedRadius:YES];
|
||||
[_avatarImage setImage:[FastAddressBook imageForAddress:addr]];
|
||||
} else {
|
||||
_addressLabel.text = [NSString stringWithUTF8String:LINPHONE_DUMMY_SUBJECT];
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
} else {
|
||||
const char *subject = linphone_chat_room_get_subject(chatRoom);
|
||||
_addressLabel.text = [NSString stringWithUTF8String:subject ?: LINPHONE_DUMMY_SUBJECT];
|
||||
[_avatarImage setImage:[UIImage imageNamed:@"chat_group_avatar.png"] bordered:NO withRoundedRadius:YES];
|
||||
[_avatarImage setImage:[UIImage imageNamed:@"chat_group_avatar.png"]];
|
||||
}
|
||||
// TODO update security image when security level changed
|
||||
[_securityImage setImage:[FastAddressBook imageForSecurityLevel:linphone_chat_room_get_security_level(chatRoom)]];
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
@interface UIChatConversationImdnTableViewCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIRoundedImageView *avatar;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatar;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *displayName;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
|
||||
- (id)initWithIdentifier:(NSString *)identifier;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
@interface UIChatConversationInfoTableViewCell : UITableViewCell <UIGestureRecognizerDelegate>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIRoundedImageView *avatarImage;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImage;
|
||||
@property (weak, nonatomic) IBOutlet UIIconButton *removeButton;
|
||||
@property (weak, nonatomic) IBOutlet UIView *adminButton;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *adminLabel;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
@property(weak, nonatomic) IBOutlet UILabel *addressLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *selectedImage;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *linphoneImage;
|
||||
@property (weak, nonatomic) IBOutlet UIRoundedImageView *avatarImage;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImage;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *securityImage;
|
||||
@property (weak, nonatomic) IBOutlet UIView *greyView;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
@property(nonatomic, strong) IBOutlet UILabel *nameLabel;
|
||||
@property(nonatomic, strong) IBOutlet UILabel *organizationLabel;
|
||||
@property(nonatomic, strong) IBOutlet UIRoundedImageView *avatarImage;
|
||||
@property(nonatomic, strong) IBOutlet UIImageView *avatarImage;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView *linphoneImage;
|
||||
@property(nonatomic, assign) Contact *contact;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
@property (nonatomic, assign) LinphoneCallLog *callLog;
|
||||
|
||||
@property(weak, nonatomic) IBOutlet UIRoundedImageView *avatarImage;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView *avatarImage;
|
||||
@property(nonatomic, strong) IBOutlet UILabel *displayNameLabel;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView *stateImage;
|
||||
@property(weak, nonatomic) IBOutlet UIIconButton *detailsButton;
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
[displayNameLabel.text stringByAppendingString:[NSString stringWithFormat:@" (%lu)", count]];
|
||||
}
|
||||
|
||||
[_avatarImage setImage:[FastAddressBook imageForAddress:addr] bordered:NO withRoundedRadius:YES];
|
||||
[_avatarImage setImage:[FastAddressBook imageForAddress:addr]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ class Avatar : UIView {
|
|||
|
||||
let initialsLabel: StyledLabel
|
||||
let iconImageView = UIImageView()
|
||||
let iconPresenceView = UIImageView(image: UIImage(named:"led_connected"))
|
||||
|
||||
init (color:LightDarkColor,textStyle:TextStyle) {
|
||||
initialsLabel = StyledLabel(textStyle)
|
||||
|
|
@ -44,11 +43,9 @@ class Avatar : UIView {
|
|||
self.backgroundColor = color.get()
|
||||
addSubview(initialsLabel)
|
||||
addSubview(iconImageView)
|
||||
addSubview(iconPresenceView)
|
||||
iconImageView.backgroundColor = .white
|
||||
initialsLabel.matchParentSideBorders().matchParentHeight().done()
|
||||
iconImageView.matchParentDimmensions().done()
|
||||
iconPresenceView.alignParentRight().alignParentBottom().done()
|
||||
UIDeviceBridge.displayModeSwitched.observe { _ in
|
||||
self.initialsLabel.applyStyle(textStyle)
|
||||
self.backgroundColor = color.get()
|
||||
|
|
@ -94,7 +91,7 @@ class Avatar : UIView {
|
|||
|
||||
@objc class AvatarBridge : NSObject { // Ugly work around to tap into the swift Avatars, until rest of the app is reworked in Swift.
|
||||
static var shared : Avatar? = nil
|
||||
static let size = 50.0
|
||||
static let size = 50.0
|
||||
@objc static func prepareIt() {
|
||||
if (shared != nil) {
|
||||
shared?.removeFromSuperview()
|
||||
|
|
@ -111,7 +108,16 @@ class Avatar : UIView {
|
|||
}
|
||||
let sAddr = Address.getSwiftObject(cObject: address)
|
||||
shared?.fillFromAddress(address: sAddr)
|
||||
return shared?.toImage()
|
||||
|
||||
let avatarWithPresence = UIView(frame: CGRect(x: 0, y: 0, width: size, height: size))
|
||||
let avatarImageWihtoutPresence = UIImageView(image: shared?.toImage())
|
||||
let iconPresenceView = UIImageView(image: UIImage(named:"led_connected"))
|
||||
|
||||
avatarWithPresence.addSubview(avatarImageWihtoutPresence)
|
||||
avatarWithPresence.addSubview(iconPresenceView)
|
||||
iconPresenceView.frame = CGRect(x: 35, y: 35, width: 16, height: 16)
|
||||
|
||||
return avatarWithPresence.toImage()
|
||||
}
|
||||
|
||||
@objc static func imageForInitials(displayName:String) -> UIImage? {
|
||||
|
|
@ -124,7 +130,16 @@ class Avatar : UIView {
|
|||
shared?.initialsLabel.text = Address.initials(displayName: displayName)
|
||||
shared?.initialsLabel.isHidden = false
|
||||
shared?.iconImageView.isHidden = true
|
||||
return shared?.toImage()
|
||||
|
||||
let avatarWithPresence = UIView(frame: CGRect(x: 0, y: 0, width: size, height: size))
|
||||
let avatarImageWihtoutPresence = UIImageView(image: shared?.toImage())
|
||||
let iconPresenceView = UIImageView(image: UIImage(named:"led_connected"))
|
||||
|
||||
avatarWithPresence.addSubview(avatarImageWihtoutPresence)
|
||||
avatarWithPresence.addSubview(iconPresenceView)
|
||||
iconPresenceView.frame = CGRect(x: 35, y: 35, width: 16, height: 16)
|
||||
|
||||
return avatarWithPresence.toImage()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue