Iphone multi screen/view application - iphone

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.

Related

ios app second screen

I am a beginner to the iOS app development and working on a sample app that consists of just two "screens" - the first screen authenticates the user against user id and password saved in a SQLite database table and the second screen displays list of users in the database if user authentication is successful. If authentication fails I would just like an alert displaying appropriate message to the user.
I somehow can not connect how to "go to the second screen" if user authentication is successful. How can I tell the application that now that the user is authenticated it is time to go to the second screen and display the list of users?
I apologize if the terminology I use is not standard iOS app development terminology but I am new and would like to fill the gaps in my understanding. Please feel free to direct me to any links/tutorials/documentation.
Thank you.
Navigation is a fundamental and essential part of iOS programming and UX design. Traditionally, views are managed by ViewControllers, which in turn may be managed by NavigationControllers in stacks. To naivgate between and away from controllers, we define two new verbs: Push and Pop. To go to a new view, one pushes it onto the navigation stack. To transition away from a view, one pops it off the stack. And so, with these two paradigms, we can define simple transitions which are managed by the UINavigationController object. Have a look at the navigation guide in the docs before you proceed any further.
You don't appear to have sufficient understanding of iOS basics for any of our answers to be helpful. A word of advice: don't waste your time wrestling with code before you have a bit more of a foundation; you will just become frustrated.
Take a few hours and review some of the videos in Paul Haggarty's Standford iOS course.
Once you understand some of the building blocks and concepts of the API, things will move along much more quickly.
Are you developing against iOS with Storyboards?
If you start with the boilerplate "Master/Detail" template in Xcode for iOS 5 with Storyboards, you will get some sample code for a master view (uses a UITableView), detail view (uses a UIView with a label in it), and a segue between the two view controllers to go from master to detail, along with a "Back" navigation button that pops the detail view off and back to the master view.
The iPad boilerplate for that type of project is slightly different in the it uses a UISplitViewController to show both master and detail at the same time and doesn't use a segue between the two.
You could take a look at that boilerplate code, modify it, and go from there.

Create an iPhone app with more than one "screen"

I am relatively new to Objective-C / iPhone programming, and have only created single view applications thusfar. I am interested in creating an app soon than will have a "wireframe" in a sense that allows me navigate the various views of my app using buttons. So I guess my questions are:
What do I need to do to make an app that has more than one view
How to I link them with UIActions in buttons to navigate the various screens (ex a back button to go to a previous screen)
and I may have more as I go, but this is a start.
Thanks!
Since no one really had a clear helpful answer, I will share my own conclusion. Xcode 4 offers a very intuitive and interactive way to create multiple MVCs and segue between them even providing the interface to travel between views. I found out how to use this feature from Paul Haggarty's iOS course on iTunes U. I highly recommend it.
Joey
You'd can use a combination of, multiple UIViewController and or UINavigationController's. Utilizing methods such as presentModalViewController:animated: and pushViewController:.

how to add tab bars?

i m having an view based application,
in my second view i want to have an 5 tabs.
but i hv no idea how to implement it.
i hv already added 5 tabs,but its not working, any tutorials or somethionng will be very helpfdul
thanks a ton
I found this one quite helpfull back in the days when I started programming.
Tutorial for iPhone app with UITabBarController and UINavigationController
On another note:
If you start developing with the "Tab Bar Application" template from XCode things might be a little bit easier to start with.
I would also question the Design of an application that is view based and has a tabcontroller only in one of its modal views. I'm not sure if this is reason enough for your app to be rejected, but i could imagine that this sort of UI design might not be in line with Apples iPhone Human Interface Guidelines

Architecting iPhone Views - seeking help on a specific issue + general advice

I am primarily a web developer (ruby, python) that is new to iPhone development. I've done some desktop development in the past within the MS environment (C#), but never anything on the mac.
I'm trying to build a really simple iPhone application and I am confused by the way that views work in general. If someone can provide advice for my particular problem, along with some resources where I can learn how to architect iPhone views in the future, that would be awesome. I feel like a lot of the Apple documentation that I've come across is too specific - I am lacking a fundamental understanding of how views work on the iPhone.
My particular problem looks like this:
I need one view that displays some downloaded text content. This is the view that shows when the app loads, and it is pretty straightforward.
Then I need a settings area (I've already decided I don't want to use the iPhone settings area). The settings area main page will have some text fields on it. It will also have a 2-row grouped table. Each cell in that table will take you to another view which also has a grouped table used for multi-select. I suspect that I can reuse the same view for these two final "detailed setting" views.
In summary:
home page
settings main page
detailed setting 1
detailed setting 2
Any help and advice appreciated.
It sounds like you already have a good idea of what you want each of your screens to look like; that's a good place to start.
What you're probably going to want to do is use Interface Builder to lay out the objects in each view (textfields, buttons, etc.), and then have a custom View Controller (subclass of UIViewController) for each view. You would then navigate to a new view by doing something like:
MySettingsController *controller = [[MySettingsController alloc]
initWithNibName:#"SettingsView" bundle:nil];
[[self navigationController] pushViewController:controller animated:YES];
(assuming a navigation-based app).
If you haven't yet, I recommend reading Apple's View Controller Programming Guide
Some advice: Despite your back ground, don't think of the views as pages or the app as a web site. That will cause you problem in your design because the technology is different and views don't work like web pages and apps don't work like web sites.
The major difference is that while web pages often contain actual data, views do not. The view object is only concerned with display. It doesn't know what it is displaying and it doesn't store or logically manipulate the data. The data comes into the view from the view controller which itself gets it from the data model.
See Cocoa Core Competencies: Modal View Controller
Rails uses MVC if you've used that with Ruby. The basic principles are the same.
Well, there are plenty of information on Apple developers' pages: you could start reading Your first iPhone application
There are quite a few good sites with very good info both on cocoa and iPhone developing:
Cocoa with love
iCode blog
and many more (google is your friend in this).
A couple of books I liked are "Beginning iPhone3 Development" and "iPhone developer cookbook".
The first is probably more useful at the beginning (no pun intended)
As for the specific case of yuor application, you could use a navigation controller for the settings page, and each time you need to dive into the details you will just push the right view onto the navigation controller's view stack.
So you would design 4 views with the interface builder
Main view
Settings view
Detail 1
Detail 2
And then push the views onto the navigation controller.
It's pretty straightforward, I won't go into the details, but just searching something like "iphone navigation controller example" on google will give you plenty of samples that you can easily adapt to your needs.
These were all helpful responses, in particular the reference to the iPhone View Programming Guide. This helped me to diagnose my misunderstanding which was related to the role of View Controllers, and the relationship between individual views and view controllers. I think part of my confusion came from learning MVC in the context of Rails, where this relationship is quite different.
For others looking for advice in this general area, I would recommend checking out Lecture 6 from Stanford's iTunes U iPhone Application Development course from Winter 2010 "Designing iPhone Applications, Model-View-Controller, View Controllers", and the lectures 5 & 7 if you have time. I think that was when the penny dropped for me, despite having already looked at a few of the books mentioned here.

Utility Application and View-Based application

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.