mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
contact details top bar
This commit is contained in:
parent
5e3f5203fb
commit
b73ab96def
10 changed files with 113 additions and 122 deletions
|
|
@ -9,6 +9,7 @@
|
|||
<connections>
|
||||
<outlet property="avatarImage" destination="B6X-C9-2vm" id="tQc-xv-nJg"/>
|
||||
<outlet property="backButton" destination="9" id="50"/>
|
||||
<outlet property="cancelButton" destination="bPQ-aJ-Lk6" id="QHN-qi-QNv"/>
|
||||
<outlet property="editButton" destination="8" id="31"/>
|
||||
<outlet property="tableController" destination="20" id="27"/>
|
||||
<outlet property="view" destination="1" id="3"/>
|
||||
|
|
@ -31,6 +32,19 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="bPQ-aJ-Lk6" userLabel="cancelButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="0.0" y="1" width="75" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Delete all"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="cancel_edit.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onCancelClick:" destination="-1" eventType="touchUpInside" id="yyu-9r-MIh"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="9" userLabel="backButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="75" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
|
|
@ -117,6 +131,8 @@
|
|||
<resources>
|
||||
<image name="avatar.png" width="255" height="255"/>
|
||||
<image name="back.png" width="24" height="21"/>
|
||||
<image name="cancel_edit.png" width="29" height="29"/>
|
||||
<image name="color_E.png" width="1" height="1"/>
|
||||
<image name="color_F.png" width="1" height="1"/>
|
||||
<image name="delete.png" width="21" height="27"/>
|
||||
<image name="edit.png" width="28" height="28"/>
|
||||
|
|
|
|||
|
|
@ -147,9 +147,17 @@
|
|||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
<searchBar contentMode="redraw" showsCancelButton="YES" id="5jE-oF-d45" userLabel="searchBar">
|
||||
<rect key="frame" x="0.0" y="42" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="TJG-JZ-YRR" id="8Hr-Dq-RVQ"/>
|
||||
</connections>
|
||||
</searchBar>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="zOo-FS-W6l" userLabel="tableView">
|
||||
<rect key="frame" x="0.0" y="86" width="375" height="475"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<inset key="contentInset" minX="0.0" minY="0.0" maxX="0.0" maxY="10"/>
|
||||
<inset key="scrollIndicatorInsets" minX="0.0" minY="0.0" maxX="0.0" maxY="10"/>
|
||||
|
|
@ -159,14 +167,6 @@
|
|||
<outlet property="delegate" destination="TJG-JZ-YRR" id="V1N-gI-U4J"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<searchBar contentMode="redraw" showsCancelButton="YES" id="5jE-oF-d45" userLabel="searchBar">
|
||||
<rect key="frame" x="0.0" y="42" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="TJG-JZ-YRR" id="8Hr-Dq-RVQ"/>
|
||||
</connections>
|
||||
</searchBar>
|
||||
</subviews>
|
||||
</view>
|
||||
</subviews>
|
||||
|
|
|
|||
|
|
@ -22,12 +22,6 @@
|
|||
|
||||
@implementation ContactDetailsView
|
||||
|
||||
@synthesize tableController;
|
||||
@synthesize contact;
|
||||
@synthesize editButton;
|
||||
@synthesize backButton;
|
||||
@synthesize cancelButton;
|
||||
|
||||
static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info, void *context);
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
|
@ -51,21 +45,21 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
|
||||
- (void)resetData {
|
||||
[self disableEdit:FALSE];
|
||||
if (contact == NULL) {
|
||||
if (_contact == NULL) {
|
||||
ABAddressBookRevert(addressBook);
|
||||
return;
|
||||
}
|
||||
|
||||
LOGI(@"Reset data to contact %p", contact);
|
||||
ABRecordID recordID = ABRecordGetRecordID(contact);
|
||||
LOGI(@"Reset data to contact %p", _contact);
|
||||
ABRecordID recordID = ABRecordGetRecordID(_contact);
|
||||
ABAddressBookRevert(addressBook);
|
||||
contact = ABAddressBookGetPersonWithRecordID(addressBook, recordID);
|
||||
if (contact == NULL) {
|
||||
_contact = ABAddressBookGetPersonWithRecordID(addressBook, recordID);
|
||||
if (_contact == NULL) {
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
return;
|
||||
}
|
||||
_avatarImage.image = [FastAddressBook getContactImage:contact thumbnail:NO];
|
||||
[tableController setContact:contact];
|
||||
_avatarImage.image = [FastAddressBook getContactImage:_contact thumbnail:NO];
|
||||
[_tableController setContact:_contact];
|
||||
}
|
||||
|
||||
static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
||||
|
|
@ -76,28 +70,28 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
}
|
||||
|
||||
- (void)removeContact {
|
||||
if (contact != NULL) {
|
||||
if (_contact != NULL) {
|
||||
inhibUpdate = TRUE;
|
||||
[[[LinphoneManager instance] fastAddressBook] removeContact:contact];
|
||||
[[[LinphoneManager instance] fastAddressBook] removeContact:_contact];
|
||||
inhibUpdate = FALSE;
|
||||
}
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
}
|
||||
|
||||
- (void)saveData {
|
||||
if (contact == NULL) {
|
||||
if (_contact == NULL) {
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
return;
|
||||
}
|
||||
|
||||
// Add contact to book
|
||||
CFErrorRef error = NULL;
|
||||
if (ABRecordGetRecordID(contact) == kABRecordInvalidID) {
|
||||
ABAddressBookAddRecord(addressBook, contact, (CFErrorRef *)&error);
|
||||
if (ABRecordGetRecordID(_contact) == kABRecordInvalidID) {
|
||||
ABAddressBookAddRecord(addressBook, _contact, (CFErrorRef *)&error);
|
||||
if (error != NULL) {
|
||||
LOGE(@"Add contact %p: Fail(%@)", contact, [(__bridge NSError *)error localizedDescription]);
|
||||
LOGE(@"Add contact %p: Fail(%@)", _contact, [(__bridge NSError *)error localizedDescription]);
|
||||
} else {
|
||||
LOGI(@"Add contact %p: Success!", contact);
|
||||
LOGI(@"Add contact %p: Success!", _contact);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -115,15 +109,15 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
}
|
||||
|
||||
- (void)selectContact:(ABRecordRef)acontact andReload:(BOOL)reload {
|
||||
contact = NULL;
|
||||
_contact = NULL;
|
||||
[self resetData];
|
||||
contact = acontact;
|
||||
_avatarImage.image = [FastAddressBook getContactImage:contact thumbnail:NO];
|
||||
[tableController setContact:contact];
|
||||
_contact = acontact;
|
||||
_avatarImage.image = [FastAddressBook getContactImage:_contact thumbnail:NO];
|
||||
[_tableController setContact:_contact];
|
||||
|
||||
if (reload) {
|
||||
[self enableEdit:FALSE];
|
||||
[[tableController tableView] reloadData];
|
||||
[[_tableController tableView] reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -134,17 +128,17 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
|
||||
if (([username rangeOfString:@"@"].length > 0) &&
|
||||
([[LinphoneManager instance] lpConfigBoolForKey:@"show_contacts_emails_preference"] == true)) {
|
||||
[tableController addEmailField:username];
|
||||
[_tableController addEmailField:username];
|
||||
} else if ((linphone_proxy_config_is_phone_number(NULL, [username UTF8String])) &&
|
||||
([[LinphoneManager instance] lpConfigBoolForKey:@"save_new_contacts_as_phone_number"] == true)) {
|
||||
[tableController addPhoneField:username];
|
||||
[_tableController addPhoneField:username];
|
||||
} else {
|
||||
[tableController addSipField:address];
|
||||
[_tableController addSipField:address];
|
||||
}
|
||||
linphone_address_destroy(linphoneAddress);
|
||||
|
||||
[self enableEdit:FALSE];
|
||||
[[tableController tableView] reloadData];
|
||||
[[_tableController tableView] reloadData];
|
||||
}
|
||||
|
||||
- (void)newContact {
|
||||
|
|
@ -175,9 +169,9 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
[super viewWillAppear:animated];
|
||||
if ([ContactSelection getSelectionMode] == ContactSelectionModeEdit ||
|
||||
[ContactSelection getSelectionMode] == ContactSelectionModeNone) {
|
||||
[editButton setHidden:FALSE];
|
||||
[_editButton setHidden:FALSE];
|
||||
} else {
|
||||
[editButton setHidden:TRUE];
|
||||
[_editButton setHidden:TRUE];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -204,21 +198,21 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
#pragma mark -
|
||||
|
||||
- (void)enableEdit:(BOOL)animated {
|
||||
if (![tableController isEditing]) {
|
||||
[tableController setEditing:TRUE animated:animated];
|
||||
if (!_tableController.isEditing) {
|
||||
[_tableController setEditing:TRUE animated:animated];
|
||||
}
|
||||
[editButton setOn];
|
||||
[cancelButton setHidden:FALSE];
|
||||
[backButton setHidden:TRUE];
|
||||
[_editButton setOn];
|
||||
[_cancelButton setHidden:FALSE];
|
||||
[_backButton setHidden:TRUE];
|
||||
}
|
||||
|
||||
- (void)disableEdit:(BOOL)animated {
|
||||
if ([tableController isEditing]) {
|
||||
[tableController setEditing:FALSE animated:animated];
|
||||
if (_tableController.isEditing) {
|
||||
[_tableController setEditing:FALSE animated:animated];
|
||||
}
|
||||
[editButton setOff];
|
||||
[cancelButton setHidden:TRUE];
|
||||
[backButton setHidden:FALSE];
|
||||
[_editButton setOff];
|
||||
[_cancelButton setHidden:TRUE];
|
||||
[_backButton setHidden:FALSE];
|
||||
}
|
||||
|
||||
#pragma mark - Action Functions
|
||||
|
|
@ -236,8 +230,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
- (IBAction)onEditClick:(id)event {
|
||||
if ([tableController isEditing]) {
|
||||
if ([tableController isValid]) {
|
||||
if (_tableController.isEditing) {
|
||||
if ([_tableController isValid]) {
|
||||
[self disableEdit:TRUE];
|
||||
[self saveData];
|
||||
}
|
||||
|
|
@ -258,16 +252,16 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
- (IBAction)onAvatarClick:(id)sender {
|
||||
if (tableController.isEditing) {
|
||||
if (_tableController.isEditing) {
|
||||
[ImagePickerView SelectImageFromDevice:self atPosition:CGRectNull inView:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)onModification:(id)event {
|
||||
if (![tableController isEditing] || [tableController isValid]) {
|
||||
[editButton setEnabled:TRUE];
|
||||
if (!_tableController.isEditing || [_tableController isValid]) {
|
||||
[_editButton setEnabled:TRUE];
|
||||
} else {
|
||||
[editButton setEnabled:FALSE];
|
||||
[_editButton setEnabled:FALSE];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -276,7 +270,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
- (void)imagePickerDelegateImage:(UIImage *)image info:(NSDictionary *)info {
|
||||
FastAddressBook *fab = [LinphoneManager instance].fastAddressBook;
|
||||
CFErrorRef error = NULL;
|
||||
if (!ABPersonRemoveImageData(contact, (CFErrorRef *)&error)) {
|
||||
if (!ABPersonRemoveImageData(_contact, (CFErrorRef *)&error)) {
|
||||
LOGI(@"Can't remove entry: %@", [(__bridge NSError *)error localizedDescription]);
|
||||
}
|
||||
NSData *dataRef = UIImageJPEGRepresentation(image, 0.9f);
|
||||
|
|
@ -284,7 +278,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
[fab saveAddressBook];
|
||||
|
||||
if (!ABPersonSetImageData(contact, cfdata, (CFErrorRef *)&error)) {
|
||||
if (!ABPersonSetImageData(_contact, cfdata, (CFErrorRef *)&error)) {
|
||||
LOGI(@"Can't add entry: %@", [(__bridge NSError *)error localizedDescription]);
|
||||
} else {
|
||||
[fab saveAddressBook];
|
||||
|
|
@ -292,6 +286,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
CFRelease(cfdata);
|
||||
|
||||
_avatarImage.image = [FastAddressBook getContactImage:contact thumbnail:NO];
|
||||
_avatarImage.image = [FastAddressBook getContactImage:_contact thumbnail:NO];
|
||||
}
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -107,28 +107,21 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
#pragma mark - ViewController Functions
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
}
|
||||
|
||||
- (void)relayoutTableView {
|
||||
CGRect subViewFrame = self.view.frame;
|
||||
// let the top bar be visible
|
||||
subViewFrame.origin.y += self.topBar.frame.size.height;
|
||||
subViewFrame.size.height -= self.topBar.frame.size.height;
|
||||
[UIView animateWithDuration:0.2
|
||||
animations:^{
|
||||
self.tableController.tableView.frame = subViewFrame;
|
||||
}];
|
||||
}
|
||||
//- (void)relayoutTableView {
|
||||
// CGRect subViewFrame = self.view.frame;
|
||||
// // let the top bar be visible
|
||||
// subViewFrame.origin.y += self.topBar.frame.size.height + self.searchBar.frame.size.height;
|
||||
// subViewFrame.size.height -= self.topBar.frame.size.height + self.searchBar.frame.size.height;
|
||||
// [UIView animateWithDuration:0.2
|
||||
// animations:^{
|
||||
// self.tableController.tableView.frame = subViewFrame;
|
||||
// }];
|
||||
//}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
_searchBar.showsCancelButton = (_searchBar.text.length > 0);
|
||||
CGRect frame = _searchBar.frame;
|
||||
frame.origin.y = topBar.frame.origin.y + topBar.frame.size.height;
|
||||
_searchBar.frame = frame;
|
||||
|
||||
[self update];
|
||||
}
|
||||
|
|
@ -167,7 +160,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
if (view == History_Linphone) {
|
||||
[ContactSelection setSipFilter:[LinphoneManager instance].contactFilter];
|
||||
[ContactSelection setSipFilter:LinphoneManager.instance.contactFilter];
|
||||
[ContactSelection enableEmailFilter:FALSE];
|
||||
[tableController loadData];
|
||||
linphoneButton.selected = TRUE;
|
||||
|
|
@ -239,11 +232,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
#pragma mark - Rotation handling
|
||||
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
// the searchbar overlaps the subview in most rotation cases, we have to re-layout the view manually:
|
||||
[self relayoutTableView];
|
||||
}
|
||||
//- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
// [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
// // the searchbar overlaps the subview in most rotation cases, we have to re-layout the view manually:
|
||||
// [self relayoutTableView];
|
||||
//}
|
||||
|
||||
#pragma mark - ABPeoplePickerDelegate
|
||||
|
||||
|
|
|
|||
|
|
@ -413,17 +413,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if ([self displayDebugPopup:self.addressField.text]) {
|
||||
self.addressField.text = @"";
|
||||
}
|
||||
if ([[addressField text] length] > 0) {
|
||||
[addContactButton setEnabled:TRUE];
|
||||
[backspaceButton setEnabled:TRUE];
|
||||
[addCallButton setEnabled:TRUE];
|
||||
[transferButton setEnabled:TRUE];
|
||||
} else {
|
||||
[addContactButton setEnabled:FALSE];
|
||||
[backspaceButton setEnabled:FALSE];
|
||||
[addCallButton setEnabled:FALSE];
|
||||
[transferButton setEnabled:FALSE];
|
||||
}
|
||||
addContactButton.enabled = backspaceButton.enabled = addCallButton.enabled = transferButton.enabled =
|
||||
([[addressField text] length] > 0);
|
||||
}
|
||||
|
||||
- (IBAction)onBackspaceClick:(id)sender {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
|
|
@ -15,7 +16,7 @@
|
|||
<outlet property="historyNotificationLabel" destination="34" id="35"/>
|
||||
<outlet property="historyNotificationView" destination="32" id="36"/>
|
||||
<outlet property="portraitView" destination="3" id="43"/>
|
||||
<outlet property="selectedBtnView" destination="Aqd-gD-0a2" id="drm-pL-5S6"/>
|
||||
<outlet property="selectedButtonImage" destination="eC3-Hw-cqQ" id="PFh-X5-jX7"/>
|
||||
<outlet property="view" destination="3" id="14"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
|
|
@ -73,11 +74,10 @@
|
|||
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="26"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" id="Aqd-gD-0a2" userLabel="selectedBtnView">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_A.png" id="eC3-Hw-cqQ" userLabel="selectedButtonImage">
|
||||
<rect key="frame" x="180" y="60" width="90" height="3"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="0.36862745099999999" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</imageView>
|
||||
<view autoresizesSubviews="NO" userInteractionEnabled="NO" contentMode="scaleToFill" id="37" userLabel="chatNotificationView">
|
||||
<rect key="frame" x="338" y="0.0" width="21" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
|
|
@ -127,13 +127,13 @@
|
|||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="chat_list_indicator.png" width="21" height="21"/>
|
||||
<image name="chat_list_indicator.png" width="20" height="20"/>
|
||||
<image name="color_A.png" width="1" height="1"/>
|
||||
<image name="color_C.png" width="1" height="1"/>
|
||||
<image name="footer_chat.png" width="28" height="28"/>
|
||||
<image name="footer_contacts.png" width="30" height="30"/>
|
||||
<image name="footer_dialer.png" width="28" height="28"/>
|
||||
<image name="footer_history.png" width="30" height="30"/>
|
||||
<image name="footer_chat.png" width="27" height="27"/>
|
||||
<image name="footer_contacts.png" width="29" height="29"/>
|
||||
<image name="footer_dialer.png" width="27" height="27"/>
|
||||
<image name="footer_history.png" width="29" height="29"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">2048</int>
|
||||
<string key="IBDocument.SystemVersion">14D136</string>
|
||||
<int key="IBDocument.SystemTarget">1536</int>
|
||||
<string key="IBDocument.SystemVersion">14F27</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">7706</string>
|
||||
<string key="IBDocument.AppKitVersion">1347.57</string>
|
||||
<string key="IBDocument.AppKitVersion">1348.17</string>
|
||||
<string key="IBDocument.HIToolboxVersion">758.70</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="675878782">
|
||||
<nil key="NSNextResponder"/>
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIImageView" id="275930832">
|
||||
|
|
@ -41,6 +41,7 @@
|
|||
<int key="NSvFlags">300</int>
|
||||
<string key="NSFrame">{{6, 6}, {32, 32}}</string>
|
||||
<reference key="NSSuperview" ref="675878782"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="505648338"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
|
|
@ -55,6 +56,7 @@
|
|||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{46, 0}, {273, 44}}</string>
|
||||
<reference key="NSSuperview" ref="675878782"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="647977481"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:328</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor" id="497796648">
|
||||
|
|
@ -111,8 +113,9 @@
|
|||
<object class="IBUIImageView" id="647977481">
|
||||
<reference key="NSNextResponder" ref="675878782"/>
|
||||
<int key="NSvFlags">297</int>
|
||||
<string key="NSFrame">{{327, 11}, {25, 22}}</string>
|
||||
<string key="NSFrame">{{314, 11}, {25, 22}}</string>
|
||||
<reference key="NSSuperview" ref="675878782"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -123,6 +126,8 @@
|
|||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{360, 44}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="275930832"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<reference key="IBUIBackgroundColor" ref="497796648"/>
|
||||
|
|
@ -231,7 +236,7 @@
|
|||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIContactCell</string>
|
||||
<string key="superclassName">UITransparentTVCell</string>
|
||||
<string key="superclassName">UITableViewCell</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="avatarImage">UIImageView</string>
|
||||
<string key="linphoneImage">UIImageView</string>
|
||||
|
|
@ -264,14 +269,6 @@
|
|||
<string key="minorKey">../Classes/LinphoneUI/UIRoundedImageView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UITransparentTVCell</string>
|
||||
<string key="superclassName">UITableViewCell</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">../Classes/LinphoneUI/UITransparentTVCell.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||
<object class="IBPartialClassDescription">
|
||||
|
|
@ -334,8 +331,8 @@
|
|||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<string key="avatar.png">{261, 261}</string>
|
||||
<string key="linphone_user.png">{27, 23}</string>
|
||||
<string key="avatar.png">{255, 255}</string>
|
||||
<string key="linphone_user.png">{26, 22}</string>
|
||||
</dictionary>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
@property(nonatomic, strong) IBOutlet UILabel *historyNotificationLabel;
|
||||
@property(nonatomic, strong) IBOutlet UIView *chatNotificationView;
|
||||
@property(nonatomic, strong) IBOutlet UILabel *chatNotificationLabel;
|
||||
@property(weak, nonatomic) IBOutlet UIView *selectedBtnView;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView *selectedButtonImage;
|
||||
|
||||
- (IBAction)onHistoryClick:(id)event;
|
||||
- (IBAction)onContactsClick:(id)event;
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ static NSString *const kDisappearAnimation = @"disappear";
|
|||
contactsButton.selected = [view equal:ContactsListView.compositeViewDescription];
|
||||
dialerButton.selected = [view equal:DialerView.compositeViewDescription];
|
||||
chatButton.selected = [view equal:ChatsListView.compositeViewDescription];
|
||||
CGRect selectedNewFrame = _selectedBtnView.frame;
|
||||
CGRect selectedNewFrame = _selectedButtonImage.frame;
|
||||
selectedNewFrame.origin.x =
|
||||
(historyButton.selected
|
||||
? historyButton.frame.origin.x
|
||||
|
|
@ -224,7 +224,7 @@ static NSString *const kDisappearAnimation = @"disappear";
|
|||
? contactsButton.frame.origin.x
|
||||
: (dialerButton.selected ? dialerButton.frame.origin.x
|
||||
: (chatButton.selected ? chatButton.frame.origin.x : 0))));
|
||||
_selectedBtnView.frame = selectedNewFrame;
|
||||
_selectedButtonImage.frame = selectedNewFrame;
|
||||
}
|
||||
|
||||
#pragma mark - Action Functions
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info, void
|
|||
// Check if one of the contact' sip URI matches the expected SIP filter
|
||||
ABMultiValueRef personSipAddresses = ABRecordCopyValue(person, kABPersonInstantMessageProperty);
|
||||
BOOL match = false;
|
||||
NSString *domain = [ContactSelection getSipFilter];
|
||||
NSString *domain = LinphoneManager.instance.contactFilter;
|
||||
|
||||
for (int i = 0; i < ABMultiValueGetCount(personSipAddresses) && !match; ++i) {
|
||||
CFDictionaryRef lDict = ABMultiValueCopyValueAtIndex(personSipAddresses, i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue