Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #63

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PYSearch/PYSearchViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typedef NS_ENUM(NSInteger, PYSearchResultShowMode) { // 搜索结果显示方式
PYSearchResultShowModeDefault = PYSearchResultShowModeCustom // 默认为用户自定义(自己处理)
};

@protocol PYSearchViewControllerDataSource <NSObject, UITableViewDataSource>
@protocol PYSearchViewControllerDataSource <NSObject>

@optional
/**
Expand Down
20 changes: 10 additions & 10 deletions PYSearch/PYSearchViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
// 设置数据源
Expand Down Expand Up @@ -771,15 +771,15 @@ - (void)setSearchSuggestions:(NSArray<NSString *> *)searchSuggestions

- (void)setRankTagBackgroundColorHexStrings:(NSArray<NSString *> *)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
Expand Down
2 changes: 1 addition & 1 deletion PYSearchExample/PYSearchExample/PYTempViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ @implementation PYTempViewController
- (void)viewDidLoad {
[super viewDidLoad];

self.title = @"SearchResultViewController";
self.title = @"123";
self.view.backgroundColor = PYSEARCH_RANDOM_COLOR;
}

Expand Down