Skip to content

Instantly share code, notes, and snippets.

Font names for family 'Bodoni Ornaments': (
BodoniOrnamentsITCTT
)
Font names for family 'AppleGothic': (
AppleGothic
)
Font names for family 'Gill Sans': (
"GillSans-BoldItalic",
"GillSans-Bold",
GillSans,
(gdb) print (int) [actionSheet firstOtherButtonIndex]
$3 = -1
(gdb) print (int) [actionSheet cancelButtonIndex]
$4 = -1
(gdb) print (int) [actionSheet numberOfButtons]
$5 = 1
(gdb) print (int) buttonIndex
$6 = 0
AppFeedViewController *vc = [[AppFeedViewController alloc] initFromNib];
AppFeedDataController *dataController = [[dataControllerClass alloc] initWithViewController:vc schemaString:schemaStr category:category];
[dataController release];
- (id) initWithBase64EncodedString:(NSString *) string {
NSMutableData *mutableData = nil;
if( string ) {
unsigned long ixtext = 0;
unsigned long lentext = 0;
unsigned char ch = 0;
unsigned char inbuf[3], outbuf[4];
short i = 0, ixinbuf = 0;
BOOL flignore = NO;
- (void)loadNibAndInitializeWithFrame:(CGRect)finalFrame {
NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"AppDisplayView" owner:self options:nil];
UIView *containerView = [nibObjects lastObject];
NSArray *subviewsToAdd = [containerView subviews];
self.frame = containerView.frame;
for (UIView *view in subviewsToAdd) {
[self addSubview:view];
}
+ (AppDisplayView*)loadFromNib {
AppDisplayView *cell = nil;
NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"AppDisplayView" owner:self options:nil];
for (id object in nibObjects) {
if ([object isKindOfClass:self]) {
cell = object;
}
}
return cell;
NSDictionary ("high hierarchy dictionary", represents all countries)
|
|--- NSDictionary ("subdictionaries", represents single country each)
|
|--- name, NSString
|--- currency, NSString
|--- population, NSNumber
|--- etc...
- (void)viewDidLoad {
[super viewDidLoad];
self.webView.backgroundColor = [UIColor clearColor];
NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSString *cssString = @"body { background-color: transparent; max-width: 320px; margin: 0; padding: 0; }";
[cssString writeToFile:[documentsPath stringByAppendingPathComponent:@"cache.css"] atomically:YES encoding:NSUTF8StringEncoding error:NULL];
NSString *youtubeLink = @"http://www.youtube.com/watch?v=nRwRfYDzeqg";
2009-11-21 13:54:00.713 AppAdvice[6164:207] Loading HTML string: <html><body style='background-color: transparent; width: 300px; height: 500px'><div id='ContentDiv'>Content Here</div></body></html>
2009-11-21 13:54:00.772 AppAdvice[6164:207] document.body.offsetHeight/Width: {300, 500}
2009-11-21 13:54:00.772 AppAdvice[6164:207] document.getElementbyId('ContentDiv').offsetHeight/Width: {300, 20}
2009-11-21 13:54:00.772 AppAdvice[6164:207] sizeThatFits: {308, 516}
#ifdef DEBUG
#define debugLog(fmt, ...) NSLog(fmt, ##__VA_ARGS__)
#define debugLogPretty(fmt, ...) NSLog(@"%s (%@:%d)\n%@", \
__PRETTY_FUNCTION__, \
[[NSString stringWithUTF8String:__FILE__] lastPathComponent], \
__LINE__, \
[NSString stringWithFormat:(fmt), ##__VA_ARGS__])
#else
#define debugLog(fmt, ...)
#define debugLogPretty(fmt, ...)