How to create a Tab Bar Based program with 5 Views - objective-c

I am relatively new to ObjectiveC, but not with programming in which I have experience with both C and Python. I was wondering how to make an application that has a tab bar on the bottom, and five views all with labels and a certain amount of text on them. Then, also, I want to migrate an image on too one of the files and have audio on in the background. Does anyone know how to do this, and I am also open to suggestions that incorporate using C as part of the program.

Check out this video tutorial and then just modify it to add in an extra couple of view controllers to connect to your UITabBarController. I try to avoid using the Tab Bar template in XCode as you don't get an option to include the Core Data stack. Even though you might not think you will use CD, it is nice to have it available, and starting with an empty application is much easier to work with IMO.

Launch Xcode and select file->new->new project->Tabbed Application

Since you are new to XCode/Objective C, I recommend that you create a new Project in XCode choosing "Tabbed application", play around and understand the project that loads.
When the project loads by default you will get 2 tabbar items only, but you can add more View Controllers and associate them with the Tab Bar Controller to have your total 5 views
You can also change image and text for each of the tabbar items based on your needs.
I think looking at this a Video tutoral : http://youtu.be/aorBSWbhGEE will be helpful to understand it quickly. You can search on Youtube for more similar videos

Related

How to replicate page transitions like in iTunes Quick Tour

If you open your iTunes and in the Help menu select iTunes Quick Tour you will be presented with a guide on how to use the app. I want to create something that resembles the transitions this window has. I am trying to start this using Storyboards instead of programmatically. The dots at the bottom allow you to jump to a specific view as well as transition to the next view or previous view.
I am developing this guide in swift for an OS X application.
1) Would this be easier done using a Page Controller or a Tab View Controller or something entirely else?
2) I googled but couldn't find any guides that were close enough to help me get this done. Any guides for this would be appreciated.

how to make an ios app adaptive in Xcode 6.1(objective C) using auto layouts or any other simple approach

I am very new to Xcode and so as with auto layouts and i want to make my app which i've created, adaptive in a very easy way. I have seen lots of tutorials on internet but nothing helped me with my app. so i don't know how to make my app adaptive. so i need a help.
I have made an app that generate report in second view controller after providing inputs in first view controller.so i need to see how can i use auto layouts in my respective app to make it adaptive or there any easy way to get the results. i have seen all the videos related to it.
thanks in advance.
The best way is to use Auto Layout and Size Classes. This way your app will work with all iPhone sizes and all iPads. It will also behave correctly in portrait and landscape.
For more details, you will need to read and watch a lot of documentations/WWDC videos.

Controls/Design Pattern to use for an iPad app with two levels of tables leading to a detail view

I have an e-commerce site I'm trying to produce an iPap specific app for and am struggling with the best way to recreate the menu structure. We have a top level menu that lists product categories. Clicking on that displays the list of products in the selected category. Clicking on the product takes you to the product detail page.
It seems like a great place for a UISplitViewController but I'm struggling with the two levels of browsing. Should I do a single table controller for the product categories taking you to a UISplitViewController with the product list and product detail? Or just two separate tableviews leading to a normal view and not mess with the splitview? How have other app handled this? I'm honestly not that much of an iPad user, so I'm not familiar with how other apps have done this type of thing.
If you are prepared to only target iOS 6+ you could wait and use the UICollectionView. Then you could implement something similar to the photos app on the iPad with pinching/zooming and turning of products (instead of photos). The WWDC 2012 videos have examples to view and go through example code.
If you have to target iOS 4+, UISplitView will also do the job in a more straightforward fashion.
The design with the UISplitViewController is what you should go for. You can then deal with your hierarchy incode more or less like you would on an iPhone with a plain navigation controller.

How to create a Controller to simulate the Springboard feature of the iPhone within your own application

I am trying to design a feature in my application for the iPhone that simulates the Springboard feature (Main menu of the iPhone that allows you to view more apps), or the way Weather application works that allows you to flip between views.
Does anyone have any samples of this how I would go about doing this. It's seems very trivial but I am wondering if I am missing something that is already available either as an Apple example or someone who did a tutorial on this.
The image below show how the user would use it.
alt text http://www.agilitesoftware.com/SpringboardExample.png
As they slide their finger to the right (or left) the other image would begin to show up. And it would animate smoothly. The faster you swiped your finger the faster it would move to the next view.
Update: The other feature is that it should mimic the same feel when you slide your hand across the display that is snaps to the current view into place. It should not keep sliding across if there is more than 1 view to the direction you swiping your finger.
I've seen other applications use this so that is why I am asking.
This is accomplished using the UIScrollView with the pagingEnabled property set to true. Just add each of your views, adjust the contentSize, and it will automatically "page" to the width of the screen across the content.
There is a sample app (with code) with exactly this functionality on the iPhone developer site on Apple.com (I believe it's called "PageControl".) - I'd suggest checking it out.
d.
I'm writing an app that uses a similar UI. As NilObject recommended, we're using a UIScrollView with pagingEnabled=YES.
You may also be interested in this example code involving just two child views. I'm trying it out now; it's an interesting technique but I've had to write some additional special-casing code for some odd situations that resulted.
There's also another question on this site that asks about creating a grid of icons like the home screen.
I would check out Joe Hewitt's code from the Three20 project for this. It provides a nice interface and further refinement of the UIScrollView implemented as TTScrollView and TTScrollViewDelegate, TTScrollViewDataSource.

Animating Tab Bar page switching

I'm quite confused with the whole animation stuff in iPhone SDK. I tried to study throught the SDK documentation, this website or tried googling it out without success.
I'm unable to get my scenario work.
I have single XIB file, with tab bar and a 4 tabs.
In a special event i want to switch from one page to another "in code", so I call eg: [tabController selectedIndex: 0].
I need this transition to be animated. Is there a way?
If user switches tabs manually, no animated transitions are needed
Also I have one subquestion:
In one of the tabs I have a UITableView with set of items. When user clicks any of these items, another set of items are beign shown (sort of hierarchy browser)
I tried to animate this transition using -deleteRowsAtIndexPaths:withRowAnimation: and -insertRowsAtIndexPaths:withRowAnimation:, but without luck.
Desired transition is shifting the old items set to the left side and the new items from the right side.
This is first time of my iPhone development, when I got lost even with all the forums and documentation. :)
Thanks in advance to anyone trying to help me!
As for your first question: Yes you can.
Try this link for some answer:
transition on tab bar sample code.
In short words: you should add a delegate object to handle the tab bar switching by setting the tabBarController.delegate = self.
Yet, what this forum post won't tell you is that you need to "import" some framework to do it.
First - right-click on the framework folder on the left hand list in Xcode and add an existing framework named: "QuartzCore.framework".
Than - add these lines to your tab bar holder (on .h file):
#import <QuartzCore/CAAnimation.h>
#import <QuartzCore/CAMediaTimingFunction.h>
As for your second question, try to replace the datasource (array or what ever) or create login function on the cell to replace its content.
Enjoy!
First Question: No, you can't animate tab switching. Please read Apple's Human Interface Guidelines on this. Tabs are meant to switch instantly. An animated transition would break the "tab" paradigm.
Second Question: When you tap on a row, the user does not expect other rows to disappear and new ones to appear. Instead, this sounds like a case for a UINavigationController. Please refer to Apple's sample code, specifically the UICatalog for sample code on how to implement this.