I have read this question about the differences in the window- and view-based iOS application templates in Xcode, but I'm still confused about what template to use in my iPhone app.
I am developing a geolocation app for service stations. What template would be more appropriate for this: the view-based application template or the window-based one?
The choice won't greatly affect your end product. The real question is what template gets me closest to the app I'm designing.
The view-based application template is geared towards an app with a single view. It's just a starting point, though, and you can always add more views/controllers to it afterwards. There's nothing special in the view-based template that you couldn't add to a window-based template, as shown in this blog post.
Your app sounds like it might benefit more from a navigation-based template. That will give you a UINavigationController and a UITableViewController to work with initially, and I'm guessing that would work well with your list of service stations. Perhaps when a service station is selected, you'd push a geolocalisation (sp?) view controller showing the details of the service station?
View-based Application description:
This template provides a starting
point for an application that uses a
single view.
If your app's design contains only a single view, then choosing View-based Application will save you the trouble of creating and linking that view. Even if your app has more than one view, View-based can still save you the time of making that initial view. You want Window-based Application for when you know you're setting up something custom.
Related
I am very new to iPhone development, i am developing one sample application using xcode.
I am referring on-line tutorials and examples to build my first application.
I want to try multi screen/view application where i want to display specific screens on some specific events like button clicks.
I googled for tutorials on multi screen iPhone apps, but i am getting different ways of doing it.
I am confused in-between:
1. Navigation based application.
2. Window based application.
3. View based application.
Which application type do i need to chose for multi view/screen application. Is it that we can't create multi view/screen application using 2nd and 3rd type, i think this should not be the case, but i am confused.
what i have done so far.
I have created one window based application where i have one login page (text fields and click buttons) i want to extend this application to display main screen/error screen based on the login result.
I have created 2 .xib files for main screen and error screen(with there corresponding .m and .h controller files), now i want to remove login screen and display main screen/error screen, but i don't have idea how to archive this when we are in window based application.
can some one point to useful tutorials/examples that can explain this scenario.
Before getting into any online tutorials it'd be better to go through apple's guides.
Following guides could be a good start:
App Programming Guide - Design Basics To understand the basics of iOS development
Human Interface Guidelines
and
View Programming Guide
To understand and implement different view controllers
hope this helps your question regarding delegation
http://www.switchonthecode.com/tutorials/creating-your-first-iphone-application-with-interface-builder
If you're using storyboards with scenes and segues (iOS 5+), this tutorial might help clear things out.
I am creating a Universal iOs application as part of an assignment (iPad and iPhone :) ).
Naturally, they have a UI which I have been accustomed to create through the NIB files, using the fancy drag and drop schemes. This obviously seems like a great strategy when you are making a dedicated iOS device application.
However, with the universal application, I notice that this strategy can be a challenge since the 2 UIs differ and human error can promote a lack of consistency in the two UI's + double the work!!!
I noticed the solution to the assignment I am doing has the UI created through the AppDelegate file, I have never really done this, and from this stems the questions:
What is the appDelegate files for anyways?
Is it the way to create the UI for the Universal application through the App delegate? Or do you people still create the UI's through the NIB files meticulously for both iPhone and iPad?
P.S: Side question: This assignment requires me to create a Windows based application vs a View based application which is what I have naturally learnt to do. I understand a Windows based App can grow into a view based application and vice versa. However, I do not understand when you should choose to create a Windows based application?
The AppDelegate in Cocoa is your central Singleton that controls the app workflow. It's used by the underlying Framework to start the application, signal runtime envrionment changes and terminate the app. Being a singleton, it's always there and easy to reference ([UIApplication applicationDelegate]) and it loads up your first view controller.
It's generally common to let the application delegate keep refernces to model and controller objects. But what you describe, the whole UI programmed through the appDelegate, is bad style.
No matter if you use NIB's or you code your UI by manually adding UIElements to the view in code, you should do so in ViewController. Generally, the appDelegate will call the first view controller and that viewcontroller will call all view controller afterwards.
They seems pretty similar.What is the different? If I choose wrong, can I change it after I start coding?
A window-based project provides you with just a window and an application delegate class. The View-based gives you both of those, plus an initial UIViewController-based class. You can always add a viewcontroller to a window-based project, or remove it from the view-based one. If you're just starting out, I'd recommend at LEAST the view-based one.
I'm new to xcode and the iphone sdk. I've been working with the view-based application for quite a while, and I was wondering if a utility application and a view based application involved the same type of coding. Can someone point out the difference for me?
Thanks
The both use the same frameworks, the only difference is how they are set up by default. The unity template provides a two view application (by default) and the view based only one.
It seems that Utility application in Cocoa-Touch is just a simple application template for application with 2 views.
This is apparently good for simple apps which have primary screen and configuration screen.
Have a look at Understanding view controllers in Cocoa Touch which has some explanation.
It depends from what point you looking at differences. You still use cocoa-touch for your application. The difference is that simple view based application is a simple template for one screen application, you can extend it as you like. Utility application is simple template for an application with 2 views but you can extend it as you like.
What is the difference between window based and view based iphone apps ?
Thanks
From xcode:
The window based template provides a starting point for any application. It provides just an application delegate and a window.
This view based template provides a starting point for an application that uses a single view. It provides a view controller to manage the view, and a nib file that contains the view.
Besides what has already been said, the most important thing to remember is that iPhone apps can only deal with just a window. Therefore, you will always have a single window, even though you may have as many views (and corresponding view controllers) as your app needs.