http://uihacker.blogspot.com/2009/01/iphone-custom-font-loading-complete.html (must see)
http://www.iphonedevsdk.com/forum/iphone-sdk-development/1285-custom-fonts.html
http://discussions.apple.com/thread.jspa?threadID=1447085&tstart=0
Tuesday, May 26, 2009
Wednesday, May 6, 2009
Sunday, May 3, 2009
Saturday, May 2, 2009
iPhone webkit Related Blogs
Found some blogs on iPhone webkit, while actually looking for something else:
* Web log of Matteo Spinelli
* iPhoneized - Nurturing iPhone friendly web design
* Web log of Matteo Spinelli
* iPhoneized - Nurturing iPhone friendly web design
Thursday, April 30, 2009
Alternative of NSPredicate on iPhone SDK
Use following classes:
The SearchPredicate.h
And the SearchPredicate.m
And here is how to use it with UISearchBar:
Notice that I was using NSPredicate (sp) with filteredArrayUsingPredicate method of NSMuteableArray before. However as I have not implemented that method for our new class yet (you can do this, I guess using categories etc., and post back in comments) I have commented it and using a for loop and evaluateWithObject on each object of NSMuteableArray to have the same effect.
The SearchPredicate.h
// SearchPredicate.h
//
// Created by Yasir Ibrahim on 24/12/08.
#import <UIKit/UIKit.h>
@interface SearchPredicate : NSObject {
NSString* searchTerm;
}
@property (nonatomic, retain) NSString* searchTerm;
- (BOOL)evaluateWithObject:(id)object;
@end
And the SearchPredicate.m
// SearchPredicate.m
// Created by Yasir Ibrahim on 24/12/08.
#import "SearchPredicate.h"
@implementation SearchPredicate
@synthesize searchTerm;
- (BOOL)evaluateWithObject:(id)object
{
searchTerm = [searchTerm stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if([searchTerm compare:@"*"] == 0 || [searchTerm compare:@""] == 0)
{
return TRUE;
}
NSString* name = [object objectForKey:@"Name"];
if([name length] >= [searchTerm length])
{
NSRange r;
r.length = [searchTerm length];
r.location = 0;
if([name rangeOfString:searchTerm options:NSCaseInsensitiveSearch range:r].location != NSNotFound)
{
return TRUE;
}
else
{
return FALSE;
}
}
else
{
return FALSE;
}
}
@end
And here is how to use it with UISearchBar:
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
{
[mySearchBar resignFirstResponder];
SearchPredicate* sp = [[SearchPredicate alloc] init];
sp.searchTerm = [mySearchBar text];
[pickerItemFilteredList release];
//pickerItemFilteredList = [pickerItemList filteredArrayUsingPredicate:sp];
pickerItemFilteredList = [[NSMutableArray alloc] init];
for(int i=0; i<[pickerItemList count]; i++)
{
if([sp evaluateWithObject:[pickerItemList objectAtIndex:i]])
{
[pickerItemFilteredList addObject:[pickerItemList objectAtIndex:i]];
}
}
[pickerItemFilteredList retain];
[myPickerView reloadComponent:0];
if([pickerItemFilteredList count] == 1)
{
[self showStoreOnMapAtRow:0];
}
}
Notice that I was using NSPredicate (sp) with filteredArrayUsingPredicate method of NSMuteableArray before. However as I have not implemented that method for our new class yet (you can do this, I guess using categories etc., and post back in comments) I have commented it and using a for loop and evaluateWithObject on each object of NSMuteableArray to have the same effect.
Tuesday, April 28, 2009
iPhone Related Business Blogs and Articles, I Just Read
- Indie iPhone developer (owned by John Casasanta and Sophia Teutschler) splits, shops around Where To application
- About FutureTap
- 'Where To' Sales Blog
- FutureTap's Ortwin Gentz Blog About His Buying 'Where To'
- How to Price Your iPhone App out of Existence
- Trouble in the (99-cent) App Store
- Free iPhone Icons
- They're Apps to Make Money - Story of Indie iPhone developers Todd Moore and Keith Shepherd in Washington Post.
Subscribe to:
Posts (Atom)