Commit 89529e70 authored by Achilles's avatar Achilles

界面查询优化

parent 46151da3
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
AS_OUTLET( VankeWeatherCell_iPhone, weatherBoard ); AS_OUTLET( VankeWeatherCell_iPhone, weatherBoard );
AS_OUTLET( VankeTopMenuBoardCell_iPhone, topMenu ); AS_OUTLET( VankeTopMenuBoardCell_iPhone, topMenu );
AS_OUTLET( BeeUIView, serviceDashBoardView ); AS_OUTLET( BeeUIView, serviceDashBoardView );
AS_OUTLET( BeeUITextField, txtQuery); AS_OUTLET( BeeUISearchBar, searchBar);
AS_MODEL( VankeProjectSummaryModel, summaryModel ); AS_MODEL( VankeProjectSummaryModel, summaryModel );
......
...@@ -29,7 +29,7 @@ SUPPORT_RESOURCE_LOADING( YES ) ...@@ -29,7 +29,7 @@ SUPPORT_RESOURCE_LOADING( YES )
DEF_OUTLET( VankeWeatherCell_iPhone, weatherBoard ); DEF_OUTLET( VankeWeatherCell_iPhone, weatherBoard );
DEF_OUTLET( VankeTopMenuBoardCell_iPhone, topMenu ); DEF_OUTLET( VankeTopMenuBoardCell_iPhone, topMenu );
DEF_OUTLET( BeeUIView, serviceDashBoardView ); DEF_OUTLET( BeeUIView, serviceDashBoardView );
DEF_OUTLET( BeeUITextField, txtQuery); DEF_OUTLET( BeeUISearchBar, searchBar);
DEF_MODEL( VankeProjectSummaryModel, summaryModel ); DEF_MODEL( VankeProjectSummaryModel, summaryModel );
...@@ -51,10 +51,29 @@ DEF_MODEL( VankeProjectSummaryModel, summaryModel ); ...@@ -51,10 +51,29 @@ DEF_MODEL( VankeProjectSummaryModel, summaryModel );
ON_CREATE_VIEWS( signal ) ON_CREATE_VIEWS( signal )
{ {
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor];
[self addLeftIconToTextField:_txtQuery icon:@"search"]; // [self addLeftIconToTextField:_txtQuery icon:@"search"];
[_weatherBoard reloadLocationAndWeather]; [_weatherBoard reloadLocationAndWeather];
self.view.swipeDirection = UISwipeGestureRecognizerDirectionLeft | UISwipeGestureRecognizerDirectionRight; self.view.swipeDirection = UISwipeGestureRecognizerDirectionLeft | UISwipeGestureRecognizerDirectionRight;
self.view.swipeble = YES; self.view.swipeble = YES;
//去掉搜索框背景
float version = [[[ UIDevice currentDevice ] systemVersion ] floatValue ];
if ([ _searchBar respondsToSelector : @selector (barTintColor)]) {
float iosversion7_1 = 7.1 ;
if (version >= iosversion7_1) {
//iOS7.1
[[[[ _searchBar.subviews objectAtIndex : 0 ] subviews] objectAtIndex : 0 ] removeFromSuperview ];
[ _searchBar setBackgroundColor :[ UIColor clearColor ]];
} else {
//iOS7.0
[ _searchBar setBarTintColor :[ UIColor clearColor ]];
[ _searchBar setBackgroundColor :[ UIColor clearColor ]];
}
} else {
//iOS7.0 以下
[[ _searchBar . subviews objectAtIndex : 0 ] removeFromSuperview ];
[ _searchBar setBackgroundColor :[ UIColor clearColor ]];
}
} }
ON_DELETE_VIEWS( signal ) ON_DELETE_VIEWS( signal )
...@@ -90,9 +109,9 @@ ON_DID_DISAPPEAR( signal ) ...@@ -90,9 +109,9 @@ ON_DID_DISAPPEAR( signal )
{ {
} }
ON_SIGNAL3( VankeMainBoard_iPhone, txtQuery, signal ) ON_SIGNAL3( VankeMainBoard_iPhone, searchBar, signal )
{ {
if ([signal is:BeeUITextField.RETURN]) { if ([signal is:BeeUISearchBar.SEARCH]) {
[self showListView: CELL_TYPE_FLOOR]; [self showListView: CELL_TYPE_FLOOR];
} }
} }
...@@ -228,7 +247,7 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) { ...@@ -228,7 +247,7 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
if (nil != _currDashBoard) { if (nil != _currDashBoard) {
board.projectCategory = _currDashBoard.name; board.projectCategory = _currDashBoard.name;
board.theme = _currDashBoard.theme; board.theme = _currDashBoard.theme;
NSString *nameLike = [VankeUtil trim:$(self.txtQuery).data]; NSString *nameLike = [VankeUtil trim:self.searchBar.text];
board.projectNameLike = nameLike; board.projectNameLike = nameLike;
} }
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
<linear orientation="h" class="logo-bar"> <linear orientation="h" class="logo-bar">
<image class="logo" /> <image class="logo" />
<input id="txtQuery" class="input"></input> <!-- <input id="txtQuery" class="input"></input>-->
<searchbar id="searchBar" class="search" />
</linear> </linear>
<VankeWeatherCell_iPhone id="weatherBoard" /> <VankeWeatherCell_iPhone id="weatherBoard" />
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
</linear> </linear>
<style type="text/css"> <style type="text/css">
.wrapper { .wrapper {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -42,10 +44,10 @@ ...@@ -42,10 +44,10 @@
margin-left: 15px; margin-left: 15px;
} }
.logo-bar .input { .logo-bar .search {
width: 100px; width: 150px;
float: right; float: right;
placeholder: "楼盘查询"; placeholder: "输入楼盘名称";
input-return-key: search; input-return-key: search;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment