Dec 14, 2008

Math support...



















With help from Norbert, the matrix is finally made possible, after some guess and luck.

Perhaps it's time that I make it available to Cydia.

Dec 9, 2008

Way to Implement Controller Classes Without ANY .nib Files

The trick by RickMaddy@iphonedevsdk.com is what I was looking for, the way to inherit a Controller class without an Interface Builder, i.e. .nib/.xib files. And samples for the Open Toolchain!

Hope this technique would make my codes more organized and readable. And this just neuturalized another reason for me to buy a Mac.

Dec 6, 2008

Webkit ignores 'alt' text?

OK, I concede safari does recongize alternative text in <img> tag, but only with mouse cursor hovered over, and only in Safari, not Chrome or MobileSafari, where mouse cursor does not even exists. In Firefox/IE, alt text is displayed in the box of the lost image.

Sadly, I can never get the hints by HTML alone on iPhone.

Dec 5, 2008

Math support's just around the corner

OK, i'm just too lazy to convert any LaTeX myself.

It turns out, some are good, some are bad. 

After removing the leading space, more than half of the things are shown, however, I never got through any '\matrix' working :-(

Dec 4, 2008

Shall I digest on-the-fly?

Cocoa on iPhone provides an API for Crypto/Digest with "CommonCrypto/CommonDigest.h".

Perhaps this could be useful for Wiki2touch/Math support.

Dec 1, 2008

Show a view with timer and then disappear

Perhaps it's not the most cleaver way, but seems to work for me.

#import "UIKit/UIKit.h"
#import "Foundation/Foundation.h"
//Note that the lines above apply to my settings of opentoolchain.
@interface aView:UIView
{
NSTimeInterval _interval;
NSInteger _hideCount;
NSTimer _timer;
}
-(void) show;
-(void) hideMe:(id)param;
@end

@implementation aView
-(void) show{
if(_hideCount<0) _hideCount = 0;
_hideCount++;
_timer=[NSTimer scheduledTimerWithTimeInterval:interval target:self selector:@selector(hideMe:) userInfo:nil repeats:NO];
[self setUserInteractionEnabled:YES];
return;
}
-(void) hideMe:(id)param
{
if(_hideCount<=1)
{
//Hide it here
[self removeFromSuperview];
}
_hideCount--;
return;
}
@end