Objective C: UITableView: Detect which section header on top

static NSInteger currentTopVisibleSection = -1;

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
    NSIndexPath *topCellPath = [[tableView indexPathsForVisibleRows] objectAtIndex:0];
    if (currentTopVisibleSection != topCellPath.section) {
        currentTopVisibleSection = topCellPath.section;
        NSLog(@"current section on top is %d", currentTopVisibleSection);

    NSString *header = [NSString stringWithFormat:@"Section %d", section];
    return header;

iOS PhoneGap / Cordova – Splash screen control

In Cordova from 1.6 version exist “AutoHideSplashScreen” attribute. If you need show splash screen until you get onDeviceReady event - change value to NO.

function onBodyLoad()
 document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady()

But if you have Cordova version until 1.8 it doesn't work. Use instead navigator object:

 cordova.exec(null, null, "SplashScreen", "hide", []);
 cordova.exec(null, null, "SplashScreen", "show", []);

But for iPad you need add to project two new images:


Mobile Web: Set cursor position to the end of a text field.

If you want to place the cursor at the end of the text box, simply add the following code :
elm.addEventListener("focus", function() {this.value=this.value}, false);
But if your code is designed for mobile browsers, it will not work.
Use this code:
elm.addEventListener("focus", function(){
             if(this.setSelectionRange) {
           var _this = this;
                                    _this.setSelectionRange(9999, 9999);
                                }, 0);
             } else
   }, false);
Why do you want to do this?
If your site has the direction="RTL", then after the text field gets focus, the cursor is placed not at the end of the field and in the beginning.
So you can't add text to the end and erase text by backspace.