Comments (4)
Antoine,
If I understand your question correctly, you would like a way to hide the search controller and present a content view controller when a search result is tapped.
This can be accomplished by implementing the GHSidebarSearchViewControllerDelegate like so:
@interface MYSearchDelegate <GHSidebarSearchViewControllerDelegate>
@property (strong, nonatomic) GHRevealViewController *revealVC;
@end
@implementation MYSearchDelegate
@synthesize revealVC;
- (void)searchResult:(id)result selectedAtIndexPath:(NSIndexPath *)indexPath {
self.revealVC.contentViewController = // Create view controller based on result and/or indexPath
[self.revealVC toggleSidebar:NO duration:kGHRevealSidebarDefaultAnimationDuration];
}
- (void)searchResultsForText:(NSString *)text withScope:(NSString *)scope callback:(SearchResultsBlock)callback {
// Your logic here
}
- (UITableViewCell *)searchResultCellForEntry:(id)entry atIndexPath:(NSIndexPath *)indexPath inTableView:(UITableView *)tableView {
// Your logic here
}
@end
from ghsidebarnav.
Thank you for your fast answer.
However, i tried the same thing on your demo project and it does not work, nothing really happened. I know your library is compatible just on IOS 5 and i'm running it on IOS 6. It is maybe the problem...
Edit : I tried on IOS 5 and it does not work too.
from ghsidebarnav.
OK, I've just spent the last few days working on this:
https://github.com/gresrun/GHSidebarNav/tree/Storyboard
It is an attempt to use storyboards as much as possible. Only works with iOS 6, as it uses the latest and greatest.
It includes some changes to the search delegate to resolve the issue you uncovered, among many other changes.
from ghsidebarnav.
It is working great and your code is cleaner.
However, I am trying to remove all reference to storyboards... so it will take me some time to create a clean project but at this time it is working great.
Thanks you
P.S : I do not understand what i need to do programmatically with all the delegate which i need to connect between the controller "GHMenuViewController" and the new helper GHSidebarSearchHelper.
from ghsidebarnav.
Related Issues (20)
- How can this be used to present a modal view controller, or an action sheet? HOT 4
- NavigationController not added to stack for UIViewController that is 'pushed' HOT 1
- hidden keyboard when open menu HOT 6
- Strange Navigation Bar behavior with transitionFromViewController HOT 6
- Pan gesture to reveal sidebar not working
- Search result with variables HOT 10
- How to make view not clickable when open menu HOT 6
- Open/Close SidebarNav Swiping HOT 2
- SideBarNav wont disappear when clicking a search result HOT 1
- Reload View HOT 2
- Autoresizing Mask of Sidebar Controller HOT 1
- Problems with iOS 7 HOT 14
- UIStoryboardEmbedSegueTemplate HOT 6
- Pan gesture not working correctly in iOS7
- The UI is messed up in the Storyboard version
- Navigation button outside the sidebar HOT 5
- Search sometimes doesn't work
- Problems with iOS 7 HOT 2
- Refreshing GHSideBarNav HOT 1
- Reoad sidebarMenu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghsidebarnav.