From 3a0bf8774e4756039ce47d112f4ae8eb2e52ff15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E4=B8=9C=E9=98=81?= Date: Mon, 13 Mar 2017 16:44:40 +0800 Subject: [PATCH 1/3] TestGit test --- PYSearch/PYSearchViewController.m | 18 +++++++++--------- .../PYSearchExample/PYTempViewController.m | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/PYSearch/PYSearchViewController.m b/PYSearch/PYSearchViewController.m index 9905d6d..405c1f4 100644 --- a/PYSearch/PYSearchViewController.m +++ b/PYSearch/PYSearchViewController.m @@ -771,15 +771,15 @@ - (void)setSearchSuggestions:(NSArray *)searchSuggestions - (void)setRankTagBackgroundColorHexStrings:(NSArray *)rankTagBackgroundColorHexStrings { - if (rankTagBackgroundColorHexStrings.count < 4) { // 不符合要求,使用基本设置 - NSArray *colorStrings = @[@"#f14230", @"#ff8000", @"#ffcc01", @"#ebebeb"]; - _rankTagBackgroundColorHexStrings = colorStrings; - } else { // 取前四个 - _rankTagBackgroundColorHexStrings = @[rankTagBackgroundColorHexStrings[0], rankTagBackgroundColorHexStrings[1], rankTagBackgroundColorHexStrings[2], rankTagBackgroundColorHexStrings[3]]; - } - - // 刷新 - self.hotSearches = self.hotSearches; +// if (rankTagBackgroundColorHexStrings.count < 4) { // 不符合要求,使用基本设置 +// NSArray *colorStrings = @[@"#f14230", @"#ff8000", @"#ffcc01", @"#ebebeb"]; +// _rankTagBackgroundColorHexStrings = colorStrings; +// } else { // 取前四个 +// _rankTagBackgroundColorHexStrings = @[rankTagBackgroundColorHexStrings[0], rankTagBackgroundColorHexStrings[1], rankTagBackgroundColorHexStrings[2], rankTagBackgroundColorHexStrings[3]]; +// } +// +// // 刷新 +// self.hotSearches = self.hotSearches; } - (void)setHotSearches:(NSArray *)hotSearches diff --git a/PYSearchExample/PYSearchExample/PYTempViewController.m b/PYSearchExample/PYSearchExample/PYTempViewController.m index 8d24bf4..e507a57 100755 --- a/PYSearchExample/PYSearchExample/PYTempViewController.m +++ b/PYSearchExample/PYSearchExample/PYTempViewController.m @@ -16,7 +16,7 @@ @implementation PYTempViewController - (void)viewDidLoad { [super viewDidLoad]; - self.title = @"SearchResultViewController"; + self.title = @"123"; self.view.backgroundColor = PYSEARCH_RANDOM_COLOR; } From 01e34e71f4c95bd6055733c2f8519ad3102882fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E4=B8=9C=E9=98=81?= Date: Wed, 15 Mar 2017 09:51:46 +0800 Subject: [PATCH 2/3] for my lottrey delate UITableViewDataSource --- PYSearch/PYSearchViewController.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PYSearch/PYSearchViewController.h b/PYSearch/PYSearchViewController.h index 50682ae..2b3b9cf 100644 --- a/PYSearch/PYSearchViewController.h +++ b/PYSearch/PYSearchViewController.h @@ -37,7 +37,7 @@ typedef NS_ENUM(NSInteger, PYSearchResultShowMode) { // 搜索结果显示方式 PYSearchResultShowModeDefault = PYSearchResultShowModeCustom // 默认为用户自定义(自己处理) }; -@protocol PYSearchViewControllerDataSource +@protocol PYSearchViewControllerDataSource @optional /** From 99e617918717f85370727da6bfab02ab5d506569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E4=B8=9C=E9=98=81?= Date: Wed, 15 Mar 2017 10:02:51 +0800 Subject: [PATCH 3/3] Adjust the tableview top Adjust the tableview top to 0 --- PYSearch/PYSearchViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PYSearch/PYSearchViewController.m b/PYSearch/PYSearchViewController.m index 405c1f4..9e774a7 100644 --- a/PYSearch/PYSearchViewController.m +++ b/PYSearch/PYSearchViewController.m @@ -186,7 +186,7 @@ - (PYSearchSuggestionViewController *)searchSuggestionVC [_weakSelf searchBarSearchButtonClicked:_weakSelf.searchBar]; } }; - searchSuggestionVC.view.frame = CGRectMake(0, 64, PYScreenW, PYScreenH); + searchSuggestionVC.view.frame = CGRectMake(0, 0, PYScreenW, PYScreenH); searchSuggestionVC.view.backgroundColor = self.baseSearchTableView.backgroundColor; searchSuggestionVC.view.hidden = YES; // 设置数据源