 |
 |
|
 |
04-09-2009, 02:35 PM
|
#1 (permalink)
|
|
New Member
Join Date: Apr 2009
Location: Los Angeles
Posts: 20
|
What kind of project for multi-screen app?
Hi folks,
I'm extremely new and green to iPhone. I've read the application programmer's guide and looked at some of the tutorials. But I still have some questions on what kind of project to create for my task.
I am playing around trying to create an app that will have multiple screens that the user progresses through. I think I want a navigation-based app but am not sure.
The first screen will be some kind of scrollable view, for instance I might want to put a legal disclaimer there and let the user hit "continue" or "exit" to advance or terminate.
On the next screen I want to display some graphics, maybe an animation using pre-defined PNGs. I think the screen would combine some CF graphics (maybe I'll draw some lines myself) and overlay predefined PNGs.
I'm not sure what kind of project to create and how to start from there. If I create a navigation-based project using xcode, the first view is a table view. Where is this done? I don't think I want a table view, do I?
Do I need a UIView? I believe I can display images on this and also draw CF graphics. Correct or not?
How do I specify the use of a UIView (or whatever I need) instead of a table view?
Not even sure if I'm asking the right questions.
Many thanks in advance.
So I think I want a UIView? I want to
|
|
|
04-09-2009, 02:50 PM
|
#2 (permalink)
|
|
New Member
Join Date: Sep 2008
Posts: 1,431
|
Buy one of the books on iPhone development. This will be the fastest way to learn.
|
|
|
04-09-2009, 05:11 PM
|
#3 (permalink)
|
|
at this moment
Join Date: Mar 2009
Location: San Francisco, CA
Posts: 870
|
Quote:
Originally Posted by rhimbo
I am playing around trying to create an app that will have multiple screens that the user progresses through. I think I want a navigation-based app but am not sure.
The first screen will be some kind of scrollable view, for instance I might want to put a legal disclaimer there and let the user hit "continue" or "exit" to advance or terminate.
On the next screen I want to display some graphics, maybe an animation using pre-defined PNGs. I think the screen would combine some CF graphics (maybe I'll draw some lines myself) and overlay predefined PNGs.
|
You can use the "view based application" xcode template and then define all your own views and controls for moving between them. So assume you create an app called MyApp. In the MyApp.xib put a button labeled "continue" and wire it up to a method called continuePressed. Now create a second xib with your second screen view and hook it up to a class called SecondViewController. In continuePressed you'd do something like this to flip the screen over to the second view:
Code:
SecondViewController *view2 = [[SecondViewController alloc] initWithNibName:@"SecondView" bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
[self.view addSubview:view2.view];
[UIView commitAnimations];
after the view flips over you'll be in the SecondViewController class in the viewDidLoad method and you can do whatever you need to do there.
|
|
|
04-09-2009, 05:55 PM
|
#4 (permalink)
|
|
Registered Member
Join Date: Mar 2009
Location: Toronto, ON
Posts: 111
|
Quote:
Originally Posted by PhoneyDeveloper
Buy one of the books on iPhone development. This will be the fastest way to learn.
|
I second this. It's so easy to get ahead of yourself without having the proper knowledge and skills. Plus, advancing through the tutorials in an iPhone dev book for beginners, you'll learn so much, and probably find new and better ways to design and code your app than what you initially had in mind.
|
|
|
04-10-2009, 01:23 AM
|
#5 (permalink)
|
|
New Member
Join Date: Jan 2009
Location: San Diego, CA
Posts: 405
|
You are trying to create a "wizard". None of the built-in templates is going to create a wizard for you.
The book Beginning iPhone Development does you a very big favor - they eschew (at least initially) the use of the templates, in order to show you how to create an app from scratch. This will give you a better understanding about how the pieces fit together.
I've come to realize that the templates are pretty much a complete waste of time. They aren't even consistent between the templates in ways that you would expect them to be.
For example the Utility template creates View classes. The TabBar template doesn't bother. And the TabBar template only creates a controller for the first view, leaving it to you to create one for the second view. And it stuffs the content for the first view in the MAIN window's NIB. It's a HORRIBLE starting point for an app! The Utility template actually does a better job.
Learn the plumbing. Don't rely on the templates.
|
|
|
04-10-2009, 08:37 AM
|
#6 (permalink)
|
|
Lover boy
Join Date: Nov 2008
Location: INDIA
Posts: 475
|
u can make first view as a normal view .. in nav
__________________
In order to succeed, your desire for success has to be greater than your fear for failure
|
|
|
04-10-2009, 06:17 PM
|
#7 (permalink)
|
|
New Member
Join Date: Apr 2009
Location: Los Angeles
Posts: 20
|
Quote:
Originally Posted by jtara
You are trying to create a "wizard". None of the built-in templates is going to create a wizard for you.
The book Beginning iPhone Development does you a very big favor - they eschew (at least initially) the use of the templates, in order to show you how to create an app from scratch. This will give you a better understanding about how the pieces fit together.
I've come to realize that the templates are pretty much a complete waste of time. They aren't even consistent between the templates in ways that you would expect them to be.
For example the Utility template creates View classes. The TabBar template doesn't bother. And the TabBar template only creates a controller for the first view, leaving it to you to create one for the second view. And it stuffs the content for the first view in the MAIN window's NIB. It's a HORRIBLE starting point for an app! The Utility template actually does a better job.
Learn the plumbing. Don't rely on the templates.
|
Do you mean the book by Dave Mark and Jeff LaMarche? Here is the link to amazon.com:
Amazon.com: Beginning iPhone Development: Exploring the iPhone SDK: Dave Mark, Jeff LaMarche: Books
And, when you say "learn the plumbing" do you mean learn to code by hand and don't use the Interface Builder? (I like that philosophy actually. I need to understand conceptually what and how things work).
This is the book I just purchased before I saw your reply!
Thanks in advance....
|
|
|
04-10-2009, 06:45 PM
|
#8 (permalink)
|
|
New Member
Join Date: Mar 2009
Location: Silicon Valley, CA
Posts: 135
|
Yeah, Beginning iPhone Development is a great book. I've bought 2 other books since I picked that one up ("iPhone SDK Programming" by Maher Ali and "The iPhone Developer's Cookbook" by Erica Sadun) and the Mark & LaMarche book is the one I refer to most frequently.
The Sadun book is pretty good as well - shows some other tricks that the Beginning iPhone Development book kinda glosses over (nothing significant though; mostly just extra features on controls and even a few undocumented API's which might get you in a bit of trouble!)
I'd also recommend you check out this website for some video tutorials; I find anything by Zack Carter (zcarter) to be pretty informative and useful:
Welcome to the iPhone Development Central Website!
Dave
|
|
|
04-11-2009, 01:03 AM
|
#9 (permalink)
|
|
New Member
Join Date: Jan 2009
Location: San Diego, CA
Posts: 405
|
Quote:
Originally Posted by rhimbo
Do you mean the book by Dave Mark and Jeff LaMarche?
|
Yes.
Quote:
|
And, when you say "learn the plumbing" do you mean learn to code by hand and don't use the Interface Builder?
|
No. THAT'S a bit extreme!
Yes, it's useful to know how to draw on a window. But I wouldn't start out that way.
I meant not using the built-in startup templates for Utility, TabBar, and NavBar apps. Instead, the book starts out using the simple Window app template, and has you add the NIBs, controllers, and all the "plumbing" between the NIBs and controllers from scratch. It helps to reinforce how everything fits together.
BTW, one aspect of this book will drive you crazy: none of the "plumbing" will work the way the book describes it. That is, say, dragging outlets to NIB elements. Apparently the book is based on an older version of Xcode, and Apple change the UI for Interface Builder in the mean time. You'll have to study the IB documentation a bit the first time you get stick.
(Hint: when the book says "Control-Drag" and nothing happens, don't kick yourself. Control CLICK withOUT dragging, and noodle around with what pops-up...)
Unfortunately, none of the current books are really that good. But this is one of the better ones. The unreleased book from Pragmatic looks pretty good, though, and I think is nearing completion (you can get it in beta as a PDF).
|
|
|
04-11-2009, 01:20 AM
|
#10 (permalink)
|
|
Registered Member
Join Date: Sep 2008
Posts: 430
|
i would just do a normal view based application then add SubViews...
but thats just me
if you wanted a nav bar at the bottom where you click to choose the screen your on you could do a nav app or add you own custom nav bar to your view based app that will remove the old subview and add the new one you pressed the button for
hope that helped
|
|
|
04-17-2009, 12:33 AM
|
#11 (permalink)
|
|
New Member
Join Date: Apr 2009
Location: Los Angeles
Posts: 20
|
You are correct! Book examples don't work in regards to IB
Quote:
Originally Posted by jtara
Yes.
BTW, one aspect of this book will drive you crazy: none of the "plumbing" will work the way the book describes it. That is, say, dragging outlets to NIB elements. Apparently the book is based on an older version of Xcode, and Apple change the UI for Interface Builder in the mean time. You'll have to study the IB documentation a bit the first time you get stick.
(Hint: when the book says "Control-Drag" and nothing happens, don't kick yourself. Control CLICK withOUT dragging, and noodle around with what pops-up...)
|
Ouch! You're right. I already ran into trouble. The simple "button fun" demo doesn't work. I'm going to try your suggestion above (Control-click) and see what happens.
Do you think the Apple tutorials on the dev connection web site are correct? I'll try those to learn how to use IB correctly.
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 513 |
| 57 members and 456 guests |
| aoredsson, beausejour, bensj, BustinStones, chinhminhdo, CHV, codeMonkey, conanjb, CoolApps, Corey, CunningCat, dany88, dda, DorkyMohr, dre, ggalante, healthyutech, iPhoneDevelopment, Jeremy1026, john3478, jorgmart, JoshuaCaputo, katyaskr, KennyChong, kkrimmer, LoDani, LunarMoon, macoholic, Maximilian, mlo, MMan, Mr Jack, mriphoneman, MrMattMac, Nightmare_82, not_too_shabby, NSeven, opetopic, pablo.roqueta, pablox, pierotofy, rarindeed, Rudy, ryguy2503, salva, seriessix, sgraves, stubbsjoe, supudo, Tambourin, themathminister, vcanic, virvalid, Vivek Nirkhe, warmi, wuf810, ZunePod |
| Most users ever online was 779, 05-11-2009 at 10:55 AM. |
» Stats |
Members: 21,495
Threads: 35,777
Posts: 156,729
Top Poster: smasher (2,448)
|
| Welcome to our newest member, AnuSambath |
|