Tuesday, November 25, 2008

Getting our money's worth.

A couple years ago, we bought a new logo design for GetRight (from glyfx.com; highly recommended.)

It was a much improved version of the basic idea I'd done years before with the arrows around a globe. My versions tended to look good as long as computers did 16 colors :)




We needed a new logo for the FTP On The Go program since the one we'd done was pretty simple and not too fancy. Peter adapted the GetRight logo, adding the burst effect and removing some arrows. It turned out awesome!

Monday, November 24, 2008

Clone wars

I watched the newer Clone Wars movie. If you expect it to be the first extended episode of a TV series for kids, you'll be happy. I'm sure my 10 year old nephew loved it.

But come on: The enemy characters in any number of video games I've played showed far better tactics than the stupid droid army (in this and the other movies). Marching in nice easy-to-hit rows into enemy fire was what lost the British the US revolutionary war.

Friday, November 21, 2008

Q

Just saw the new James Bond movie. Good, but is Q gone?

It used to be, Q would manage to provide just the gadget needed. You could count on the fact that if Bond had a laser watch, something would need to be cut; or if a mini underwater air tank, he'd be trapped underwater before the end of the film.

Now, it's mainly product placement for the newest Sony gadgets. Must be nice owning a movie studio.

Though Technology is to blame a bit; they had to get pretty crazy to have a gadget that wasn't available at Wal-Mart. Invisible cars and silly things like that.

Wednesday, November 19, 2008

Fading Default.png when iPhone app starts

More iPhone code. I wanted to have the startup logo (Default.png) graphic fade into the first screen after the program starts. This is a much nicer transition than just letting the view switch instantly.


1) Add the new image view to the class.

UIImageView *splashView;

And add this selector:
- (void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;


2) at the very bottom of "applicationDidFinishLaunching" add:

splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)];
splashView.image = [UIImage imageNamed:@"Default.png"];
[window addSubview:splashView];
[window bringSubviewToFront:splashView];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:window cache:YES];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:)];
splashView.alpha = 0.0;
[UIView commitAnimations];



3) Add this selector to cleanup the image and save memory.

- (void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
[splashView removeFromSuperview];
[splashView release];
}



4) Awesome bonus bit. Add this below the splashView.alpha = 0.0 line. It adds that extra bit of coolness to the transition.

splashView.frame = CGRectMake(-60, -60, 440, 600);

Signatures

Getting support emails for a dozen years, I've noticed that while most people have just a simple name or name and quote for their email signature, occasionally there's somebody with a LOT more.

Their name, every possible way to contact them, every website they're associated with, even awards. There's probably some deep psychological meaning you could get from it. But I'm too busy to figure what that is.

-Michael

Tuesday, October 21, 2008

iPhone/iPod touch WiFi

Since I'm doing a variety of network programs for iPhones and iPods (FTP OnTheGo, ContactClone) I've got an iPod touch for testing, as well as my iPhone 3G and the older iPhone that's now my wife's. With the network programs, I've been changing settings and noticed a difference in the number of wireless networks they showed.

I did a test sitting at my desk...

The iPhone and iPhone 3G saw 2 wireless networks in the settings, sometimes a third would appear for a few seconds, but would disappear again.

Exactly the same with a first generation iPod touch consistently saw 4 to 5, and a few times as many as 8 wireless networks! The quality was low, so I'd have trouble actually connecting, but was a very surprising difference. I guess the antenna in the iPod is a lot better than the one in the iPhone.

I'm curious how an iPod touch 2nd generation would compare...but not curious enough to buy one yet :)

Monday, October 13, 2008

iPhone Code - Table Header Context Help

Now that the iPhone NDA has been changed, I thought I'd post a bit of code for various things I've done for the iPhone. I wanted to do a contextual help sort of thing for different sections in a grouped table view. This will be in the next version of FTP On The Go and shows some of the features coming if you look closely at the screen :)
Pressing the button pushes a view onto the navigation controller that shows a webpage off our server with the help contents.

I got the graphic for the help button by changing the hue/saturation from an icon purchased from icons-icons.com.
Sorry for bad formatting from the blog stuff.


In the .h file...

#define SETTING_HEADER_FONT_SIZE 16.0
#define SETTING_HEADER_HEIGHT 36.0
#define SETTING_HEADER_ROW_WIDTH 308.0

In the .m file...


In the viewDidLoad, there's this to set the heights.

tableView.sectionHeaderHeight = SETTING_HEADER_HEIGHT;
tableView.sectionFooterHeight = 6;


- (UIView *)tableView:(UITableView *)tableView
viewForHeaderInSection:(NSInteger)section {
UIView *hdrView = [[UIView alloc]
initWithFrame:CGRectMake(0,6, SETTING_HEADER_ROW_WIDTH, SETTING_HEADER_HEIGHT)];
hdrView.backgroundColor = [UIColor clearColor];
UILabel *label;
label = [[UILabel alloc] initWithFrame:CGRectMake(12, 6, SETTING_HEADER_ROW_WIDTH-100, SETTING_HEADER_HEIGHT)];
label.font = [UIFont boldSystemFontOfSize:SETTING_HEADER_FONT_SIZE];
label.textAlignment = UITextAlignmentLeft;
label.highlightedTextColor = [UIColor whiteColor];
label.textColor = [UIColor darkGrayColor];
label.shadowColor = [UIColor whiteColor];
label.shadowOffset = CGSizeMake(0, 1);
label.backgroundColor = [UIColor clearColor];

if (section==0) {
label.text = @"Downloading Files";
} else if (section==1) {
label.text = @"Sharing \"Saved Files\"";
}
[hdrView addSubview:label];

UIButton *button = nil;
if (section==1) {
button = [[UIButton alloc] initWithFrame:CGRectMake(SETTING_HEADER_ROW_WIDTH-32, 2, 32, 32)];
[button addTarget:self action:@selector(clickSharingHelp: forControlEvents:UIControlEventTouchUpInside];
}

if (button!=nil) {
[button setImage:[UIImage imageNamed:@"help32.png"] forState:UIControlStateNormal];
button.showsTouchWhenHighlighted = YES;
[hdrView addSubview:button];
}
return hdrView;
}