Recent Posts

How to migrate applications for iphone 5 resolution

The new iPhone 5 display has a new aspect ratio and a new resolution (640 x 1136 pixels). To make applications "universal" for both the older displays and the new widescreen aspect ratio follow the following steps: Download and install latest version of Xcode. Set a 4-inch launch image for your app. This is how you get 1136 px screen height (without it, you will get 960 px with black margins on top and bottom). Test your app,...

Applying CSS to an iframe

There are two different things here: the style of the iframe block and the style of the page embedded in the iframe. You can set the style of the iframe block the usual way:<iframe name='iframe1' id="iframe1" src="empty.htm" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe> The style of the page embedded in the iframe must be either set by including it in the...

HTML: Removing spaces between inline-block elements

Given this HTML: <p> <span> Foo </span> <span> Bar </span> </p> and this CSS: span { display:inline-block; width:100px; } as a result, there will be a 4px wide space between the SPAN elements. Demo: http://jsfiddle.net/dGHFV/ I understand why this happens, and I also know that I could get rid of that space by removing the white-space between the SPAN elements in the HTML...

CSS: How to align horizontally one div inside another div

How do I horizontally center a div in a div with CSS (if it's possible at all)? The outer div has 100%: <div id="outer" style="width:100%"> <div id="inner">Foo foo</div> </div> In this example the outter div have 100% width, to align horizontally the inner div we can apply this code in the inner div: #inner { width: 50%; margin: 0 auto; } Of course, you don't have to set the width to 50%....

Android: Unfortunately MyApp has stoped

The Problem Your application quit because an uncaught RuntimeException was thrown. The most common of these is the NullPointerException. How to solve it? Every time an Android application crashes (or any Java application for that matter), a Stack trace is written to the console (in this case, logcat). This...

Angular JS: How to pass variables between controllers

One way to share variables across multiple controllers is to create a service and inject it in any controller where you want to use it. Simple service example: angular.module('myApp', []) .service('sharedProperties', function () { var property = 'First'; return { getProperty: function () { return property; }, setProperty: function(value) { ...

Objective-C: How to make UIText move up when keyboard is visible

With the iPhone SDK: I have a UIView with UITextFields that brings up a keyboard. I need it to be able to: Allow scrolling of the contents of the UIScrollView to see the other text fields once the keyboard is brought up Automatically "jump" (by scrolling up) or shortening I know that I need a UIScrollView. I've tried changing the class of my UIView to a UIScrollView but I'm...