SWRevealViewController and Tab Bar Controller - iphone

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

Related

Xcode back button missing

I appear to have a problem in Xcode. On my storyboard it shows a back button, but when run in the simulator, not only does the back button not appear, the entire navigation bar is missing.
Can anyone offer any common issues which may cause this?
It could very possibly we that you do not have your constraints properly set. This can be done in the view controller editor menu. It is in the bottom right hand corner.

Storyboards multiple buttons cause same segue

I'm working on trying to figure out storyboards and it all seems pretty cool but I'm having problems with moving from one screen with a few buttons to another screen no matter which button is pressed. Obviously I can control drag from each button but then I have segues all over the place on the story board and I feel like there has to be a better way to do it. I've tried highlighting all the buttons and control-dragging to the next screen but that only caused the one I dragged from to work.
Here's an illustration of what I have that works right now...
If I have to stick with this then so be it but I'm going to end up with 6 buttons on one page and 8 on another. That's alot of segues. Basically each button signifies a choice for the user. That choice will cause different things to happen behind the scenes but no matter which button they choose they move to the next screen.
What I've Tried:
Highlighting all the buttons and then dragging to the next view controller.
This failed because it only connected the segue to the button I clicked on when I control-dragged
Dragging out one segue then dragging from the second button to the circle part of the segue.
This caused nothing at all to happen.
I'm unaware of a way to give a single segue multiple triggers in a storyboard, however you could create a single segue with a particular identifier, and then have all of the buttons respond to a single IBAction that calls [self performSegueWithIdentifier:...];
Check out generic segues, which are tied to the source view controller instead of an IBAction:
https://stackoverflow.com/a/8868096/295130

Implement UIToolBar so it acts like a UITabBar and UIToolBar at the same time

I have an interesting problem. I have an app that I'm developing that involves photos so screen space is at a premium. Also, using disappearing and reappearing nav / tool bar controllers (like in the camera app) doesn't make sense for me. In a perfect world, I'd use a UITabBar to switch between the 4 main navigational view controllers that my program implements, however I also am going to need space for a toolbar right on top of the tab bar most of the time. These two components take up too much space between the two of them so I need a way to save some space.
That's where I came up with the idea of using a toolbar to implement the functionality of both the TabBar and ToolBar. On the left side of the ToolBar would be the 4 buttons that allow access to my 4 main navigational view controllers. The one that is currently on the window would have it's button depressed. Then there would be a divider, and on the right side of the tool bar would be buttons specific to whatever view is currently on the window.
Anyhow, I'm just wondering if anyone has any clever ideas on how they'd implement this?
wat do u mean by left and right of toolbar??? adding a tab bar will not affect ur view size. when adding a toolbar, well yes it does affect ur view size.
my idea wolud be add a toolbar to the top of ur view and u can make it visible only when the user taps on the screen. until then keep the toolbar hidden. when the user clicks for the second time on the screen hide ur toolbar. this way u can have the whole view for ur pics and also have a toolbar for giving options.

UITabBarItem does not register click on the icon

I have four UITabBarItem's. Each has a label and custom icon. My AppDelegate uses the UITabBarDelegate protocol and every click on a tabbaritem is logged to the console so I can see what is happening.
The only way to select a tabbaritem is to click on the label. If I click anywhere else on the button area, including the icon, nothing happens at all.
Have you come across anything similar?
Well, I found the issue. Whenever a tab was clicked and a new view was programatically inserted, that view was placed on top of the tabbar, but since it's background was transparent I could not see it. So half of the tab bar was covered by another view. By making sure to bringSubviewToFront: the problem could be solved. Thank you everyone who tried to help.

Navigationcontrol in 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.