[iOS] Search bar clipped
This commit is contained in:
parent
8c2d9e2c5e
commit
12f0ec5d1f
3 changed files with 14 additions and 10 deletions
|
@ -54,7 +54,6 @@
|
|||
green:102.f/255.f
|
||||
blue:102.f/255.f
|
||||
alpha:1.f]];
|
||||
self.tableView.tableHeaderView = self.searchBar;
|
||||
self.searchBar.text = @"";
|
||||
[self searchBar:self.searchBar textDidChange:@""];
|
||||
|
||||
|
@ -125,7 +124,10 @@
|
|||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:YES animated:animated];
|
||||
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_search"] forBarMetrics:UIBarMetricsDefault];
|
||||
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_search"] forBarMetrics:UIBarMetricsLandscapePhone];
|
||||
[self.navigationController setNavigationBarHidden:NO animated:animated];
|
||||
self.navigationItem.titleView = self.searchBar;
|
||||
}
|
||||
|
||||
#pragma mark - Table view delegate
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:NO animated:NO];
|
||||
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_header.png"] forBarMetrics:UIBarMetricsDefault];
|
||||
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_header.png"] forBarMetrics:UIBarMetricsLandscapePhone];
|
||||
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_header"] forBarMetrics:UIBarMetricsDefault];
|
||||
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_header"] forBarMetrics:UIBarMetricsLandscapePhone];
|
||||
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
|
||||
self.navigationItem.rightBarButtonItem = [self getCustomButtonWithImage:@"ic_articleselection"];
|
||||
|
@ -190,7 +190,8 @@ shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherG
|
|||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
|
||||
{
|
||||
UISplitViewController * splitControl = (UISplitViewController *)[[UIApplication sharedApplication] delegate].window.rootViewController;
|
||||
return [splitControl.viewControllers objectAtIndex:0];
|
||||
UINavigationController * navVC = [splitControl.viewControllers objectAtIndex:0];
|
||||
return (ArticleVC *)navVC.visibleViewController;
|
||||
}
|
||||
else
|
||||
return [self.navigationController.viewControllers objectAtIndex:0];
|
||||
|
|
|
@ -13,11 +13,12 @@
|
|||
if (self)
|
||||
{
|
||||
self.delegate = self;
|
||||
ArticleVC * vc = [[ArticleVC alloc] initWithStyle:UITableViewStylePlain];
|
||||
vc.delegate = self;
|
||||
ArticleVC * articleVC = [[ArticleVC alloc] initWithStyle:UITableViewStylePlain];
|
||||
articleVC.delegate = self;
|
||||
UINavigationController * navVC = [[UINavigationController alloc] initWithRootViewController:articleVC];
|
||||
UINavigationController * v = [[UINavigationController alloc] initWithRootViewController:[[GuideVC alloc] init]];
|
||||
v.navigationBarHidden = NO;
|
||||
self.viewControllers = @[vc, v];
|
||||
self.viewControllers = @[navVC, v];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -30,10 +31,10 @@
|
|||
-(void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
ArticleVC * vc = (ArticleVC *)[self.viewControllers objectAtIndex:0];
|
||||
UINavigationController * articleNavVC = [self.viewControllers objectAtIndex:0];
|
||||
UINavigationController * navVC = (UINavigationController*)[self.viewControllers objectAtIndex:1];
|
||||
GuideVC * g = (GuideVC *)navVC.visibleViewController;
|
||||
[g loadPage:[vc getDefaultArticle]];
|
||||
[g loadPage:[(ArticleVC *)articleNavVC.visibleViewController getDefaultArticle]];
|
||||
}
|
||||
|
||||
-(void)selectHtmlPageUrl:(NSString *)url
|
||||
|
|
Reference in a new issue