Created
August 9, 2010 00:56
-
-
Save Me1000/514766 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for example purposes | |
@implementation RLHTMLView : CPView | |
{ | |
DOMElement HTMLDOMElement; | |
} | |
- (id)initWithFrame:(CGRect)aRect | |
{ | |
self = [super initWithFrame:aRect]; | |
if (self) | |
{ | |
// since we're talking to the DOM we use straight up javascript | |
HTMLDOMElement = document.createElement("div"); | |
// and we need to set some properties | |
HTMLDOMElement.style.width = "100%"; | |
HTMLDOMElement.style.height = "100%"; | |
// customize it more if you need to... overflow properties perhaps? | |
// _DOMElement is a private ivar of CPView | |
_DOMElement.appendChild(HTMLDOMElement); | |
} | |
return self; | |
} | |
- (void)setObjectValue:(id)aValue | |
{ | |
HTMLDOMElement.innerHTML = aValue; | |
} | |
- (id)objectValue | |
{ | |
return HTMLDOMElement.innerHTML; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment