Navigation bar with page control on iOS - ios

I'm new to iOS developing, I wanted to ask could someone help me how to make a page control(screen sliding) with navigation bar, I have tried a lot of things, I googled a lot but I couldn't find a solution.
I have a button when I click it will open a pagecontrol(rootview for screen sliding) with tableview which will change its data according to pages.
the problem is when I click that button I don't know how to get back to main page.
Can anyone help me?

This is a good tutorial for learning how to create a page controller.
As far as your other problem of getting back to the main page, if you add a bar button item to the root view controller's navigation bar, control-drag to your second view in your storyboard from that bar button item, a "Back" button will automatically appear in the upper left-hand corner of your second view controller.
Hope it helps!

Related

How to add navigation drawer feature in later views(for ex: 2nd view) of the app?

I am trying to implement Navigation Drawer like menu on my iPhone project.
I have looked at the forums and find out there are many samples given in this link:
Stackoverflow Navigation drawer query
But, they have not helped me much. Because, all the apps are developed Navigation drawer in the Home screen(1st view) of the app itself and using window.rootViewController
My requirement is, I need Navigation Drawer like menu NOT in the home screen(1st view) of the app, rather need on the 2nd view of the app, hence I don't know how to add this feature.
Could someone please suggest me how to add navigation drawer like menu feature in later views(for ex: 2nd view) of the app?
I don't quite get how you want the menu. You can add Navigation Controller anywhere you want, all it's going to do is give you a Navigation Bar on which you can give a title and a Back button, usually with the name of the title of the previous page.
You can simply add the navigation where you want and control drag from the view or object you want to perform the segue. If it's a button you can use an IBAction with a performSegueWithIdentifier method.
Hope I could help

IOS using different navigation bars

I'm creating an application where I need to use two different navigation bars. When the application first opens up, the nav1 bar should be displayed with an image and a Login button .. when they login screen appears, there is no nav bar. After login, it goes to a Detail screen where I need to show a back arrow image, a screen title and a menu button with drop down options.
I'm using one View_Controller that all my Views inherit from. I've been working on this for days and I'm so lost, please help.
I'm a little confused about the structure of your app.
As I understand it, you want an initial view that is contained in a UINavigationController. Once someone taps the "Login" UIBarButtonItem on the UINavigationBar, then you have a view come up that is not contained in a UINavigationController (probably because it is a modal view that is outside the navigation flow of your app).
The part I'm confused about is where the Detail view comes in. Is the modally presented view dismissed while the Details view is pushed onto the navigation stack from the initial view? Why does the Details view need a back button? Does going back to the initial view effectively log out the user?
At any rate, you should be able to change the UINavigationBar for every view that is pushed on to the stack (that is also contained in your UINavigationController). If you are using Storyboard, you need to make sure that you embed the views pushed on to the stack in a UINavigationController. You can do that by going to the "Editor" menu, selecting "Embed in" and then selecting "Navigation Controller".
Let me know if I didn't understand your question or if you can post more details.
Navigation bar will be the same in the app. You can hide it, show it, change title, change background color, or background image on each view depending on your requirements. But there is only one navigation bar in navigation based apps.

How to reduce the click access length of a tab in uitabbarcontroller?

The title won't clear the actual problem. Let me explain clearly.
I have a tabbarcontoller in the viewcontroller which is the main view controller of the single view application project.
I added Navigationcontrollers to the tabbarcontroller. So that I can navigate(push/pop) from one viewcontroller to other.
I added a subview to the mainview of a single navigation controller.
When I click the button near to the tabbar, it doesn't get clicked and the tabbaritem button gets access and shows that tab.
The below image will explain well,
If I click the show button, it opens the receipts tab.
How to reduce the click access boundary of the tabbar in tabbarcontroller?
I can't get any solution regarding this.
Frankly, i've written a bunch of applications which have controls near the tab bar and i've never encountered such behaviour.
Check if you have custom tabbar controller with custom frame.
Also try to use Reveal App (http://revealapp.com/) to check the buttons' frame at runtime, it will help you to understand what's going on. They have trial version as i remember.
Hope it will help :)
Choose the custom button for this and add in tabbar.

Linking custom iOS buttons to footer nav buttons

Im going to say this straight up - I'm an xcode noob. I am designing an app which has custom buttons on the home screen as well as a footer nav with buttons. When I select the custom button it goes to the right view but the footer nav button is not highlighted.
I just need to find a way to tell the footer nav i am on that section (got their by clicking on the home button). Apparently i have been told there is no way to do this so i might as well scrap my home view custom buttons. I'm hoping to find someone here with a different view. I would provide a screenshot so it makes my explanation clearer but i have not got a high enough rating.
Originally i just wanted to hide the nav bar for the home screen but i was also told that it was not possible. Its there the whole time or not at all. Looking for a second opinion...
Use the following code to hide navigation bar
self.navigationController.navigationBarHidden=YES;
Also, just wanted to confirm, when you say footer navigation buttons, do you mean a tabbed view? some thing like this screenshot?
If you could provide some screenshots would be great.

Tabbar not showing in ios application

i am making one iOS tabbar application in that i have put 4 different tabs and whenever i click on 1 st tab and load another view after clicking of the first tab. After that when i press back button then tabbar is not displaying .So that i want hint that how can i show that
back the tabbar when we move from one tab from another and yes how i can use consistent the tabbar in whole application can you just guys help me on this i am new to iOS development.
here i am put the screen shot ...
here first screen is this one..
when i tap the video button that are first in the view then another window open
which are as under and see the tabbar is not there...
when in video controller there is tabbar is there but i drag and connect to that then tabbar is disabled
Looking at your screen snapshots, do I correctly assume you're attempting to transition to the "Videos" scene by touching the big "Videos" button in the center of the "Home" scene (rather than touching the tab bar button at the bottom of the screen, which I assume works fine)? If that's the case, you need to have your button tell the view controller's tab bar controller that you want to change the index of the tab bar, and it takes care of it for you. You cannot do the transition using a segue (or at least not without a custom segue, which is even more complicated than the procedure I outline below). If you're changing the view some other way (e.g. using a standard segue or using presentViewController, pushViewController programmatically, etc.), your tab bar can disappear on you.
You later said:
when in video controller there is tabbar is there but i drag and connect to that then tabbar is disabled
Yes, that's true. You cannot use a segue from one of your big buttons to one of the tabs in your tab bar. (Or technically, if you wanted to use a segue, it would be a custom segue which would do something very much like my below code, though perhaps a tad more complicated.) So, rather than using a segue for your big button, you need to write an IBAction (connected to the big Videos button on the Home scene), that tells the tab bar to change its selection:
- (IBAction)clickedVideosButton:(id)sender
{
[self.tabBarController setSelectedIndex:1];
}
A couple of comments:
My answer was predicated on the assumption that your tab bar works as expected when you tap on the buttons of the tab bar, itself. If you tap the buttons at the bottom of the screen, do you transition to your other views correctly and preserve the tab bar? If so, my answer above should solve your issues in getting the big buttons to work. If not, though, then the problem rests elsewhere and you need to show us your code that might account for that (either you're something non-standard in the UITabBarControllerDelegate methods, or your viewDidLoad of the view is doing something nonstandard).
If I understand your user interface design right, you have the tab bar at the bottom as well as the big buttons in the middle, which presumably do the same thing. That is, no offense, a curious user interface design (duplicative buttons, requiring extra tap on a button, etc.). You might want to choose to either use either big buttons (in which you can retire the tab bar, eliminate the IBAction code I've provided above, and just use a nice simple navigation controller and push segues, for example), or just use the tab bar (and lose the home screen, lose the big buttons, etc.).
You also made reference to "press back button", and I don't see any "back" button on any of your screen snapshots. Do I infer that you have a navigation controller and you're doing a pushViewController or push segue somewhere? If you're doing something with back buttons, you might need to clarify your question further.

Resources