Showing posts with label iphone. Show all posts
Showing posts with label iphone. Show all posts

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 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