forked from mirrors/linphone-iphone
UI: fix tiny glitchs / constraint bugs in contact and call views
This commit is contained in:
parent
ddd4f5cae8
commit
d9c36e1078
7 changed files with 32 additions and 69 deletions
|
|
@ -147,7 +147,7 @@
|
|||
</accessibility>
|
||||
</view>
|
||||
<view tag="11" contentMode="scaleAspectFit" id="127" userLabel="preview">
|
||||
<rect key="frame" x="254" y="354" width="113" height="187"/>
|
||||
<rect key="frame" x="267" y="396" width="108" height="145"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
|
|
@ -741,7 +741,7 @@
|
|||
</accessibility>
|
||||
</view>
|
||||
<view tag="11" contentMode="scaleAspectFit" id="FcF-4P-SjT" userLabel="preview">
|
||||
<rect key="frame" x="456" y="208" width="203" height="104"/>
|
||||
<rect key="frame" x="522" y="204" width="145" height="108"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
</accessibility>
|
||||
</view>
|
||||
<view tag="11" contentMode="scaleAspectFit" id="127" userLabel="preview">
|
||||
<rect key="frame" x="548" y="775" width="244" height="407"/>
|
||||
<rect key="frame" x="590" y="965" width="210" height="280"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
|
|
@ -740,7 +740,7 @@
|
|||
</accessibility>
|
||||
</view>
|
||||
<view tag="11" contentMode="scaleAspectFit" id="FcF-4P-SjT" userLabel="preview">
|
||||
<rect key="frame" x="888" y="504" width="394" height="251"/>
|
||||
<rect key="frame" x="1010" y="545" width="280" height="210"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
_videoPreview.layer.borderColor = UIColor.whiteColor.CGColor;
|
||||
_videoPreview.layer.borderWidth = 1;
|
||||
|
||||
[singleFingerTap setNumberOfTapsRequired:1];
|
||||
[singleFingerTap setCancelsTouchesInView:FALSE];
|
||||
[self.videoView addGestureRecognizer:singleFingerTap];
|
||||
|
|
@ -352,8 +355,8 @@ static void hideSpinner(LinphoneCall *call, void *user_data) {
|
|||
}
|
||||
|
||||
// only show camera switch button if we have more than 1 camera
|
||||
_videoCameraSwitch.hidden = !disabled && ([LinphoneManager instance].frontCamId != nil);
|
||||
_videoPreview.hidden = (!disabled && !linphone_core_self_view_enabled([LinphoneManager getLc]));
|
||||
_videoCameraSwitch.hidden = (disabled || !LinphoneManager.instance.frontCamId);
|
||||
_videoPreview.hidden = (disabled || !linphone_core_self_view_enabled([LinphoneManager getLc]));
|
||||
|
||||
if (hideControlsTimer != nil) {
|
||||
[hideControlsTimer invalidate];
|
||||
|
|
|
|||
|
|
@ -55,14 +55,17 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
ABRecordID recordID = ABRecordGetRecordID(_contact);
|
||||
ABAddressBookRevert(addressBook);
|
||||
_contact = ABAddressBookGetPersonWithRecordID(addressBook, recordID);
|
||||
if (_contact == NULL) {
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
return;
|
||||
}
|
||||
LOGI(@"Reset data to contact %p", _contact);
|
||||
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact thumbnail:NO] bordered:NO withRoundedRadius:YES];
|
||||
[_tableController setContact:[[Contact alloc] initWithPerson:_contact]];
|
||||
if (_contact != NULL) {
|
||||
LOGI(@"Reset data to contact %p", _contact);
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact thumbnail:NO]
|
||||
bordered:NO
|
||||
withRoundedRadius:YES];
|
||||
[_tableController setContact:[[Contact alloc] initWithPerson:_contact]];
|
||||
_emptyLabel.hidden = YES;
|
||||
} else {
|
||||
_emptyLabel.hidden = NO;
|
||||
}
|
||||
}
|
||||
|
||||
static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
||||
|
|
@ -78,6 +81,7 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
[[[LinphoneManager instance] fastAddressBook] removeContact:_contact];
|
||||
inhibUpdate = FALSE;
|
||||
}
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
}
|
||||
|
||||
- (void)saveData {
|
||||
|
|
@ -290,7 +294,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
onConfirmationClick:^() {
|
||||
[self setEditing:FALSE];
|
||||
[self removeContact];
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
}];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,7 @@ typedef enum _ContactSelectionMode { ContactSelectionModeNone, ContactSelectionM
|
|||
|
||||
@end
|
||||
|
||||
@interface ContactsListView
|
||||
: UIViewController <UICompositeViewDelegate, ABPeoplePickerNavigationControllerDelegate, UISearchBarDelegate>
|
||||
@interface ContactsListView : UIViewController <UICompositeViewDelegate, UISearchBarDelegate>
|
||||
|
||||
@property(strong, nonatomic) IBOutlet ContactsListTableView *tableController;
|
||||
@property(strong, nonatomic) IBOutlet UIView *topBar;
|
||||
|
|
|
|||
|
|
@ -213,42 +213,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[searchBar resignFirstResponder];
|
||||
}
|
||||
|
||||
#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];
|
||||
//}
|
||||
|
||||
#pragma mark - ABPeoplePickerDelegate
|
||||
|
||||
- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker {
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
return;
|
||||
}
|
||||
|
||||
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
|
||||
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
|
||||
return true;
|
||||
}
|
||||
|
||||
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
|
||||
shouldContinueAfterSelectingPerson:(ABRecordRef)person
|
||||
property:(ABPropertyID)property
|
||||
identifier:(ABMultiValueIdentifier)identifier {
|
||||
|
||||
CFTypeRef multiValue = ABRecordCopyValue(person, property);
|
||||
CFIndex valueIdx = ABMultiValueGetIndexForIdentifier(multiValue, identifier);
|
||||
NSString *phoneNumber = (NSString *)CFBridgingRelease(ABMultiValueCopyValueAtIndex(multiValue, valueIdx));
|
||||
// Go to dialer view
|
||||
DialerView *view = VIEW(DialerView);
|
||||
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
|
||||
[view call:phoneNumber displayName:(NSString *)CFBridgingRelease(ABRecordCopyCompositeName(person))];
|
||||
CFRelease(multiValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
#pragma mark - searchBar delegate
|
||||
|
||||
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?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">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIConfirmationDialog">
|
||||
|
|
@ -15,30 +15,27 @@
|
|||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="2Vb-Xy-rci" userLabel="view">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" alpha="0.89999999999999991" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_C.png" id="cqN-1f-6SE" userLabel="backgroundColor">
|
||||
<rect key="frame" x="0.0" y="0.0" width="377" height="667"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="416" height="736"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" id="2BQ-o9-xv2">
|
||||
<rect key="frame" x="19" y="251" width="339" height="166"/>
|
||||
<rect key="frame" x="48" y="285" width="320" height="166"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Are you sure you want to delete all your selection?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" id="jLz-g1-cTe" userLabel="titleLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="339" height="118"/>
|
||||
<rect key="frame" x="-10" y="0.0" width="336" height="118"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="B1K-CB-3of" userLabel="cancelButton" customClass="UIRoundBorderedButton">
|
||||
<rect key="frame" x="8" y="126" width="141" height="40"/>
|
||||
<rect key="frame" x="7" y="126" width="142" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" title="CANCEL" backgroundImage="color_H.png">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
|
|
@ -49,9 +46,8 @@
|
|||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="SbQ-re-fGQ" userLabel="confirmationButton" customClass="UIRoundBorderedButton">
|
||||
<rect key="frame" x="190" y="126" width="141" height="40"/>
|
||||
<rect key="frame" x="169" y="126" width="142" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" title="DELETE" backgroundImage="color_I.png">
|
||||
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
|
|
@ -62,14 +58,12 @@
|
|||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<animations/>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="545.5" y="291.5"/>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina55"/>
|
||||
<point key="canvasLocation" x="545" y="291"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue