TabBar as rootController flip animation - iphone

I'm using a TabBarController as the root controller for my app. I have all the views I use (5 tabs) all hooked together through it in interface builder. What I'm trying to do is trigger a slide or flip animation when moving between tabs. However, I only want this to occur when I change tabs programmatically (ie the animation is triggered when someone does a swipe gesture in the one of the views, but not when they just select one of the tabs). The way I'm currently handling this is by calling:
[appDelegate.myTab setSelectedIndex:0];
when the iphone detects a swipe. I've been searching the internet for 5 straight hours and can't seem to find a way to add an animation here. It'd be really cool if there were something like:
[appDelegate.myTab setSelectedIndex:0 animated:(YES)];
However, there isn't... I can't imagine no one's ever tried this before, but for the life of me, I can't find anything online that explains how this can be done. Thank you in advance for your help.

Related

Is Selecting Multiple Items with a Two-Finger Pan Gesture only possible with UITableViewController?

I tried implementing the selecting multiple items with a two-finger pan gesture. However, the checkmarks didn't always appear and disappear when tapping edit to start the process, or tapping done when finished.
I later discovered that it works fine when using a UITableViewController after choosing the different controller from cocoa touch menu, instead of the UIViewController and UITableView I was using before.
So my question is: is it correct for me to now assume that these gestures when used in a table are really meant for a dedicated table view controller (with all the extra functionality you only get from it)?
Without any example code, I can't really see what might be going wrong. Have a look at the documentation to see if you are implementing it correctly.
https://developer.apple.com/documentation/uikit/uitableviewdelegate/selecting_multiple_items_with_a_two-finger_pan_gesture

UITableView in UINavigationController Custom Animation

I am trying to find a way to make a UINavigationController push a table row into the next view during the animation. So that when the user clicks the table row item it follows the animation while all the other rows push off the screen. I have looked into UIViewControllerTransitioningDelegate but haven't found any luck. I have seen similar things done with apps that when you click on something, an image follows you through the transition and that is essentially what I am looking for. I don't want to burden anyone to code it for me, but if you have any pointers on what I should look into or what paths I should take that would be great.
I guess this is exactly what you are looking for. Although I am not sure that it will work in ios6.
http://dativestudios.com/blog/2013/09/29/interactive-transitions/

UIScrollView stopping my UIGesture from doing view transition

So I am working on this project here, to test some things that I am interested about, such as view transitions using UIGestures.
I am currently testing how view transitions behave when they have things like UIWebViews and UIScrollViews in them. What I have found out currently is that if you have a UIScrollView bigger than the view frame then the transition (using gestures) is blocked if you are using a UIGesture to change the view. (Such as swipe left or right)
I was wondering if there is a way around this or a solution that I don't know about..
Try using
gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:
return no for it and see if that works.

iPhone transition effect to reveal an updated version of the same view

So I have an app on the main page is details of the current date.
The page has left and right buttons to move to previous and next dates and a table of info below. This all works.
However I want to add a swipe between the days, now doing the swipe control is easy and I have done that.
However I want to give the visual indication of a swipe.
I am not changes views , I am simply refreshing the current view.
If you look at myfitnesspal (free app) , that swipes between dates in the same way I am after.
It scrolls off (a copy?) of the screen to one side , slides in the latest version to replace it.
I am at a loss on how to achieve such a simple effect without going for multiple views which unless I am misunderstanding would be over complex.
Use a UIPageControl, here is a tutorial of how to implement one using only two views: Cocoa with Love UIPageControl sample
Both views can be identical, (instances of the same Class, created programmatically or 2 CustomView outlets on IB)
This way you only need to update the view that's going to slide in the screen.

Tabbar App with Paging between tabs

I've been struggling for about four days now trying to figure out how to implement the functionality I need. Basically I want to make a tabbar app that you can swipe back and forth between the tabs. Say I have 4 tabs. Would it make any sense just to create a scrollview that's 4 times as wide as the device, and load up 4 individual views side by side? Then I could use the tabbar delegate to simple tell which page to make visible? I could also use itemSelected to update the tab itself if a user swipes to a new page.
does this make sense / is it a good idea? I just need a quick yes or no answer before I spend another whole day pursuing something doomed to failure. Thank you very much for your help...
A page control may help you. Or you can combine navigation controller with tab view. ie use navigate your page on tapping tab buttons.
Whether it's a good idea or not aside, one way you could achieve this is to register a UIGestureRecognizer on the UIViewController in each tab, that when a swipe is detected, changes the tab depending on the direction of the swipe.
My initial idea seemed to work. I made a UIScrollView with a contentsize width of the four views I needed. I turned paging on, and used the UITabBar delegate to switch the itemSelected when a new page comes up. When someone presses a tab, I use the delegate
-(void)tabBar:(UITabBar *)myTab didSelectItem:(UITabBarItem *)item { }
to change the contentOffset of my scrollview. This may not be the best solutions in many cases, however, my app is simple enough that it works quite splendidly for me.
The original question is, how do you enable side-swipe functionality in a tab-bar app implmented using the Storyboard feature.
This question remains unanswered in my opinion.
The way I see it, either the Storyboard tool addresses the problem domain fully, or else who needs it? If you're forced to do something ridiculous (no offense) like making a 4-page wide view to work around the lack of scrolling, then that it is an argument against the Storyboard. If you're forced to add code to do something that is in the middle of the Storyboard target feature set, then it's going to be confusing to anyone who comes to the project later - some things are done via Storyboard, some are done in seemingly unrelated code.
Storyboard is a great visual development idea, but it needs to have its capability heaving ramped up and soon. There is only one answer really to this question; it should be, just add another behavior element. The fact that that is not working is a bug or a defect.