Question: I have a table with lots of fields in sql server

I need a query to return (in the same row!) the **top last 3 dates** (dates can have large gaps between them)

ie:

```
2012/01/20

2012/01/18

2012/01/12

2012/01/10

2012/01/04

```

Answer: 
You are using Storyboards, so do this is your app delegate 

```
- (UIStoryboard *)grabStoryboard {

UIStoryboard *storyboard;

// detect the height of our screen
int height = [UIScreen mainScreen].bounds.size.height;

if (height == 480) {
    storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    // NSLog(@"Device has a 3.5inch Display.");
} else {
    storyboard = [UIStoryboard storyboardWithName:@"MainRetina" bundle:nil];
    // NSLog(@"Device has a 4inch Display.");
}

return storyboard;

```

}

then in your view did load add this:

```
UIStoryboard *storyboard = [self grabStoryboard];

```

and if you are using iPad add in the size for that and rename your storyboards to that effect
You do not have to, and should not, have different source files for the different platforms. It's quite straightforward to make the 3.5" and 4" iPhone/iPods run from the same storyboard.

You generally DO want a different storyboard for iPad and iPhone. The info tab in your project has spaces for both filenames, and at runtime, the app decides which one to load automatically. 

The rules are changing with iOS 8 however. If this is a new app that's still under development, you might want to think about using the new adaptive UI functions built into iOS 8. Apple has pretty radically changed the way they expect us to handle this stuff, as well as the way we're supposed to handle device rotation (short answer: we're NOT supposed to handle rotation any more. Instead, we get notified about size changes in our views and we're supposed to respond to those. Now there are "size classes" that have states of "regular" and "compact" for each dimension, and you teach your app how to lay itself out in the different combinations of regular and compact sizes. 

Apple has strongly hinted that new device sizes are coming, and that we should adopt the new way of doing things if we want to work correctly with the new devices. It's pretty likely that any new devices will only run iOS 8, and will depend on the new adaptive UI APIs for their UI layouts. I don't know what kind of compatibility they will have with older devices, but it will likely have limitations.