Skip to content

Instantly share code, notes, and snippets.

View devongovett's full-sized avatar

Devon Govett devongovett

View GitHub Profile
docs = [CPDictionary dictionary];
var request = [CPURLRequest requestWithURL:"your xml file here!"];
listConnection = [CPURLConnection connectionWithRequest:request delegate:self];
//Connection Delegate Stuff
- (void)connection:(CPURLConnection) aConnection didReceiveData:(CPString)data
{
if (aConnection == listConnection){
var tmp = document.createElement("div");
tmp.innerHTML = data;
webView = [[CPWebView alloc] initWithFrame:CGRectMake(199,0,(CGRectGetWidth(bounds)-199),CGRectGetHeight(bounds))];
[webView setAutoresizingMask: CPViewWidthSizable | CPViewHeightSizable];
[webView loadHTMLString:@"<center><h3>Tmp String</h3></p>"];
[contentView addSubview:webView];
var request = [CPURLRequest requestWithURL:"Your URL Here!"];
listConnection = [CPURLConnection connectionWithRequest:request delegate:self];