Skip to content

Commit 20832ce

Browse files
committed
修复~
1 parent 4f44618 commit 20832ce

5 files changed

Lines changed: 14 additions & 8 deletions

File tree

Coding_iOS/Controllers/AllSearchDisplayVC.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ - (void)initSearchHistoryView {
197197
_searchHistoryView = [[UIScrollView alloc] init];
198198
_searchHistoryView.backgroundColor = [UIColor clearColor];
199199
[_contentView addSubview:_searchHistoryView];
200+
self.searchBar.delegate=self;
200201

201202
}
202203

@@ -922,4 +923,9 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
922923
}
923924
}
924925

926+
- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar{
927+
// [self setActive:TRUE];
928+
return TRUE;
929+
}
930+
925931
@end

Coding_iOS/Controllers/RootControllers/Project_RootViewController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ - (void)viewDidLoad
100100

101101
//添加搜索框
102102
_mySearchBar = ({
103-
UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0,0, kScreen_Width-110, 30)];
103+
UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0,0, kScreen_Width-110, 31)];
104104
searchBar.layer.cornerRadius=15;
105105
searchBar.layer.masksToBounds=TRUE;
106106
[searchBar.layer setBorderWidth:8];
@@ -113,11 +113,11 @@ - (void)viewDidLoad
113113
[searchBar setPlaceholder:@"项目、任务、讨论等"];
114114
[searchBar setTintColor:[UIColor whiteColor]];
115115
[searchBar insertBGColor:[UIColor colorWithHexString:@"0x28303b"]];
116-
[searchBar setHeight:30];
116+
[searchBar setHeight:31];
117117
searchBar;
118118
});
119119

120-
_searchView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width-110, 30)];//allocate titleView
120+
_searchView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width-110, 31)];//allocate titleView
121121
UIColor *color = [UIColor colorWithHexString:[NSObject baseURLStrIsTest]? @"0x3bbd79" : @"0x28303b"];
122122
[_searchView setBackgroundColor:color];
123123

Coding_iOS/Controllers/SearchViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ -(void)buildUI{
7171

7272
//添加搜索框
7373
_mySearchBar = ({
74-
CategorySearchBar *searchBar = [[CategorySearchBar alloc] initWithFrame:CGRectMake(20,7, kScreen_Width-75, 30)];
74+
CategorySearchBar *searchBar = [[CategorySearchBar alloc] initWithFrame:CGRectMake(20,7, kScreen_Width-75, 31)];
7575
searchBar.layer.cornerRadius=15;
7676
searchBar.layer.masksToBounds=TRUE;
7777
[searchBar.layer setBorderWidth:8];
@@ -121,7 +121,7 @@ -(void)buildUI{
121121
AllSearchDisplayVC *searchVC = [[AllSearchDisplayVC alloc] initWithSearchBar:_mySearchBar contentsController:self];
122122
//自定义uisearchbar 要在这里重新申明
123123
//需要重新调整下大小
124-
searchVC.searchBar.frame=CGRectMake(20,7, kScreen_Width-75, 30);
124+
searchVC.searchBar.frame=CGRectMake(20,7, kScreen_Width-75, 31);
125125
searchVC.searchBar.layer.cornerRadius=15;
126126
searchVC.searchBar.layer.masksToBounds=TRUE;
127127
[searchVC.searchBar.layer setBorderWidth:8];

Coding_iOS/Views/Cell/PRMRSearchCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ - (void)setCurMRPR:(MRPR *)curMRPR{
177177
fromStr = [NSString stringWithFormat:@" %@ ", _curMRPR.source_branch];
178178
toStr = [NSString stringWithFormat:@" %@ ", _curMRPR.target_branch];
179179
}else{
180-
fromStr = [NSString stringWithFormat:@" %@ : %@ ", _curMRPR.src_owner_name, _curMRPR.source_branch];
180+
fromStr = [NSString stringWithFormat:@" %@ : %@ ", _curMRPR.author.name, _curMRPR.source_branch];
181181
toStr = [NSString stringWithFormat:@" %@ : %@ ", _curMRPR.des_owner_name, _curMRPR.target_branch];
182182
}
183183
NSString *totalStr = [NSString stringWithFormat:@"%@%@", fromStr, toStr];

Coding_iOS/Views/Search/CategorySearchBar.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ -(void)layoutSubviews
2323
//找到输入框 右移
2424
UITextField *searchField=[[[[self subviews] firstObject] subviews] lastObject];
2525
searchField.textAlignment=NSTextAlignmentLeft;
26-
[searchField setFrame:CGRectMake(58,5,225,20)];
26+
[searchField setFrame:CGRectMake(58,4.8,225,22)];
2727
//
2828
[(UIImageView*)searchField.leftView setFrame:CGRectZero];
2929
}
@@ -37,7 +37,7 @@ -(void)patchWithCategoryWithSelectBlock:(SelectBlock)block{
3737
-(UIButton*)categoryBtn{
3838
if (!_categoryBtn) {
3939
_categoryBtn=[UIButton new];
40-
_categoryBtn.frame=CGRectMake(15, 0, 40, 30);
40+
_categoryBtn.frame=CGRectMake(15, 0, 40, 31);
4141
[_categoryBtn addTarget:self action:@selector(selectCategoryAction) forControlEvents:UIControlEventTouchUpInside];
4242
_categoryBtn.titleLabel.font=[UIFont systemFontOfSize:12];
4343
[_categoryBtn setTitleColor:[UIColor colorWithHexString:@"0x666666"] forState:UIControlStateNormal];

0 commit comments

Comments
 (0)