iOS Safari – How to disable overscroll but allow scrollable divs to scroll normally?

This solves the issue when you scroll past the beginning or end of the div var selScrollable=”.scrollable”; // Uses document because document will be topmost level in bubbling $(document).on(‘touchmove’,function(e){ e.preventDefault(); }); // Uses body because jQuery on events are called off of the element they are // added to, so bubbling would not work if … Read more

Not able to type in textfield in iphone simulator using Mac Keyboard?

Found a great solution that worked for me. Open simulator, then find menu Hardware -> Keyboard has three options: iOS uses same layout as OS X : This option disables the Mac keyboard Connect Hardware Keyboard : This option enables Mac keyboard but the keyboard will not show up. Toggle Software keyboard : This option … Read more

Is it possible to use AutoLayout with UITableView’s tableHeaderView?

I asked and answered a similar question here. In summary, I add the header once and use it to find the required height. That height can then be applied to the header, and the header is set a second time to reflect the change. – (void)viewDidLoad { [super viewDidLoad]; self.header = [[SCAMessageView alloc] init]; self.header.titleLabel.text … Read more

javascript scroll event for iPhone/iPad?

The iPhoneOS does capture onscroll events, except not the way you may expect. One-finger panning doesn’t generate any events until the user stops panning—an onscroll event is generated when the page stops moving and redraws—as shown in Figure 6-1. Similarly, scroll with 2 fingers fires onscroll only after you’ve stopped scrolling. The usual way of … Read more

iOS: Access app-info.plist variables in code

Attributes from the info.plist for your project are directly accessible by the following… [[NSBundle mainBundle] objectForInfoDictionaryKey:key_name]; For example to get the version number you might do the following NSString *appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@”CFBundleVersion”]; There is a gotcha in that the version number now has two attributes in the info.plist – but you get the … Read more

How to set the UITableView Section title programmatically (iPhone/iPad)?

Once you have connected your UITableView delegate and datasource to your controller, you could do something like this: ObjC – (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { NSString *sectionName; switch (section) { case 0: sectionName = NSLocalizedString(@”mySectionName”, @”mySectionName”); break; case 1: sectionName = NSLocalizedString(@”myOtherSectionName”, @”myOtherSectionName”); break; // … default: sectionName = @””; break; } return sectionName; } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)