Mobile Safari bug on fixed positioned button after scrollTop programmatically changed…?

We also encountered this bug on 2 different iPad applications, for us the best fix was to temporarily remove the fixed position from the fixed element once the animated scroll had finished, then use window.scroll with the vertical value we’d just performed the animated scroll to, then finally re-apply the position fixed style. It does … Read more

How to insert a character into a NSString

You need to use NSMutableString NSMutableString *mu = [NSMutableString stringWithString:dir]; [mu insertString:@” ” atIndex:5]; or you could use those method to split your string : – substringFromIndex: – substringWithRange: – substringToIndex: and recombine them after with – stringByAppendingFormat: – stringByAppendingString: – stringByPaddingToLength:withString:startingAtIndex: But that way is more trouble that it’s worth. And since NSString is … Read more

iOS5 show numeric keypad by default without using type=”number” or type=”tel”

Styling the field to contain symbols When it comes to including the symbols within this number field, you can use some walkaround like that: HTML: <span id=”number-container”> <input type=”number” name=”number” id=”number-field” value=”500″ /> <span id=”number-container-symbol”>$</span> </span> CSS: #number-container { position: relative; } #number-container-symbol { left: 5pt; position: absolute; top: 0px; } #number-field { background-color: transparent; … Read more

How to initialize a custom prototype style table cell in iOS 5 storyboards?

This way – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @”Cell”; CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[CustomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } return cell; }

Core Data’s NSPrivateQueueConcurrencyType and sharing objects between threads

When you use NSPrivateQueueConcurrencyType you need to do anything that touches that context or any object belonging to that context inside the -performBlock: method. Your code above is illegal since you’re passing those objects back to the main queue. The new API helps you in solving this, though: You create one context that’s associated with … Read more

Calling Javascript using UIWebView

Simple: You try to execute the JS function from Objective-C before the page even has been loaded. Implement the UIWebView’s delegate method webViewDidFinishLoad: in your UIViewController and in there you call [graphView stringByEvaluatingJavaScriptFromString:@”methodName()”]; to make sure the function gets called after the page has been loaded.

bahis casinocanlı casino siteleritürkçe altyazılı pornocanlı bahis casino