Orientation in iPhone? - iphone-sdk-4.1

In my application, I use Orientation, I have to change the size of the controls according to the orientation. I have used a flag and according to that flag I change the size of the controls. But my doubt is, will this orientation affect every time, when user rotates the phone?

I think, better you use
view.autoresizingMask instead of changing the view sizes wrt orientation. Otherwise, it will change the size, but still, the orientation-size code will be called again n again.

Related

Excel has doubled the size of all control on a form and cannot go back to normal

I have two monitors, one is 2k, the other 4k and both running on recommended windows scaling (125%, 150%).
I have a spreadsheet with two forms. I have just edited one form on my larger screen and after saving it has almost doubled the size of everything, as shown below is one section from a form I have updated, the other untouched from the same project.
When I copy/paste controls from one to the other, it doubles/halves in size, so something in the form has set scaling to be wrong.
The font and sizes are both exactly the same, zoom is normal at 100 and there are no other options I can see that affect scaling. I literally edited then saved and it just broke.
I know Excel completely knacks up when you use different monitors, but to date my forms have been ok.
Any idea how to get the size back to normal. I've even reset my monitors to both be 2k but it just won't fix anything unless i do something daft like set zoom to 50%.
thanks. This is latest Excel from 365.
I ran into the same issue today, having the VBA editor on a 4k screen with scaling and a 2k screen as primary. Every time a previewed the form, the size kept on (roughly) doubling. Also Office 365, so basically the latest version...
Anyways, I was able to revert the effect by changing the zoom property of the form (I used 50 but I assume it does not matter) and then resizing the form itself. After resizing, the zoom was applied and after setting zoom back to 100 the original size was restored.
Hopefully this helps anyone facing the same issue.

Make windows app fit to screen size instead of static size

I'm working on a windows app in order to learn how to make them in general, and one issue I'm continuously having is the fact that when I go test it, the controls only take up a portion of the screen because they are sized to fit a smaller screen. How can I make them fit for all screens? If I need to provide screenshots to illustrate this point I can.. using forms this was accomplished via docking, but the apps don't seem to have that same capability.
I assume that by "windows app" you mean a Windows Runtime app, probably in Xaml.
You can get dock-like behavior by using the VerticalAlignment and HorizontalAlignment properties on your FrameworkElement (including Controls). This allows forcing the control to the left, right, top, bottom, or stretching to fill the area it is in.
Combine this with flexible layout controls such as Grids. A top level Grid will fill the screen and can contain rows and columns with relative sizes. This allows the page layout to shrink or grow to cover a fairly wide range of sizes with a single layout.
For larger changes (such as switching between portrait and landscape aspect ratios, or to support a skinny snapped window) you can use VisualStates to either move the controls or to switch between different sets of controls. If the controls are data bound then either set will work automatically with the underlying data.
MSDN has some good documentation on these concepts at Guidelines for supporting multiple screen sizes and Quickstart: Designing apps for different window sizes

MKMapView: any way to tell max/min visibleRect (zoom level)?

Is there a constant or method for determining the maximum and minimum zoom level or visible rect of MKMapView? I'm looking even for a proxy solution such as getting a "visibleRectForRect:" method perhaps. The goal is to know when a map is "fully zoomed in" (etc) and change the display settings of related UI accordingly.
Given that you can calculate the zoomLevel (http://stackoverflow.com/questions/4359424/check-whether-zoom-level-changed), we can reasonably-safely assume that the zoom level is bracketed between 1 and 21 (not future-proofed but certainly constant for some years now).
Thus, check the zoom level and use whatever threshold is "max" for your app. In my tests I could never get the map to go beyond 3-19, so I use that.

How can I got a point's GPS position when select it on the static map

Firstly,I use google static map API to get the image to display on html/wml.
And then, I want to get the point's GPS position where user pressed on the image.
Is there some way to get the GPS position if I got the co-ordinates on the image?
The short answer is probably not. You can't be sure exactly what the static map's dimensions are (the server might change the location slightly to fit things better, etc.). If you're just asking for a map by center and zoom then you stand a slightly better chance, but it will still be tricky.
If you're trying to add dynamic behaviour to a static map, have you considered instead the Maps JavaScript API? Finding the coordinates of where a user clicks is trivial there. (Also, you can disable the zooming, panning, controls, etc. if you want so that it still feels like it's static).

How to use maximum space available with qooxdoo

Hi
I'm using qooxdoo all the way in my app.
And i want to now, what do i need to do to have a widget using the maximum space available.
The thing i want is to have a widget on the left side. This one should thake just enought space to be normal. And a second widget wich will grow enought to consume all the remaining space on the right side.
You can just rely on qooxdoo's layouting system to do the resizing for you.
The edge and flex layout properties are what make the magic happen.
If your follow this link
http://qooxdoo.678.n2.nabble.com/qx-ui-root-td5886017.html
you'll have your answer

Resources