finish launchscreen

This commit is contained in:
Gautier Pelloux-Prayer 2015-09-30 16:02:43 +02:00
parent ff44ab12c1
commit 12726a2f5f
6 changed files with 55 additions and 83 deletions

View file

@ -132,7 +132,6 @@
<gestureRecognizers/>
<connections>
<outlet property="dataSource" destination="2fm-IU-Rv8" id="xxn-Q2-doz"/>
<outlet property="delegate" destination="2fm-IU-Rv8" id="oHF-Re-HC2"/>
</connections>
</tableView>
<searchBar contentMode="redraw" id="vi8-rd-Oiw">
@ -140,7 +139,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="2fm-IU-Rv8" id="LA0-Xg-Z9c"/>
<outlet property="delegate" destination="2fm-IU-Rv8" id="GyU-vl-XiG"/>
</connections>
</searchBar>
</subviews>
@ -207,19 +206,9 @@
</connections>
<point key="canvasLocation" x="639" y="328"/>
</tableViewController>
<searchDisplayController id="mcs-5Y-d6k">
<connections>
<outlet property="delegate" destination="2fm-IU-Rv8" id="PRk-2J-XeV"/>
<outlet property="searchBar" destination="vi8-rd-Oiw" id="U94-YL-C2I"/>
<outlet property="searchContentsController" destination="2fm-IU-Rv8" id="efd-2T-Pof"/>
<outlet property="searchResultsDataSource" destination="2fm-IU-Rv8" id="2aO-mr-fU7"/>
<outlet property="searchResultsDelegate" destination="2fm-IU-Rv8" id="g0B-zN-bza"/>
</connections>
</searchDisplayController>
<tableViewController id="2fm-IU-Rv8" userLabel="addressesTableView" customClass="ChatConversationSearchTableView">
<connections>
<outlet property="searchDisplayController" destination="mcs-5Y-d6k" id="uBo-yz-bg2"/>
<outlet property="view" destination="d9Z-ch-tVO" id="y6M-se-pTn"/>
<outlet property="view" destination="d9Z-ch-tVO" id="qI4-He-mtn"/>
</connections>
</tableViewController>
</objects>

View file

@ -142,7 +142,6 @@
<color key="separatorColor" red="0.7254902124" green="0.76862746479999999" blue="0.79607844350000001" alpha="1" colorSpace="deviceRGB"/>
<connections>
<outlet property="dataSource" destination="TJG-JZ-YRR" id="334-RR-jEi"/>
<outlet property="delegate" destination="TJG-JZ-YRR" id="X6c-qc-fGw"/>
</connections>
</tableView>
<searchBar contentMode="redraw" showsCancelButton="YES" id="5jE-oF-d45" userLabel="searchBar">
@ -150,7 +149,7 @@
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="-1" id="4jL-Rv-dW7"/>
<outlet property="delegate" destination="TJG-JZ-YRR" id="8Hr-Dq-RVQ"/>
</connections>
</searchBar>
</subviews>

View file

@ -8,6 +8,6 @@
#import <UIKit/UIKit.h>
@interface ChatConversationSearchTableView : UITableViewController <UISearchBarDelegate, UISearchDisplayDelegate>
@interface ChatConversationSearchTableView : UITableViewController <UISearchBarDelegate>
@end

View file

@ -12,7 +12,6 @@
@property(nonatomic, strong) NSArray *names;
@property(nonatomic, strong) NSArray *searchResults;
@property(nonatomic, strong) UISearchDisplayController *searchController;
@end
@ -261,7 +260,7 @@
//===============================================
- (void)configureTableView:(UITableView *)tableView {
//
tableView.separatorInset = UIEdgeInsetsZero;
[tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cellId"];
@ -283,20 +282,20 @@
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (tableView == self.tableView) {
// if (tableView == self.tableView) {
return [self.names count];
} else {
return [self.searchResults count];
}
// } else {
// return [self.searchResults count];
// }
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellId" forIndexPath:indexPath];
NSString *name = (tableView == self.tableView) ? self.names[indexPath.row] : self.searchResults[indexPath.row];
cell.textLabel.text = name;
// NSString *name = (tableView == self.tableView) ? self.names[indexPath.row] : self.searchResults[indexPath.row];
//
// cell.textLabel.text = name;
return cell;
}
@ -306,61 +305,26 @@
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
//===============================================
#pragma mark -
#pragma mark UISearchDisplayDelegate
//===============================================
#pragma mark - searchBar delegate
- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller {
NSLog(@"🔦 | will begin search");
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
// display searchtext in UPPERCASE
// searchBar.text = [searchText uppercaseString];
// searchBar.showsCancelButton = (searchText.length > 0);
// [ContactSelection setNameOrEmailFilter:searchText];
// [tableController loadData];
}
- (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller {
NSLog(@"🔦 | did begin search");
}
- (void)searchDisplayControllerWillEndSearch:(UISearchDisplayController *)controller {
NSLog(@"🔦 | will end search");
}
- (void)searchDisplayControllerDidEndSearch:(UISearchDisplayController *)controller {
NSLog(@"🔦 | did end search");
}
- (void)searchDisplayController:(UISearchDisplayController *)controller
didLoadSearchResultsTableView:(UITableView *)tableView {
NSLog(@"🔦 | did load table");
[self configureTableView:tableView];
}
- (void)searchDisplayController:(UISearchDisplayController *)controller
willUnloadSearchResultsTableView:(UITableView *)tableView {
NSLog(@"🔦 | will unload table");
}
- (void)searchDisplayController:(UISearchDisplayController *)controller
willShowSearchResultsTableView:(UITableView *)tableView {
NSLog(@"🔦 | will show table");
}
- (void)searchDisplayController:(UISearchDisplayController *)controller
didShowSearchResultsTableView:(UITableView *)tableView {
NSLog(@"🔦 | did show table");
}
- (void)searchDisplayController:(UISearchDisplayController *)controller
willHideSearchResultsTableView:(UITableView *)tableView {
NSLog(@"🔦 | will hide table");
}
- (void)searchDisplayController:(UISearchDisplayController *)controller
didHideSearchResultsTableView:(UITableView *)tableView {
NSLog(@"🔦 | did hide table");
}
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller
shouldReloadTableForSearchString:(NSString *)searchString {
NSLog(@"🔦 | should reload table for search string?");
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF CONTAINS[cd] %@", searchString];
self.searchResults = [self.names filteredArrayUsingPredicate:predicate];
return YES;
- (void)searchBarTextDidEndEditing:(UISearchBar *)searchBar {
// [searchBar setShowsCancelButton:FALSE animated:TRUE];
}
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller
shouldReloadTableForSearchScope:(NSInteger)searchOption {
NSLog(@"🔦 | should reload table for search scope?");
return YES;
- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar {
// [searchBar setShowsCancelButton:TRUE animated:TRUE];
}
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
// [searchBar resignFirstResponder];
}
@end

View file

@ -27,8 +27,8 @@
#include "linphone/linphonecore.h"
@interface ChatConversationView
: UIViewController <UITextViewDelegate, UICompositeViewDelegate, ImagePickerDelegate, ChatConversationDelegate> {
@interface ChatConversationView : UIViewController <UITextViewDelegate, UICompositeViewDelegate, ImagePickerDelegate,
ChatConversationDelegate, UISearchBarDelegate> {
LinphoneChatRoom *chatRoom;
OrderedDictionary *imageQualities;
BOOL scrollOnGrowingEnabled;

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" launchScreen="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" launchScreen="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
@ -11,18 +11,38 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="splashscreen.png" id="pz0-nR-x0f" userLabel="logo">
<rect key="frame" x="95" y="249" width="185" height="169"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_C.png" id="xtr-QP-6We" userLabel="backgroundColor">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="splashscreen.png" id="pz0-nR-x0f" userLabel="logoImage">
<rect key="frame" x="95" y="187" width="185" height="169"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LINPHONE" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="11" id="u44-hJ-SgI" userLabel="nameLabel">
<rect key="frame" x="95" y="407" width="185" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="38"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="free SIP VOIP client" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="12" id="Koq-w1-U9D" userLabel="descLabel">
<rect key="frame" x="95" y="461" width="185" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
<color key="textColor" red="1" green="0.36862745099999999" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<point key="canvasLocation" x="157.5" y="1049.5"/>
<point key="canvasLocation" x="238.5" y="1005.5"/>
</view>
</objects>
<resources>
<image name="splashscreen.png" width="185" height="169"/>
<image name="color_C.png" width="1" height="1"/>
<image name="splashscreen.png" width="181" height="165"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>