Friday, February 19, 2010
kTrivia Geography and ithishome released.
Friday, February 12, 2010
Drawing circle on UIView :iphone
Drawing circle on UIView.
Circle.h
#import
@interface Circle : UIView {
}
@end
#import "Circle.h"
@implementation Circle
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
}
return self;
}
- (void)drawRect:(CGRect)rect {
CGRect leftOval = {10, 160, 70, 70};
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 0.5);
CGContextAddEllipseInRect(context, leftOval);
CGContextFillPath(context);
}
- (void)dealloc {
[super dealloc];
}
@end
Tuesday, February 9, 2010
kcard Magic crosses over 1000 Downloads
Friday, February 5, 2010
Apple Reject my application.
Tuesday, February 2, 2010
How to determine Which model of iphone/ipod used
Include these classes
#include "
#include "sys/sysctl.h"
Use this method for the Determine platform.
#pragma mark -
- (NSString *) platform
{
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
/*
Possible values:
"iPhone1,1" = iPhone 1G
"iPhone1,2" = iPhone 3G
"iPhone2,1" = iPhone 3GS
"iPod1,1" = iPod touch 1G
"iPod2,1" = iPod touch 2G
*/
NSString *platform = [NSString stringWithCString:machine];
free(machine);
return platform;
}