201Changing NSMutableString into NSString

NSMutableString s; ... -(void)functionA:(NSString )string { [self.s appendString: string]; }

-(void)functionB:(NSString )string { NSString c = self.s; NSString* c = [NSString stringWithString: self.s]; }

"Returns a string created by copying the characters from another given string."

self.s is a refernce to s, might change over time, stringWithString makes a copy, a "snapshot" of self.s...

195UIWebView, Changing filenames with Javascript

Calling JS from webViewDidFinishLoading, modifying paths to local. Before that all the images had to be stored into the local path.

http://iphoneincubator.com/blog/windows-views/uiwebview-dynamically-modify-html-documents

Interesting direction, but still looking for an elegant way to mix external sites (HTML) with local content (images, scripts...)

192Mobile Safari/UIWebView Supported Meta Tags

MetaTags.html

ConfiguringWebApplications.html

<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="none"> <meta name = "viewport" content = "width = device-width"> <meta name = "viewport" content = "initial-scale = 1.0, user-scalable = no"> <link rel="apple-touch-icon" href="/custom_icon.png"/> <link rel="apple-touch-startup-image" href="/startup.png">

188Disable UIWebview vertical bouncing

id scrollView = [yourWebView.subviews objectAtIndex:0]; if( [scrollView respondsToSelector:@selector(setAllowsRubberBanding:)] ) { [scrollView performSelector:@selector(setAllowsRubberBanding:) withObject:NO]; }

It's not a real UIScrollView, therefore 'id'. And other UIScrollView action don't seem to work....

http://stackoverflow.com/questions/500761/stop-uiwebview-from-bouncing-vertically

184Minimal Google

MinimalGoogle
  1. Copy
  2. Paste into Address Bar
  3. Hit Return 4 Reload google.com

(Might not work on google.co.jp) (Delete Google Cooke to restore)

182jWeb / Max5

Webkit-based jWeb in Max5 when used as a sub-patch needs to be opened once to initalize. Possible workaround? Open and close the window on startup?

175Curling Images at Twitter

curl -F 'image=@test.png;type=image/png' -H 'Expect:' -u username:password http://twitter.com/account/update_profile_background_image.xml

hmm nice.

the logical thing to do.

instead of text messages, send images...

update: turning tiling on. curl -F 'image=@test.png;type=image/png' -F 'tile=true' -H 'Expect:' -u username:password http://twitter.com/account/update_profile_background_image.xml

second -F flag creates second form field.

update: same applies to user profile image curl -F 'image=@icon.png;type=image/png' -H 'Expect:' -u username:password http://twitter.com/account/update_profile_image.xml

update: absolute image paths curl -F 'image=@/Users/x/Desktop/icon.png;type=image/png' -H 'Expect:' -u username:password http://twitter.com/account/update_profile_image.xml

there seems to be a bug in the max shell object, preventing cd to work. it also does not like relative paths (~)...

168Google Translate *New & Improved Bookmarklet

if (page == empty) go to Google Translate else Translate Current Page

164iida calling2 polyphony

162iPhone: Dynamic Table Heights

Nice blog from CIMGF on Dynamic Table Heights. http://www.cimgf.com/2009/09/23/uitableviewcell-dynamic-height/