Mar
10
2010
Since the new year Apple appears to be making massive improvements to their overall approval times. An update for F1 Insider was approved in about 48 – 72 hours, which we had previously planned for 1 – 2 weeks!
Very good job, I hope it continues.
Now we just need to get some consistency in the approval/rejection guidelines
no comments
| posted in iPhone
Jan
12
2010
Had a frustrating issue this weekend with one of my Xcode projects. I’ve been working with this project for months, without problems, and then suddenly the application won’t install onto the Simulator, and when ran onto the device, I’m greeted with the error: “The application does not have a valid signature.”
Note this is not the same as the more common invalid provisioning profile error. I of course, googled my problem with the error message, but to my surprise found very little of anyone else with the same problem.
After a slow process of elimination, I finally tracked down the problem.
In my application, the directory structure of the resource files is very important. Added folders with the default option in Xcode, adds them as a group, and in the resulting application, all the files are copied into the top directory. This creates problems with you have files which share the same name, in different directories.
The solution to this is of course use reference folders (the second option you can select when added files to the project).
This is all fine and dandy, but what caused my Xcode project to go haywire, was the fact that my reference folder was called “resources”. The solution, was simply to rename the folder to “resource” (or anything else in fact), and after a clean, it works.
Very very strange error, but thankfully with an easy fix, once you know how!
1 comment
| posted in iPhone
Dec
2
2009

PageControl Examples
The UIPageControl has no way of changing the colors of the dots. Kind of annoying right? Well I knocked up a simple solution to customising the look of the UIPageControl.
This class allows you to replace the dots with your own UIImages, with the following 2 properties:
@property (nonatomic, readwrite, retain) UIImage* imageNormal;
@property (nonatomic, readwrite, retain) UIImage* imageCurrent;
It works by replacing the UIImage on the UIImageView containing the original dot.
One word of warning, if Apple change the way the UIPageControl works, this code will most likely break (especially if they change the dots so they are no longer UIImageViews!). However I’d say the only reason this would happen, is if they add their own functionality in to customise the look of it, so it’s probably OK.
Here’s the full code, in all it’s glory. Feel free to use how you see fit (I’m releasing this with no restrictions). It’s not very complicated, but I figured it might be useful to someone!
#import <UIKit/UIKit.h>
@interface OMPageControl : UIPageControl {
UIImage* mImageNormal;
UIImage* mImageCurrent;
}
@property (nonatomic, readwrite, retain) UIImage* imageNormal;
@property (nonatomic, readwrite, retain) UIImage* imageCurrent;
@end
#import "OMPageControl.h"
@interface OMPageControl (Private)
- (void) updateDots;
@end
@implementation OMPageControl
@synthesize imageNormal = mImageNormal;
@synthesize imageCurrent = mImageCurrent;
- (void) dealloc
{
[mImageNormal release], mImageNormal = nil;
[mImageCurrent release], mImageCurrent = nil;
[super dealloc];
}
/** override to update dots */
- (void) setCurrentPage:(NSInteger)currentPage
{
[super setCurrentPage:currentPage];
// update dot views
[self updateDots];
}
/** override to update dots */
- (void) updateCurrentPageDisplay
{
[super updateCurrentPageDisplay];
// update dot views
[self updateDots];
}
/** Override setImageNormal */
- (void) setImageNormal:(UIImage*)image
{
[mImageNormal release];
mImageNormal = [image retain];
// update dot views
[self updateDots];
}
/** Override setImageCurrent */
- (void) setImageCurrent:(UIImage*)image
{
[mImageCurrent release];
mImageCurrent = [image retain];
// update dot views
[self updateDots];
}
#pragma mark - (Private)
- (void) updateDots
{
if(mImageCurrent || mImageNormal)
{
// Get subviews
NSArray* dotViews = self.subviews;
for(int i = 0; i < dotViews.count; ++i)
{
UIImageView* dot = [dotViews objectAtIndex:i];
// Set image
dot.image = (i == self.currentPage) ? mImageCurrent : mImageNormal;
}
}
}
@end
2 comments
| posted in Code Examples, iPhone