How to auto adjust the components for Sencha Touch 2 application - sencha-touch-2

am new to Sencha Touch 2 framework. am creating a project using Sencha Architect in that you have the option to select a device to display your views. Devices include ipad, iphone 4 and 5, Blackberry etc etc. Am creating a project as per view in iphone (320 * 480 ). My question is when i view the project in ipad simulator the components of my view screen do not adjust automatically. I want to run my project on iphone,ipad,blackberry or any android phone or tab. How can i achieve this independence so that my components on screen could adjust length, height etc etc properties at their own. Is there any way to do this by using Sencha Architect ?

Depending on your app architecture, you could probably use a fit layout. However, the best would be to implement profiles, take a look at:
http://docs.sencha.com/touch/2.2.1/#!/guide/profiles

Related

Managing an iOS app across different platforms

I have an iOS 5.0 app presently and had a few questions regarding deploying the app across multiple platform and multiple OS upgrades. I would like to know if there is a clean and configurable system that allows me to have one project handle deployment to the iPhone iOS5 and iOS6 and the latest iPad iOS without having ugly selection statements everywhere determining the platform the app is being currently run on. So I would like to know if there is a way to manage the code from a dev prespective so i can support all version/platform specific features of my app depending on what platform/version it is being currently run on (for ex. automatically switching to use the longer dimension background images if the app is being run on an iPhone 5 with iOS 6)
Is there any way to have this functionality?
I am slightly confused with your question, but I'll explain what I know. Xcode already has a way to change your app depending on what Device/iOS Version the user is running. If you use storyboards, then it will automatically resize your app content depending on whether the screen has retina support, and the size of the screen. In addition, you can have a storyboard for iPad, so that when you run the app it will use the iPad version. It also will change the app icons. Just go to the project settings and scroll down until your get to the icons and lunch images.
Now, if you mean you want to change how your app works using the source code directly, then there is no easy to way to manage it. Your best bet is to go with Storyboards, as it makes it very easy to resize content depending on what device your using.

How to position static buttons and iPhone 5

I am working on an app where i have 12 buttons and labels underneath on one of the views. They are placed on the storyboard directly. I want to make sure they will get properly repositioned in iPhone 5. The solution that i tried is just to deselect all the lines in the autosizing for all the buttons. Now when i try it on iphone 5 the buttons get resized. The problem if i stretch the storyboard and move the buttons they get messed up when running on the smaller screen. So i can only position them on the smaller screen and then it seems to work. The app does not rotate. I would like to know if this is a good solution or there is a better solution for this case. I would like for the app to support iOS 5+
Thank you!
If you want layouts to work with varying screen sizes, you should become familiar with the new constraint-based layout scheme in iOS 6. A WWDC video on the subject can be viewed at http://www.youtube.com/watch?v=Dkr9eKxlMAk&feature=player_detailpage.
Essentially, you're going to use the old struts and springs system for pre-iOS 5 and conditionally use the new scheme for iOS 6. (iPhone 5 won't run any iOS version prior to 6.)

Cocoa Touch: iPad table grid layout

I'm trying to build a iPad version of a iPhone application. The application has a section with photos all organized in a album/event. On the iPhone version the albums are listed in a standard UITableView, but for the iPad version I think it should be done differently.
Here is a sample from Apple's Photos App where the albums/events are shown in a grid:
How can I create a similar view in my storyboard? Is it done using a custom TableView?
There is a very good open-source project named "AQGridView" to do custom grids. It can help you. The project is here on github.
I hope it's what you are looking for.

XCode 4: Create iPad Version using autosizing masks

I've just upgraded to XCode 4 Gold and I can't find a way to automatically create the iPad view from an iPhone view (or viceversa).
To be clear, the feature I am looking is the same as in the Interface Builder of XCode 3, there is an option "Create iPhone/iPod touch version using autosizing masks" when you're working on an iPad View, and "Create iPad version using autosizing masks" on iPhone/iPod Touch.
If anybody know if this is possible...
Thanks in advance.
There is still a way to convert xibs to iPad. It is just hard to find:
Select the project in the navigator, then right-click the target and make sure it is set to iPhone -- if set to Universal this process will not work. (You can set it back to universal afterwards)
Right click the target and then select Duplicate.
Choose to Duplicate and Transition to iPad. A group called "Resources-iPad" will be added to your project and will contain the iPad-converted xibs.

How do I programatically get a large iPad window on startup with MonoTouch?

I have the latest Ipad compatible Monotouch library. I have upgraded my projects to use 3.2 SDK and MonoTouch 1.9 Alpha.
The docs say you need to change the Window in your XIB for the large iPad Window. I don't use XIB. I build my interface from code by constructing the object programatically. What should I be doing to get the large iPad style Window?
Nothing (I assume).
[UIScreen mainScreen].bounds (and its equivalent on MonoTouch) will be 768x1024 in iPad mode and 320x480 in iPhone mode. If your windows and views do not have any hard-coded values they should adopt to the new size naturally.
After further investigation, I found that I needed to add an entry into the info.plist file like so:
Information Property List
UIDeviceFamily
item 0 2
Once this is present the dynamic Window class that I create is the full iPad screen size.
I think it is basically telling the system that my app supports that device. Will have to find our more in the docs.