UI: fix various bugs

This commit is contained in:
Gautier Pelloux-Prayer 2015-11-10 14:27:29 +01:00
parent 500469e4b6
commit 81d28c7bf6
8 changed files with 23 additions and 34 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ChatConversationView">
@ -167,7 +167,7 @@
<rect key="frame" x="0.0" y="66" width="375" height="493"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="60" sectionHeaderHeight="22" sectionFooterHeight="22" id="8" userLabel="messagesTableView">
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" allowsSelection="NO" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="60" sectionHeaderHeight="22" sectionFooterHeight="22" id="8" userLabel="messagesTableView">
<rect key="frame" x="0.0" y="0.0" width="375" height="399"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
@ -320,9 +320,4 @@
<image name="select_all_default.png" width="26" height="26"/>
<image name="select_all_disabled.png" width="26" height="26"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ContactsListView">
@ -174,7 +174,7 @@
<animations/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="TJG-JZ-YRR" id="8Hr-Dq-RVQ"/>
<outlet property="delegate" destination="-1" id="Fk3-Tl-dY0"/>
</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">
@ -242,9 +242,4 @@
<image name="select_all_default.png" width="26" height="26"/>
<image name="select_all_disabled.png" width="26" height="26"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>

View file

@ -37,7 +37,7 @@
_contacts = [[NSMutableArray alloc] initWithArray:_allContacts];
} else {
for (NSString *contact in _allContacts) {
if ([contact containsString:filter]) {
if ([contact.lowercaseString containsString:filter.lowercaseString]) {
[_contacts addObject:contact];
}
}

View file

@ -32,6 +32,10 @@ static UICompositeViewDescription *compositeDescription = nil;
return self.class.compositeViewDescription;
}
- (void)viewWillAppear:(BOOL)animated {
[_tableController.tableView reloadData];
}
#pragma mark - searchBar delegate
- (IBAction)onBackClick:(id)sender {

View file

@ -213,7 +213,8 @@ static NSString *const kDisappearAnimation = @"disappear";
}
- (void)updateSelectedButton:(UICompositeViewDescription *)view {
historyButton.selected = [view equal:HistoryListView.compositeViewDescription];
historyButton.selected = [view equal:HistoryListView.compositeViewDescription] ||
[view equal:HistoryDetailsView.compositeViewDescription];
contactsButton.selected = [view equal:ContactsListView.compositeViewDescription] ||
[view equal:ContactDetailsView.compositeViewDescription];
dialerButton.selected = [view equal:DialerView.compositeViewDescription];

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIChatBubblePhotoCell">
@ -41,7 +41,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
<accessibilityTraits key="traits" image="YES" notEnabled="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>
</imageView>
@ -58,7 +58,7 @@
<rect key="frame" x="48" y="24" width="266" height="100"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="splashscreen.png" id="yMW-cT-bpU" userLabel="image" customClass="UILoadingImageView">
<imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="splashscreen.png" id="yMW-cT-bpU" userLabel="image" customClass="UILoadingImageView">
<rect key="frame" x="0.0" y="0.0" width="266" height="68"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<animations/>
@ -122,6 +122,9 @@
</imageView>
</subviews>
<animations/>
<connections>
<outletCollection property="gestureRecognizers" destination="5ZI-Ip-lGl" appends="YES" id="1iY-46-rRR"/>
</connections>
</view>
</subviews>
<animations/>
@ -138,7 +141,6 @@
<tapGestureRecognizer id="5ZI-Ip-lGl" userLabel="resendClick">
<connections>
<action selector="onResendClick:" destination="-1" id="XOF-AF-Hes"/>
<outlet property="delegate" destination="Y7i-Gm-AdY" id="Idp-Op-un2"/>
</connections>
</tapGestureRecognizer>
</objects>
@ -151,9 +153,4 @@
<image name="color_M.png" width="2" height="2"/>
<image name="splashscreen.png" width="181" height="165"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>

View file

@ -226,7 +226,7 @@ static void message_status(LinphoneChatMessage *msg, LinphoneChatMessageState st
}
- (CGSize)viewSizeWithWidth:(int)width {
static const CGFloat TEXT_MIN_HEIGHT = 32.;
static const CGFloat TEXT_MIN_HEIGHT = 0.;
static const CGFloat TEXT_MIN_WIDTH = 150.0f;
static const CGFloat MARGIN_WIDTH = 60;
static const CGFloat MARGIN_HEIGHT = 19 + 16 /*this 16 is because textview add some top&bottom padding*/;

View file

@ -558,16 +558,15 @@ static RootViewManager *rootViewManagerInstance = nil;
if (push) {
[viewStack addObject:view];
}
[self _changeCurrentView:view transition:nil force:push animated:animated];
[self _changeCurrentView:view transition:nil animated:animated];
}
- (UIViewController *)_changeCurrentView:(UICompositeViewDescription *)view
transition:(CATransition *)transition
force:(BOOL)force
animated:(BOOL)animated {
PhoneMainView *vc = [[RootViewManager instance] setViewControllerForDescription:view];
if (force || ![view equal:vc.currentView] || vc != self) {
if (![view equal:vc.currentView] || vc != self) {
LOGI(@"PhoneMainView: Change current view to %@", [view content]);
if (animated && transition == nil)
transition = [PhoneMainView getTransition:vc.currentView new:view];
@ -592,7 +591,6 @@ static RootViewManager *rootViewManagerInstance = nil;
}
[self _changeCurrentView:[viewStack lastObject]
transition:[PhoneMainView getBackwardTransition]
force:TRUE
animated:[[LinphoneManager instance] lpConfigBoolForKey:@"animations_preference"]];
}
@ -612,7 +610,6 @@ static RootViewManager *rootViewManagerInstance = nil;
[viewStack removeLastObject];
[self _changeCurrentView:[viewStack lastObject]
transition:[PhoneMainView getBackwardTransition]
force:TRUE
animated:[[LinphoneManager instance] lpConfigBoolForKey:@"animations_preference"]];
return [mainViewController getCurrentViewController];
}