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);
Programming and other random stuff. Really, I've nothing better to write about? Twittering at @HeadlightApps
Wednesday, November 19, 2008
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
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 :)
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;
}
Friday, August 22, 2008
App Store
We're excited that we now have several programs in the iPhone's App Store.
Our Business tool FTP On The Go, an FTP client.
As well as an hourglass program: iHourglass, both a free houglass with one image, and a premium version that has about 10. (And there are a few more things coming!)
What the App Store really has changed is overnight it created a market for really cheap little software programs. Our Premium iHourglass is $1.99. Until now, there never has been a real way or place to market and sell a program for a dollar or two. As a programmer who does it for a living, there is far more incentive to work on a simple little tool or silly program that might make a little money.
There's a whole new market for something that costs a dollar and is just kinda cool or a little bit useful...the lifespan might not be years like a good Windows/Mac utility can do (GetRight is going strong and is over 11 years old). But if it only takes a few days or evenings to create as the iHourglass and the next one did, it doesn't matter. If it doesn't last long, create something else! (Though we really think that FTP On The Go will have a good long lifespan...people have needed FTP programs for a couple decades now.)
If Microsoft had done a similar thing with the Gadgets in Vista, I bet they'd have attracted a bunch more developers to create them.
Our Business tool FTP On The Go, an FTP client.
As well as an hourglass program: iHourglass, both a free houglass with one image, and a premium version that has about 10. (And there are a few more things coming!)
What the App Store really has changed is overnight it created a market for really cheap little software programs. Our Premium iHourglass is $1.99. Until now, there never has been a real way or place to market and sell a program for a dollar or two. As a programmer who does it for a living, there is far more incentive to work on a simple little tool or silly program that might make a little money.
There's a whole new market for something that costs a dollar and is just kinda cool or a little bit useful...the lifespan might not be years like a good Windows/Mac utility can do (GetRight is going strong and is over 11 years old). But if it only takes a few days or evenings to create as the iHourglass and the next one did, it doesn't matter. If it doesn't last long, create something else! (Though we really think that FTP On The Go will have a good long lifespan...people have needed FTP programs for a couple decades now.)
If Microsoft had done a similar thing with the Gadgets in Vista, I bet they'd have attracted a bunch more developers to create them.
Wednesday, July 23, 2008
SIC 2008
We got back from the Shareware Industry Conference in Boston on Sunday. Another good year. We always come back with either one big idea that pays for the conference, or a bunch of little ones that do the same. This year, it's the bunch of little ones.
We showed off our new secret project to a bunch of people and got some great responses. Good suggestions on pricing, and a lot saying "tell me when it's out so I can buy!" which is always great to hear. (Should be posting soon about just what it is if you weren't there.)
Peter updated the GetRight.com homepage based on things from the critique session, they drew our card out of the hat this year. But overall, they liked our designs and pages. By far the best reviewed site. (Yeah Peter!) They especially the navigation button and buy page layouts.
Speaking of "Buy" pages, we forgot the cards with the coupon on it, so posting it here :) This is a coupon for 50% off GetRight Pro. It expires the end of this month, so if you're interested, do it now.
We have been pretty lucky with the drawings for prizes too, and this year was the best so far. Shawn won an Xbox 360 and Rock Band. Pretty awesome!
Now to just keep going thru the notes we all wrote.
We showed off our new secret project to a bunch of people and got some great responses. Good suggestions on pricing, and a lot saying "tell me when it's out so I can buy!" which is always great to hear. (Should be posting soon about just what it is if you weren't there.)
Peter updated the GetRight.com homepage based on things from the critique session, they drew our card out of the hat this year. But overall, they liked our designs and pages. By far the best reviewed site. (Yeah Peter!) They especially the navigation button and buy page layouts.
Speaking of "Buy" pages, we forgot the cards with the coupon on it, so posting it here :) This is a coupon for 50% off GetRight Pro. It expires the end of this month, so if you're interested, do it now.
We have been pretty lucky with the drawings for prizes too, and this year was the best so far. Shawn won an Xbox 360 and Rock Band. Pretty awesome!
Now to just keep going thru the notes we all wrote.
Monday, June 23, 2008
Apple is smart
So the iPhone 3G is coming, and while it's got some nice additions, it isn't a huge step over the iPhone 1. But that may be really really smart.
- It lets them be cheaper, $199 rather than $399 if they'd thrown in everything. A much more acceptable price. They'll sell a ton more that way.
- It lets just about any application that developers create work on both the old and new models. This one is huge. One stable platform.
- Everything is software, so they didn't need to figure out the next brilliant idea--just get the hardware and tools so some developers can build it.
- And somebody is going to think of that brilliant idea...something people would buy an iPhone for just by itself.
On a very related note, I bought my first Mac; and first Apple computer since I got a Apple IIgs back in high school.
So Apple has not only sold me a iPhone, but also a computer (admitedly, it's the cheap Mac Mini--but it runs the iPhone programming tools just fine.) And my wife is insisting I upgrade the iPhone so she can have the old one :) Gotta love her for that!
Subscribe to:
Posts (Atom)