Converting from a Window based application to a view based application in Ipad - ios

I would like to know if it is possible for me to convert from a window based application to a view based appln... The reason is because I had already developed a part of my app but am getting some orientation issues which I was told would be solved only by using a view based application.
I was unable to find online any documentation regarding this..
It would be be great if anyone could help me out in this...

"Window based application" and "view based application" are just two of the templates you can use to start a project, anything you can actually do with one you can do with the other.
In the version of XCode I have handy here, the only difference between the two is that "view based" gives you an empty view controller and hooks it up to be displayed on app startup.

add a view controller subclass to your project, and then create an instance and add its view as the subview of your UIWindow in application:didFinishLaunchingWithOptions:, you've basically done it- anomie
it's the best and easiest thing you can do as of now

Related

Why there are showing Two Storyboards in my every new xcode project?

Whenever I am trying to open a new project xcode always giving two story board and two View controller one DataViewController instead of showing one view controller and one story board .
I am using xcode 7.3.1
my versity hood was an old project of min which has only one view controller but
when i create new project everytime now i get two view controller like alamofire project. Point to be noted that it has started to happen after cocoapods installation and alamofire installation
please If any one knows how to fix it please help.
Are you talking about LaunchScreen.storyboard? If so, that is a special one (that can't be associated with code) that is used to draw something on the screen while your app is loading.
A common thing to do is to draw a version of your start screen with no controls (or all controls disabled) and no data yet (so it looks like it's loading).
Another common thing to do is some kind of splash screen.
You've chosen a wrong template. You need to choose Single View Application while creating your project. That gives you two storyboards and one view controller in Main.storyboard to start with. You have only 2 storyboards like normal. You just two ViewControllers and two ViewController classes. Nothing to worry. Just create a new project and select Single View Application in the beginning when it asks you to choose a template. It'll be fine.

ios- create multiple window app

How to create an application to support multiple windows.
So that user can create new or close window simultaneously in the same app like we can see in browsers.
Any suggestion is appreciated.
as of iOS13 and XCode11 you can create multiple window apps for iPad OS by setting the Enable Multiple Windows property in info.plist to YES.
You don't want to use multiple windows. The app could have multiple windows but this wouldn't give you the effect you want (or would be an abusive way of creating it).
Instead, what you want is a container view controller which manages, in a custom way, a number of child view controllers. Think about how a tab view controller works - you want the same thing, just presented in a different way.
Taks a look at HGPageScrollView for inspiration and reuse.

On an iPad, how to create a left side menu to let the contents displayed at the centre according to the item tapped on the menu

I am very new to iOS development. Currently, I am trying to develop an iPad app, which is used for taking orders in a restaurant. When I am trying to create the UI on an iPad, I want to create a left side menu to let the contents displayed at the centre according to the item tapped on the menu. Which is similar to this: http://www.dhtmlx.com/blog/wp-content/uploads/2011/02/ipad_menu_final.jpg
As I am very new to the iOS development, can anybody tell me where I can learn iOS development step by step. And are they any samples of this kind of app that I can refer to?
Thanks very much!
there are many tutorials for creating split view application as links provided by #PratyushaTerli and otherwise you can use direect way as recommended by #antonio MG and there is another two good links for creating them which are : https://github.com/mikefrederick/MFSideMenu (good demos in it using story board or using xib's ) and you can look on project on github named - mmdrawercontroller.
annother good project is this
As Antonio MG said, the easiest way to do this is with Master/Detail project in Xcode. It uses the UISplitViewController logic of one 'Master' controller which controls the appearance of detail content in the 'Slave' or 'Detail' controller aside.
The sample Xcode project should be enough to make you understand how UISplitViewController and its UISplitViewControllerDelegate work together. Or also checkout this tutorial: http://www.raywenderlich.com/1040/ipad-for-iphone-developers-101-uisplitview-tutorial
Just create a Master/Detail project and you will have the basic structure of that kind of behaviour. The rest is just customising the table and the cells.

Split View inside of a Tab Bar in an iPad Application

When the iPad first came out, I recall that Apple frowned upon the use of a Split View inside of Tab Bar Item View. Whether or not they rejected applications that used this design I don't recall or know anything of.
Is this design still frowned upon by Apple? If you create an application that uses this design will it be rejected by Apple? I know there are third-party API's now that help you write applications that utilize this design pattern which leads me to believe that Apple no longer cares, but I just wanted to be sure about this.
If anyone can shed some light on why Apple frowned upon this design that would be helpful because I don't understand what about this design was an issue for Apple.
I can't find the citation at the moment, but there used to be a section in the HIG that said that you must not do this, and then they changed it to one saying you should try to avoid doing this. So I think you're clear, as long as the design makes sense. Sadly I can't find where that phrase occurred — maybe it was taken out all together.
At any rate, there's nothing in the HIG under either tab bar or split view that says you can't do what you want.
I just stepped over this, too.
This also didn't work in the Interface-Builder prior to 5.1.
But i just tried today and recognized that you can simply add a relationship from a tabbar controller to a splitview inside interface builder (this did not work before).
However, only the detail view shows up when running the app and select the tab containing the splitview.
edit: This seems to work out very easy if you compile for 5.1. There seems to be a change in handling Splitviews.
Just try it out:
In your Storyboard, create a Tabbar Controller
add a Split View Controller
Create a Reference from the Tabbar Controller to the Split View Controller
Now you need to create your Master and Detail Controllers
I am not finished with the implementation yet, but hope this helps.

iOS:Switching between views using UINavigationBarController

First of all, I am using XCode 4.2 and I am not using storyboards. I need to make an application with 2 views.
First view will contain a button and a navigation bar, the button's IBAction should only go to the second view, and from the secondview you should be able to go back to the first view via the Navigationbar.
My problem is the navigation controller / navigation bar, how do I set that up ?
I know that it would be smart using the singleView app and then add a navigation controller, the problem is that I dont know how to set it up in the code.
I have searched for similar problems on the internet, and I keep getting into posts where they use another SDK or using an older xcode etc.
What I do know is how to make the button, actions and delegation.
Anyone out there who is sitting with the one and only tutorial I am missing or can tell me how to do it ?
Thank you
Use the Master-Detail Application template. Ignore the stuff for tables, it has navigation stack implemented in it. By deleting the tables, you should be pretty much left with what you are after.
You should go to http://developer.apple.com/, search for UINavigationController, click on UINavigationController Class Reference, then look at one of the linked sample code projects there.
if you really want to learn how to implement it from scratch (and not depend on the master-detail template), i highly recommend the following resources:
the apple documentation on UINavigationController
the solutions from the big nerd ranch iOS Programming guide (particularly the Homepwner example)
also found this tutorial in a quick google search, but haven't fully vetted it in xcode 4.2 (there will likely be small differences in how you have to go through the steps).

Resources