How to handle menu calls - ios

I have been working on an app for a while and I designed a menu that when you press the 'menu' button in the navigation controller, it brings up the menu over top of whatever view you are currently on. When you press outside the menu it makes the menu dismiss itself and returns to just the view you were on previously. My problem is that when you press on the cells in the menu, I want it to dismiss the menu and then have the navigation controller on the super view pop to the new view (depending on which cell was pressed). Now I don't know if that is a really bad design or not. If this is possible I would love some feedback on where to get some more information on how to put that into action.
Here is an image of the menu in action running in the app:
If this design for the menu is super complicated or not practical, a push in the right direction on how to implement one would be great. Have tried finding some resources but they are mostly pre-built menu's that you implement and I am not looking to use something like that. That is why I built my own!

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 navigation views with both "back" and "save" buttons?

I am new to iOS programming and need some help on creating navigation. I have a top-level view, shown on the left. When the user presses the "Create New" button, the app should bring up the "One Journal Entry" view, shown on the right.
I currently have implemented the two views with navigation using a Navigation Controller. The problem I'm finding is that there are now two ways to navigate back: (1) Using the back button in the upper-left and (2) using the "Save" button, which saves to file. I think the back button should go back without saving, or perhaps that should be a "Cancel" button instead, in which case I should not use a Navigation Controller.
What is the standard UI approach for this type of problem?
I think you shouldn't change your views' architecture, it is pretty standard and handy with going back to previous view controller by upper-left button and going back also by save button, which IBAction can look like
-(IBAction)doSaveStuff:(UIButton *)sender
{
// saving stuff
[self.navigationController popViewControllerAnimated:YES];
}

Proper way to segue between two simple View Controllers in iOS 7

I'm mainly from a C# background, so the workflow for iOS is a bit unusual for me, at least for now.
I was having a problem having simple segue from a main menu, to a another menu/work area, and then with the ability to go back to the main menu.
For a test, apparently I did something wrong.
I didn't write any code for this test to exhibit the problem.
What I did was just,
create a new single-view app
drag an additional view controller onto the work area
drag the start arrow to the new view controller (so it becomes the initial view, same thing as checking the checkbox to set it as the initial view)
added a button to each view controller
Ctrl + clicked and dragged the buttons to the opposing view
for the segue type, I chose "replace"
now the program crashes if I hit the second button to go back to the "main menu" (green view controller in this example)
So what am I doing wrong? Do I need to add some form of delegate or something?
I did find this, though it present fewer segue options in the tutorial than what I have.
https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/SecondTutorial.html
These are the options I have when I Ctrl + Click from a button to another view
-Push
-Modal
-PopOver
-Custom
-Replace
"Have you embedded a navigation controller? You need to go to editor->embed in-> Navigation Controller. You need a navigation controller for push segue. – Kaushal Bisht"
This solved it for me. Now I'm just going to work on replacing the navigation bar with custom UI controls.
Thanks everyone! :)

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.

Make an iOS "forward" button

This is kind of a tough thing to search for because of how general the words are. I would like to make a "forward" button for my app, much like the standard iOS navigation "back" button, but obviously pointing the other direction.
So my question is simple: Is there a standard way of adopting the "back" button style, and simply flipping it to make it point to the right? Or do I have to make a custom button background?
Here is a quick 'shopped screenshot of what I would like.
The back button has a set functionality, it pops the current view controller in the navigation controller and returns to the previous one. A forward button does not have a clear semantic as you can push any view controller onto your navigation controller, which is why UIKit doesn't offer it. You'll probably have to emulate it (copying and flipping the graphics), then systematically push a given view controller when the user presses it.

Resources