In Xcode 4 which is the better app Window based or view based? - iphone

I am very new to iOS development. I am going to start a new project which is mostly related to to the database. Can you suggest what should I start from Window or view based app?

A view-based app only have one view, and includes a nib. However, window based app don't include a nib or a view, it's for add your own view.
I would chose view-based

1.There is no such difference in both
In View Based app you will get a default view controller in window.
In Window Based app you will not get anything by default already added in window, you have to add your own view.

They're used for different things. Neither is better than the other.
If you're a total rookie, I'd go with View based. It comes wired up with more stuff for you by default, and lets you work on your app's functionality rather than the details of getting stuff on the screen. It also limits you in ways that Window based doesn't, but for your level that's probably a good thing.

Anyway you have to make ViewController if you make project using window based.
Make your project using window based and View based. and compare both. So you can find what is different.
and iOS can have many view on only one window.

Related

OSX development, Xib menu and how the storyboard Window Controller associated?

I have two UI files, MainMenu.xib and Main.storyboard, the Main Interface of the project is MainMenu.xib, this file is only NSView, no other WindowView.
I don't know how to relate them. I want to implement the click MainMenu.xib menu to open Window Controller in Main.storyboard. But I don't know how to do it.
If they're in a storyboard, they should be pretty good, but now they're apart. I don't know what to do with it.
Please help me find some demo or documentation to make this clearer for me, thank you.
While some macOS apps mix XIB files and storyboards (especially apps that have custom table view cells), most apps in general will either be XIB files or they will be storyboard based.
You need to decide which approach you want to take for your app. Storyboards are great if your app is developed by one or two developers and you won't be merging or colliding changes with each other often. XIB files are more appropriate for larger teams as each XIB file typically contains a single window controller plus a view (and maybe a view controller, too), so there's less chance of havoc when doing merges back into GitHub or your Subversion repo.
Look at your target setting's "Deployment Info" section. For me, it looks like this:
When you make your decision for XIB or Storyboard, you can make sure of the one you want to use via that field.

What is the best way to manage 9-15 view from a main menu in an iOS app?

In my iPhone app, I must have around 9-15 different views, all available from a main menu. I started yesterday with a simple tab bar controllers, but they are only ideal with 6-7 views. Which controller can I use? Is there a nice one for my needs?
Edit: I am talking about around 9-15 menu-points for my application.
Each point is a single, categorizable function. I though about something like the Facebook app, where the app shows 2 menu-pages (slideable) and 9 icons on each page, each with another view / function in it.
look for cocoacontrols.com . i think you will find your need there .....
I think the component you are looking for(the same used in facebook app) is in the three20 library. Its called Launcher. It's like having iphone springboard inside the app. I'd go with that.
Can your views be split into categories? If so, I would suggest using the tab bar tabs as categories, and then using a table view as a menu in each tab.
You could also try using a page control, but 9-15 views seems like they would be obnoxious to navigate with a page control.
I understand that you need to have access to those "views" all the time. You can do what an iphone CNN app does. It uses horizontal scroll, where it has lot's of "views".
This is propably the most challenging part of writing an app for mobile phones. At least i find it not that easy to find the perfect user interface. Espcially if you have so much content and navigation to show.
I think the best way to solve this problem is to write your own navigation. If you want to use something similar like the facebook app - this is not so hard.
Take a UIScrollView in combination with the UIPagingControl. Create a new View for your buttons or whatever you want your user to see and put it in the scroll view. Enable paging for the UIScrollVIew and your almost done. Maybe it's not the easiest way - but in the end it's the most flexible way. You can decide what you want to show and you dont have to be dependent on what some other developer wrote.
Just a thought :)
// Edit: Just read in another question about appLauncher. This might be such a control you are looking for.
https://github.com/rigoneri/myLauncher

Beginner Question: Navigation Based Application iPhone

Okay, so I am a beginner at Cocoa and I've decided to try to make my first app. I went into Xcode and made a new app, I chose Navigation Based Application because it was the first one on the list.I need a tutorial that teaches me how to make a simple Navigation Based Application for the iPhone. I want it to be able to allow me to control what shows up when I click the '+'.
To see how navigation-based applications work, it would be suggestible to choose view-based application instead and work from there.
I would also suggest watching: Navigation & Tab Bar Controllers

view based vs windows based iphone application

REF: XCode
what is the differences between view based vs windows based iphone application?
Where are you going to use view based and windows based application?
Example? what does facebook use?
In regards to your question about the difference between View-based and Window-based templates, a View template gives you a Window template with a UIView already added and configured to display in the window, while the Window template gives you a blank slate with no default view set up.
About Windows, Views, and Controls
Understanding iPhone Views, Windows and the View Hierarchy
Usually only one window in UIWindow application. Apps can and ususally have multiple views, for example there are multiple views in a your typical iOS navigation application

how to create multiple pages in Xcode iphone apps

i am starting my experience with iphone sdk. and i have a question, which is i am trying to create two pages to the app but i don't know how to link them or design them. like when i start the Xcode i find one page named View to design in it, i want to make that page a welcoming page then the user choose one of the three choices he see in that page. Once he clicked on one of them the program take him to the next page or the page he chose.
thank you
The standard approach on iPhone is a drill-down. Place a UINavigationController in your NIB, make the root-level view your welcome page. Then navigate to dependent views by invoking pushViewController on that navigation controller.
This is a very high-level description; you'd have to fill a lot of blanks. If you create a new project and specify a "navigation-based application", you'll get quite a bit of boilerplate code for this approach.
You really need a good book, I recommend Beginning iPhone 3 Development by Apress.
Take a look at using UIViewController's
- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated
method. You can display your initial view, and when the user presses one of the buttons, display the intended view over top. If you build a new project, and choose "Utility Application" you will get some sample code for how this works.