How to avoid using storyboards for ios apps? [duplicate] - ios

This question already has answers here:
Xcode 6 - Template without Storyboards
(3 answers)
Closed 7 years ago.
I am learning iOS developpement (reading the Big Nerd Ranch Guide) and I want to learn using only my iPhone 5S as a test device. I am using Xcode 6.3.
However, as a beginner, I don't want to get involved with storyboards (which are besides seen as bad by some developers) and autolayout stuff. But, by default xcode does use that new feature and my windows are split when I run my sample apps on my iPhone.
How can I prevent it from doing so and use classic xib files for my iphone 5S?

You can assign your UIViewController subclass instance to window.rootViewController in AppDelegate and then take it from there.
Your project's Info.plist has a key "Main storyboard file base name". Remove that entry from the plist, and then delete the storyboard.
FWIW, storyboards aren't bad. In fact AutoLayout is much easier done in Storyboard than in code.

Related

Storyboard not loading GUI but still compiling [duplicate]

This question already has answers here:
why storyboard ui elements not showing on UIViewController in xcode 6?
(5 answers)
Closed 7 years ago.
I am building an application and just switched the computer the files were originally housed on. Now the app will still build and it looks exactly as it should, but the storyboard in xCode is full of a bunch of blank views. Any help would be appreciated. Thanks!
You probably designed your storyboard in a specific size class. Thus, all those views are conditional for that size class. Now, however, you've opened the project on a different computer, and the storyboard is showing the universal w:Any h:Any setting. Thus, all those views are missing. The app still works, though, because when it runs, the app is in the size class environment for which you designed it, and so the views appear.
To see the views in the storyboard, switch the storyboard to whatever that specific size class is.

Developing iOS user interfaces programmatically

I've been developing iOS apps for the past 3 years and learned to do so without the use of nibs and storyboards. With the release of iOS 8 and the new iPhones there are ALOT of factors to take into account when developing for iPhone and even iPad devices (Resolution, Screen size, etc.).
The first problem I ran into with Xcode 6 is you can't create a empty project anymore. The closest option is a single view application. I found the following answer here.
Now it seems that apple is really pushing auto-layout, the use of the size classes and the use of storyboards and Interface builder. Is there any way to support the native resolutions of the iPhone 5, 6 and 6 plus and do this programmatically? The only option I can see is defining the frame of each UI element for each device which will lead to a ton of code.
Auto layout IS programmatic. Apple has given the necessary API's to handle size classes entirely in code if you don't want to use interface builder or storyboards and there has always been ways of adding constraints in code too.
You might think IB is a silly tool for noob developers or is only for basic apps and you need more power or whatever your reason, but maybe trying to do every thing yourself in code is a bet you have now lost. Give tools a try.
It's referred to as VFL or Visual Format Language.
VFL Tutorial

storyboard and apple recommendations

im starting a new project now and I would like to build it with nibs and not with storyboard, apple removed the option in xcode 5 to build an app without storyboard, my question is that is there any recommendations by apple that developers should develop with storyboard and other xib files will not be allowed in the future? or its ok and apple will always support nib files without storyboard projects and allow it to be submitted in the future
thanks
Apple certainly seem to be pushing people to use Storyboards, but there's nothing to stop you removing Storyboards from a project and just using Xibs. I only use Storyboards sometimes, occasionally use Xibs, and often write entire apps programmatically (no Xibs or Storyboards at all). There are a number of important use cases which are only possible using Xibs, so they won't be going anywhere any time soon.
The only change Apple made was that project templates always include a Storyboard - but you can still remove it once you've created a new project.

Upgrading an iPad app from 3.2 to 6.1 on Xcode

I am starting to work on iPad application which was created in 2011 for iOS 3.2. Now I would like to upgrade the application to be able to work properly on iOS 6.1 and also add some new features. What are your advices to do these tasks? Main points that I capture so far as:
Add storyboard
Remove xibs
Fix .m/.h missing file errors
Do you know when I add the storyboard if it is going to be updated with my app screens automatically? Or do I have to introduce the screen all the properties one by one?
You'd have to add your screens into the storyboard one-by-one yourself. But you can carry on using XIBs just fine - there's absolutely no reason you have to have a Storyboard, unless there's some specific reason you need it. I generally don't use them very much, even in iOS 7-only apps.

iPhone 3GS iOS 5 support (nibs to storyboards)

I have an iOS project that supports iPhone 3GS and on and requires iOS 5 or later.
This project is using nibs instead of storyboards and is using ivars and properties the "old" way (i.e declaring ivars and the appropriate properties).
I would like to work hard and convert this project to a "new" way, i.e to storyboards and clean up the redundant ivars and the synthesise things). It does use ARC, though.
My question is first: will I still be able to support iPhone 3GS?
And second, is there any convenient way to transform this project to the new-fashioned way besides just manually copying the nibs to storyboards and managing all the IBOutlets and IBActions and so on?
Thanks!
will I still be able to support iPhone 3GS? NO
Apple doc clearly says
Storyboards are supported in iOS 5 and later and are enabled by default for new projects. If your app must run on earlier versions of iOS, though, you cannot use storyboards and should continue to use nib files
Is there any convenient way to transform?
There is no shortcut(single step)to convert an existing application to use storyboards.
Converting to Storyboards

Resources