Navigationcontrol in iphone - iphone

I am trying to develop an application for iphone 3G which requires flip from one page to another page.I can navigate from one page to another page by using navigation control but it gives the animation from "right" to "left" when page changes. Can i flip it in just opposite direction means the page will animate from "left" to "right" when requires to go back to previous page? the animation effect must be there.the application is navigation based not view based.And the back flip action must be in a button not in navigation bar button.
I think it can be done as we can do it by navigation bar button,but got to put that logic in normal button. pretty confused about the logic...
Can you please help me?

I just wrote an answer to another similar question which may be of help:
Push Next Detail UIView without going back to parent UITableView

You can use -[UINavigationController popViewControllerAnimated:] to reproduce the effect of the built-in "Back" button. Or there's -[UINavigationController popToViewController:animated:] if you want to go further back than one view controller.

For going from one view to another you can use [UINavigationController popViewControllerAnimated:YES] and when you u want to go to previous view you can do is write teh following line on button click event [UINavigationController popToViewController:animated:YES] and hide your back button in the navigation bar item as per your requirement.

Related

SWRevealViewController and Tab Bar Controller

I'm trying to develop my first app. I recognize this is probably an easy problem (and that i'm likely not stating my question clearly) so any help is more than appreciated.
I've got a storyboard that uses SWRevealController. The sw_rear panel that gets swiped out from the side has a few options in table form. One of the options is connected to a UITabBarController. There are three tabs. The implementation file for each of the 3 views has
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
to allow me to do a pan gesture to bring back the sw_rear panel.
When I compile, everything works well the first time. i can go to tab 1 and swipe and the panel appears. i go to tab 2 and swipe and the panel appears. but then, if i go back to panel 1 and swipe....nothing!
Any ideas how to fix this problem?
Thanks,
Rich
Add this code [self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer]; in viewWillAppear Method

Tab bar at top and bottom

I would like to develop a ipad apps which has a menu at the top of the screen as well as at the bottom.
There are four buttons on the top of the screen, and there are 10+ buttons at the bottom tab bar, which can be scrolled horizontally.
How can I write the root view controller as a framework for this operation?
Should I customize the UIViewController class or UITabBarViewController?
Thanks
EDIT:
Sorry for being unclear. Let me restate my question.
Actually my app will have the following hierarchy.
'Front Page' is simply a page (view controller) for user to choose language. After choosing the language, 'Menu Page' view controller is displayed.
Starting from Menu page and ALL view controllers (VC) in below, the page layout is something like this.
As you can see, there are top menu and bottom menu. Clicking on the buttons the app will quickly jump to the corresponding view controller (3rd level in the tree, VC1,VC2,VC3 etc) . And for every view, there is a BACK button on every page, clicking which will back to the parent view controller.
I was thinking to implement this by using a tab bar view controller and a navigation view controller but I still do not have a clear idea how to implement this.
Or maybe should I just use the navigation view controller and hide the top tool bar except the back button, and display an overlay UIView as menu which is on top of all other UIViews.
Can somebody help me? Thanks.
Since this is the outermost container for my app I hope to do it properly at start..
Sorry for my long question.
If you really want to develop a framework for this logic .You need to create Manager, ViewController, View, DAO ,Model and other classes according to your needs.
I assume you want to add the buttons dynamically to the tabbar (and if it scrollable , it must be a scrollview).You can use Toolbar for upper view but then it won't be in sync with the bottom-view(visually).In that case you will have to create your own customized views to look like a tabbar.
The manager will basically keep a track of all the buttons and different states of events and action on the views and the same information can be accessed via a static method form the viewcontroller.
Well you have not detailed on your needs , so it's difficult to predict the entire architecture.
You need a container view controller to manage selection of VC's 1-4.
clicking which will back to the parent view controller
Parent view controller is used to mean the container vc in a container view controller scheme - I'm not sure that's what you mean in this comment. Where exactly does the back button go?
See this link for more info about container VC's.
https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html
You should be able to embed a tab bar controller in the content view of the container VC. Should be able to but it might be really buggy if there is a lot of communication between the child vc's.
The hard part is the back button. Basically it must be a button that goes back to VC 1-4 depending on which section you are in. The easiest way to do it is to make sure that when you cycle view controllers, pass the back button information as to which VC is the current child so it knows which VC to navigate to when you press it.

NavigationBar Right Button Problem

I have a navigation bar in my app. The below pictures are in the order of navigation.
Problem I have is, on clicking the "Main" button , I am able to perform the action and goto the required screen , but the navigation bar does not look like the first on (with Menu as left button). Instead it look like 4th image. How to make it look like first image so that I can make the user to navigate to "Menu" screen by clicking menu button ?. Thanks for the help …!!!
If I'm understanding this correctly, you may have pushed the first view controller (The one from screenshot 1) when clicking on main which is why you see "lens" in the back button. That back button takes the title of the previous view controller in the stack. What you want to do is pop to the first view controller when they click on Main using either popToRootViewController or popToViewController:animated

iPhone landscape UIView slide transition

My app uses a landscape only view and requires the user to answer a series of questions using a UISlider to select their answer before clicking "Next" to move to the next question.
The user can't go back to previous questions so only has one "direction" of travel. Once the final question is answered the app will return them to the Main Menu view.
I've had some trouble with the slide transition sliding the next view in but it thinks it is in portrait mode. I have seen a solution somewhere that NavController fixes this but is that necessary for my app?
The user doesn't really navigate as they can only go to the next screen, never to the previous.
If anyone has any other opinions on how to implement this it'd be much appreciated.
Thanks!
Oliver
I'm not sure if I know exactly what you want... but from what I understand I would simply use a navigation controller to handle all of the transitions. You can hide the back button so the user can't go back and all of the view animation comes with it! When the user selects an answer, just push the next question on the navigation controller's stack. Once you get to the end of the list, just pop off all the view controllers to get back to the start (main menu).
Is this kind of what you wanted? If you need help with some code snippets I can add some.
I think you will have to transform the transition so that it slides in on the right axis. By default it will slide right-left in portrait. The transition animation doesn't actually know the orientation of the device or the view.

Current UIView Questions iPhone SDK

I posted earlier but am running into similar problems again. Basically the way that my app is setup there is a top bar that is basically just a static image that has UIButtons placed on top of it. That is the Main View Controller and is persistent no matter what view is shown beneath it. I can't use a navigation controller because it is not possible to change the height and I need the bar to be significantly larger than a navbar. However my bar is functioning in much the same way. There is a "Home" Button, a "Back" Button and several destination buttons.
I understand how to switch views from say the home screen. My confusion comes with the back button. In order to press back the app is going to need to know what view is currently being displayed so that it can be removed from view and a new subview can be added. Ideally I would use the UINavigationController so that I can push and pop views which is really what I want to do here, however that is not possible because of the visual problem.
Does anybody know of a method that returns the current displayed view so I could do something like the following
[currentview.view removeFromSuperView];
[self.view insertSubview:experienceViewController.view atIndex:0]
You can use UINavigationController with the nav bar hidden. Put the nav controller inside a view that does have your jumbo toolbar and you'll have access to the push/pop behavior you're looking for.