Beginner question: Which iOS Template for huge application? - ios

I am now starting my first iOS application.
It has a login-sreeen at beginning.
After Login screen there should be around 4-5 items (Tab Bar?!) what you can do there (e.g.: write a PM).
What template should I use when beginning with this?
What is the exact difference?

There is the cunningly named Tab Bar Application template
But to be honest with you; if you are just starting your first iOS application - worrying about what template to use is of lower priority than other questions. The templates provide a starting point, but you still have to fill in a lot of the detail. Don't think that choosing the template means you only have to fill in a few details to flesh out your app.
Have you read any of the documentation? That is really what you should be doing and planning your application model rather than worrying about which template to use.

You could use a single view application and then go to editor->embed-> navigation controller. After that all you need to do to add another screen is drag a storyboard from the IBObjects and create a segue to it by pressing ctrl and dragging from a button to the newly created storyboard. That way when you hit this button it'll take you to the new screen and a back button is provided by default by the navigation controller.
Hope that helps!

Related

On an iPad, how to create a left side menu to let the contents displayed at the centre according to the item tapped on the menu

I am very new to iOS development. Currently, I am trying to develop an iPad app, which is used for taking orders in a restaurant. When I am trying to create the UI on an iPad, I want to create a left side menu to let the contents displayed at the centre according to the item tapped on the menu. Which is similar to this: http://www.dhtmlx.com/blog/wp-content/uploads/2011/02/ipad_menu_final.jpg
As I am very new to the iOS development, can anybody tell me where I can learn iOS development step by step. And are they any samples of this kind of app that I can refer to?
Thanks very much!
there are many tutorials for creating split view application as links provided by #PratyushaTerli and otherwise you can use direect way as recommended by #antonio MG and there is another two good links for creating them which are : https://github.com/mikefrederick/MFSideMenu (good demos in it using story board or using xib's ) and you can look on project on github named - mmdrawercontroller.
annother good project is this
As Antonio MG said, the easiest way to do this is with Master/Detail project in Xcode. It uses the UISplitViewController logic of one 'Master' controller which controls the appearance of detail content in the 'Slave' or 'Detail' controller aside.
The sample Xcode project should be enough to make you understand how UISplitViewController and its UISplitViewControllerDelegate work together. Or also checkout this tutorial: http://www.raywenderlich.com/1040/ipad-for-iphone-developers-101-uisplitview-tutorial
Just create a Master/Detail project and you will have the basic structure of that kind of behaviour. The rest is just customising the table and the cells.

Split View inside of a Tab Bar in an iPad Application

When the iPad first came out, I recall that Apple frowned upon the use of a Split View inside of Tab Bar Item View. Whether or not they rejected applications that used this design I don't recall or know anything of.
Is this design still frowned upon by Apple? If you create an application that uses this design will it be rejected by Apple? I know there are third-party API's now that help you write applications that utilize this design pattern which leads me to believe that Apple no longer cares, but I just wanted to be sure about this.
If anyone can shed some light on why Apple frowned upon this design that would be helpful because I don't understand what about this design was an issue for Apple.
I can't find the citation at the moment, but there used to be a section in the HIG that said that you must not do this, and then they changed it to one saying you should try to avoid doing this. So I think you're clear, as long as the design makes sense. Sadly I can't find where that phrase occurred — maybe it was taken out all together.
At any rate, there's nothing in the HIG under either tab bar or split view that says you can't do what you want.
I just stepped over this, too.
This also didn't work in the Interface-Builder prior to 5.1.
But i just tried today and recognized that you can simply add a relationship from a tabbar controller to a splitview inside interface builder (this did not work before).
However, only the detail view shows up when running the app and select the tab containing the splitview.
edit: This seems to work out very easy if you compile for 5.1. There seems to be a change in handling Splitviews.
Just try it out:
In your Storyboard, create a Tabbar Controller
add a Split View Controller
Create a Reference from the Tabbar Controller to the Split View Controller
Now you need to create your Master and Detail Controllers
I am not finished with the implementation yet, but hope this helps.

iOS:Switching between views using UINavigationBarController

First of all, I am using XCode 4.2 and I am not using storyboards. I need to make an application with 2 views.
First view will contain a button and a navigation bar, the button's IBAction should only go to the second view, and from the secondview you should be able to go back to the first view via the Navigationbar.
My problem is the navigation controller / navigation bar, how do I set that up ?
I know that it would be smart using the singleView app and then add a navigation controller, the problem is that I dont know how to set it up in the code.
I have searched for similar problems on the internet, and I keep getting into posts where they use another SDK or using an older xcode etc.
What I do know is how to make the button, actions and delegation.
Anyone out there who is sitting with the one and only tutorial I am missing or can tell me how to do it ?
Thank you
Use the Master-Detail Application template. Ignore the stuff for tables, it has navigation stack implemented in it. By deleting the tables, you should be pretty much left with what you are after.
You should go to http://developer.apple.com/, search for UINavigationController, click on UINavigationController Class Reference, then look at one of the linked sample code projects there.
if you really want to learn how to implement it from scratch (and not depend on the master-detail template), i highly recommend the following resources:
the apple documentation on UINavigationController
the solutions from the big nerd ranch iOS Programming guide (particularly the Homepwner example)
also found this tutorial in a quick google search, but haven't fully vetted it in xcode 4.2 (there will likely be small differences in how you have to go through the steps).

Converting from a Window based application to a view based application in Ipad

I would like to know if it is possible for me to convert from a window based application to a view based appln... The reason is because I had already developed a part of my app but am getting some orientation issues which I was told would be solved only by using a view based application.
I was unable to find online any documentation regarding this..
It would be be great if anyone could help me out in this...
"Window based application" and "view based application" are just two of the templates you can use to start a project, anything you can actually do with one you can do with the other.
In the version of XCode I have handy here, the only difference between the two is that "view based" gives you an empty view controller and hooks it up to be displayed on app startup.
add a view controller subclass to your project, and then create an instance and add its view as the subview of your UIWindow in application:didFinishLaunchingWithOptions:, you've basically done it- anomie
it's the best and easiest thing you can do as of now

use multiple views in an application

I am new to Iphone programming. So please don't mind if I ask some basic questions. :mad:
I want to develop an application where the landing screen will be a login screen and after login application should display a new screen with the list of available categories. And on selecting any category a new screen should appear with the information related to the selected category.
Basically I want to display different screens in the applications and my confusion is how can I make different screens with one .xib file? or should I use different .xib files for each screen. If I use different .xib files for each screen then how should I navigate to different screens.
Please help in solving this confusion.
Thanks in advance
Gaurav
You should definitely use different .xib's for each view. You will end up having a standard view, a table view (probably programatically wrapped in a navigation controller) and a standard view, respectively. Each will also have their own class.
You navigate to different screens by programmatically initializing them. The condition on which they are created varies from screen to screen. For example, your login screen will only create and load a table view for the categories after a successful login. The category screen will only create a detail screen when the user touches a category in the table.
I think your best bet is to pick up an iPhone programming book and do the first few chapters until you feel comfortable with the basics of XCode. The Apple documentation usually contains more than you really need to know and by the sounds of it, you just want to jump in and make a few simple apps.
After that, you can look at the Apple sample code here: http://developer.apple.com/iphone/library/navigation/index.html#section=Resource%20Types&topic=Sample%20Code

Resources