how to know iphone applicaton template? - iphone

already iphone implemented app running on xcode so how you know, which type of iphone template (view based or window or tab based....)is selected while development?

It doesn't matter. The template is just something to get you started. You can still change your app to be however you like after you've started development.

I don't think it's possible because all that templetes are just conventionalities. However if there is tab bar controller, then you can suppose that this is tab based app.

Related

How to add a TabbarController using phone gap for iPhone App

I am making a iPhone app using phone gap in that I want to add a tab bar Controller either using HTML or by using native components to it. Can anyone suggest to me how to do that.
If you are using phonegap/cordova versions 1.5+ you can create a native tabbar with this plugin: https://github.com/AndiDog/phonegap-ios-tabbar-plugin
Other phonegap/cordova plugins can be found here: https://github.com/phonegap/phonegap-plugins/tree/master/iOS
Here's a tutorial how to implement this: http://zsprawl.com/iOS/2012/03/using-the-native-tabbar-plugin-in-cordova/
This is of course the best approach. Other one would be to use a jQuery Mobile and create a HTML tabbar. This is a harder way because it will take time to style it properly and even then it would not fully act as a native tabbar.

mobile web app - keyboard not appearing

I have a mobile web application, working well on simulator 5.1/6.0, xcode 4.5 for iphone.
But when I test on a real device (3gs, ios 5.1), I get a strange behavior: anywhere I place an input field html element, where I need the user to fill in something, I tap the field, it gains focus (I see the cursor), but the touch-keyboard does not come up and I can't type anything. If I try it on the sim, all is fine, the kb comes up.
I am not sure how to diagnose this... tried googling for some answers, haven't found any :(
any ideas?
thanks...
ok found the issue, seems like the app was not created using the latest Xcode template (it is a legacy app), so I removed the MainWindowxxx.xibs which I don't need, and used the code from a new XCode app template to initialize the app by programmatically creating the main view controller, and setting it as the window's rootViewController. And, of course, call [self.window makeKeyAndVisible]

iPhone - Sending the app to the background

In my app, when it runs for the first time, it shows a UIViewAlert and offers you to see the preferences for the app - and the user has 2 choices - yes or no. If the user hits no the alert fades away and the application continues running. I want to set it in such a way, that if the user hits yes, my app will go to the background, the settings tab of the app will be opened (I added a settings bundle to the app). Is it possible to do such a thing? Thanks!
No, this is not possible. But you can create a settings view in you app and show it instead of trying to open the settings app.
Normally, you do want to encourage users to use your app as long as possible, and making them quit your app yourself is not the best way to achieve that.
No, this isn't possible.
But you could use InAppSettingsKit and modally show a view controller with the settings inside the app.
You can find out more here - http://www.inappsettingskit.com/

Cannot find window-based application on XCode

I am using XCode 4.2 and for some reason I cannot find the template for window-based application. Is there an extra step that I need to take here?
There is no longer a Window-based Application template starting from Xcode 4.2.
You have two other choices of "bare-bones" templates:
View-based Application template, which gives you a view on a storyboard to start with. It is similar to the one found in previous versions, except the view now resides on a storyboard which Xcode 4.2 makes use of.
Empty Application template, but you'll have to manually create and wire up a window nib file if you want to design your application in Interface Builder. It's nothing more than a trivial extra step, though.
If you can't make use of storyboards (e.g. to deploy to iOS 4 and earlier), you most likely need to go with the empty template. For the main window, just make a new Interface Builder file and assign it as your project target's Main Window.
Here are two very useful links:
The first one is a discussion on the Big Nerd Ranch forum where they discuss this issue - that the XCode 4.2 has done away with the Windows-template. They have a Template that you can use to add the "Windows-template" to your XCode installation. I have NOT tried this approach but you can try.
http://forums.bignerdranch.com/viewtopic.php?f=73&t=3336
As you dig through this thread - you will come on another site. This a blog post by Jeroen Trappers - on how to "manually" add the missing elements to an "Empty-application" template to make it "Window-template". I have followed these steps and they worked very well for me. In the process of going through these steps it does help you understand what is going on behind the scenes.Here is the URL to the post:
http://www.trappers.tk/site/2011/06/16/mainwindow-xib/
Window-based Application is now Empty Application. Just gives you an app delegate and a window. You build the rest.

MonoTouch and MVC - hook 2 Views to same Controller

I need to write an app that runs for iPhone and iPad.
The issue I'm running into is how do you setup an iPadView and an iPhoneView to hook to the same controller?
In other words, I don't want to have any duplicate controller code--I should only have to make a different view for each device.
Right now I link up view->controller by choosing "Add->New File->iPhone View with Controller", and this works for one device. But the code in the event handlers I have wired up should not have to be duplicated by going to "Add->New File->iPad View with Controller".
A link to a tutorial may help, I have been doing .Net Windows development for a while but still learning iPhone and MonoTouch.
This link talks about code generation for .xib files:
MonoTouch Doc
Apparently you can just delete your .xib.designer.cs file to turn off the code generation. Is this the right way to do it?
Otherwise I'll mark this as the answer.
Can you not just have a base controller and then inherit from that in both view controllers?