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...
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...)
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">
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
- Copy
- Paste into Address Bar
- Hit Return
4 Reload google.com
(Might not work on google.co.jp)
(Delete Google Cooke to restore)
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?
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 (~)...