nested segues app performance - ios

i want to use a tab bar on top of the view controller not in the bottom. after searching, i found out it's against Apple's UI Interface Guidelines and it should always be at the bottom. However, my app has to have also one at the top. Anyway, i was thinking of using nested segues. For example, if we have three view controllers that each has 3 buttons on top that resemble the tab bar items, and i'm positioned on the first VC (hence, the first button is highlighted). When i press on the second button it gets highlighted and segues to the second VC. Then if i press of the first button, i'll be taken back to the first VC. My question here is if i worked using this paradigm, will the VC's be stacked? will the performance of the app decrease? can i achieve this in a better way in case the answer of the previous questions were negative?

try these projects
MHCustomTabBarController
ICViewPager
JCMSegmentPageController
QMBTabs

Related

Changed segue animation to "Show" but it's stuck in "Modal"

After creating ViewController informational pages which use UISwipeGesture to swipe left and right between 4 different UIViewControllers, I first selected "Modal" as the segue animation. But modal animation is contrary to the left/right swipes which should have "Show" segues which better match the user action. When changing the segue types in Interface Builder to "Show" the animations did not change. When de-selecting the "Animates" checkbox, XCode WILL eliminate the animation entirely, but then when selecting "Show" it goes right back to a modal segue animation.
Would show a picture of the set-up, but don't know how in StackOverflow
Tried embedding whole stack into a NavigationController and that didn't work.
Tried deleting segue and reforming it as "Show" from the getgo, that didn't work.
Shut down XCode and Simulator and restarted-- that didn't work.
Yet in another part of the same storyboard, "Show" segue works fine.
The problem was my segues were selected with Show Detail (replace) instead of Show (eg Push). When in interface builder you'll see you get presented with both of those as the top two selections. When using a UINavigationController, it expects Show (eg Push) to be selected which will put a Navigation header at the top of your UIViewControllers with a back button. In the case above, I'll simply write a short amount of code to hide the nav-header at the top of all my informational pages. I will keep the UIGestureControl left/right swipe code as a novelty item, but there are other ways to allow the user to swipe left and right to new pages (lookup PageViewControllers).
UINavigationControllers and Show (eg Push) animation go hand in hand, and you have to be wary of Apple UX/UI guidelines which protect the sanity of users before you go getting experimental with animations in segues.
Show (eg Push) arranges previous, current, and future ViewControllers like a stack of pancakes, so when you move from one to another you're pushing the top off like the top card of a deck of cards. Whereas Show Detail (Replace) acts like you're removing the card and replacing it with the next card. Best way to think of the difference between those two segues.
Not sure why compiler kept the modal segue after I changed it to Show Detail (replace)-- could be a bug with UINavigationControllers?

What approach should i use when making tab bar application

I'm started to work at new place as iOS programmer. I joined existing project and got an assignment that i don't really know how to approach.
So my problem is this: when you press a button, next window has to have a tab bar with four icons, this means four different navigation stacks. Its not that hard to make, but in main screen i have more then four icons, and if i press any one of them next window always has to have a tab bar with four static icons, like shortcuts or something.
So what should I do? Does anyone had the same situation? I want to start with a good advice to save trouble later on.
You should probably rethink the app design. Tapping an item on the tab bar shouldn't result in a different number of tab bar items, as it leads to an unstable and unpredictable UI.
While not the most efficient in terms of visible content, you could introduce a segmented control (or a similar custom view) on top right under the navigation bar (if there is one), as seen in the Facebook app (though here it is used to perform actions, not changing views).
Your root view controller should be embedded in a navigation controller. Then push a view controller which contains any number of tab bar items not TabBarController. Then you can present each view controller either push or custom.

iPad UI navigation - split view with horizontally scrolling views

I'm looking for suggestions to implement a specific UI navigation pattern on iPad. It's not radically different from standard behaviour, but I'm unsure of the best approach to use.
Picture a standard split view, with a master view on the left, detail on the right. I want an action in the detail view (e.g. button press) to navigate to an additional detail screen by scrolling from right to left. The result is that the original detail view is on the left (with its width unchanged), and the new detail view on the right. A back button in the nav bar reverses the process. When the master view is visible, the back button is replaced by a menu button in the nav bar (show/hide slide out menu).
I've seen a few similar implementations in existing apps. One that's easy to reference is Shopify's
online demo. Adding an item to the cart and pressing the total button triggers the navigation behaviour.
Any pointers on the best way to implement this would be much appreciated.
Thanks.
Creating a custom container view was a good solution.

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.

"Slide" segue between UITabBar views

My iOS 5 app uses storyboarding with a UITabBarController. There are three "tabs" each displaying a view controller which has been linked using a relationship back to the UITabBarController. At the moment each view controller appears when you tap the relevant tab, as expected. However, for a more gracious transition I would like to slide the view controllers on and off screen.
By way of example, if I am currently on Tab 0 and then select Tab 1 the view controller on screen (for Tab 0) should slide off to the left-hand side of the screen, and the new view controller (for Tab 1) should slide on from the right-hand side of the screen.
I have been able to achieve this behaviour using a custom UIView as the tab bar but would like to know whether this is possible with a custom segue in storyboarding, as that would certainly save a lot of coding (and also would keep things a fair bit neater in the project)?
Thanks in advance for any assistance.
I am trying to do the same thing.
Unfortunately I think the relationship segue does not allow any customization as it just connect tab bar and the tab bar items together, and not a transition.
My guess is we have to do the transition ourselves when the view appeared.

Resources