uipageviewcontroller with search bar not showing up - ios

I have an ios7 app that is using a page view controller to swipe through a series of pages. I want to have a navigation bar and a tool bar above this. Heres a picture of what I mean:
http://i.stack.imgur.com/ddgXY.png
I have 3 views going to build this.
Root - a view controller embedded in a navigation grontroller
Page View Controller - a page view controller
Page - a view controller that represents the page (aka the big white box)
The root and page views are both subclassed from UIViewController
The search bar is in the root with the rest of the top navigation. The navigation bar is fine (the menu button works) but I can't get the search bar to work. It seems like the search bar is covered by either the page view controller or the page. This is because it is only visible when I make the page background transparent (and if I bump up the space between pages, you can see it peaking thru between them as you swipe). Even if I make the page background transparent, the taps don't make it thru and the keyboard never comes up.
I need a way to get this search bar to be visable and usable. I don't want to put it in the page view because then it looks bad as you swipe thru the pages, like each page has one. I want it sticky like the red navigation bar.
also, I'm using storyboards.

You could always put the search bar in the navigation bar instead of the title. Just drag the search bar to the title of the navigation bar

Related

navigation bar states, showing and hiding the bottom nav bar

Keep in mind with the following question, I am still an iOS noob.
So I understand how to hide/show/recolor the navigation bar and whatnot. My next challenge is that some screens need the nav bar and others do not.
When my app starts off, I have the nav bar as hidden and then the user can click register or log in (both of which screens have a nav bar).
So those screens have the code to show the nav bar all while the first (welcome screen) has the code to hide the nav bar.
Here is the question: Why is it that when I first start my app, the nav bar is not there, but when I go to register/login and then hit the back button to return to the welcome page (initial page) then the nav bar is still there, even though my code to hide it is in the viewDidLoad method?
How can I fix this?
You can try moving the logic of hidding the Nav bar to the ViewWillAppear method, you just need to override it in your View Controller class.
Alternatively I would suggest to use a separate view controller to handle your login/registration screens and only use nav bars where you need them. You would have to create a view controller in your story board with your regular screens and embed the screens that need the tab bar in a navigation controller, You can then segue from your regular view controller into the navigation controller that includes your tabs.
Hope this helps

How to have the top Navigation Bar intact with RKSwipe or any Swipe view library for UIPageViewController

I want to have the functionality to swipe between multiple view controllers (kinda like Venmo, Twitter) in a UIPageViewController but many libraries like RKSwipe (https://github.com/cwRichardKim/RKSwipeBetweenViewControllers) seem to replace the default navigation bar with the view-controller navigation (like "First" and "Second").
I want that sort of navigation bar that lets you know which page you are on but plus the default ios navigation bar on top of that. How is that possible??

Tab Bar Controller - Show a view controller that is not one of the tabs

I wonder if this is possible. The design for this app I am working on is as below:
Two sliding views sit one on top of the other. The bottom view is a 'Settings' view. The top view is a tab bar view. We are using ECSlidingViewController for the sliding.
When the app is opened for the first time, the tab bar view shows with first tab selected.
When they tap on the hamburger menu or slide right, the bottom, settings view slides into view.
When they tap on an item in the settings view, like the About item, the corresponding view should be displayed inside the top tab bar view with none of the tabs shown as selected.
I think I am going to have to convince my team to not display the settings items inside of the tab bar, it seems just too twisted. But just wanted to know if anyone else has done anything like this and if it is possible to do it without introducing too much complication in the code.
I've done something with the same design with a menu that slides from the left and over the tab bars. I ended up putting a View Controller on top of everything else
Something like
[self presentViewController:AboutViewController Animated:YES];
Just make sure that you either put that view controller in a UINavigationController or something with a dismissViewController for users to return to your main page.

Slide viewController in navigation controller

I'd like to use a slide up / down effect to display various viewControllers inside a navigation controller. A few other apps do this like square, and every day. Basically when the app loads, I want to display a base view in the navigation controller. Then slide up another view controller over top of it. When then hit a button in the nav bar, I want to slide that down and show the base controller, all the while retaining the navigation bar, and changing up nav items.
Originally I tried to make this work by showing a modal but that requires using a new nav bar.
Has anyone done this, or knows of a good example that illustrates this UI pattern? Thank you!
You could have UIViews in a UIScrollView

UINavigationBar with Search icon - push modal search view when clicked

I am creating a Navigation-Based application. The nav bar has a search icon; when it is clicked I push a SearchViewController onto the navigation controller (containing a search bar and tableview).
I am hiding the table view when the search view loads in an attempt to have the previous view (the view from which the search icon was selected) show behind the search view, but it appears that the navigation controller is removing this view. If I add the search view as a subview on the appDelegates's window I can see the previous view behind the search view, but the app crashes when I click in the search bar (it doesn't appear to give control to the view controller attached to the search view).
I am looking for any suggestions on how to achieve my desired result?
Thanks.
it sure is late as a response... but uinavigationbar's push view...
pushes a new view controller, removing the old one from the active window...
if you want to have a search controller behave like that, you should use a UISearchBarController and set it's search bar as header of your original table view..
the searchbar controller will show and hide the search result table view, if you want the old table to be shown, you should change the table on the search bar, so it's transparent first.
Pushing a new view is not a solution because you totally change the old view (remove it from the window)
greetings

Resources