Facing new challenges everyday

Unrar4iOS – A port of unrar to iOS platform

November 15th, 2010

Recently I started a project which must understand the CBR format, for those that doesn’t know, CBR is a comics file format, which consists of several image files archived in RAR archive format.

In order to be able to read CBR archive contents and uncompress them I need to port unrar library to iOS, after some quick research I found an existing work done in this way, it’s pretty old, but gave me some insight about how to start.
(more…)

DZoneGoogle BookmarksFacebookEvernoteLinkedInDeliciousShare

Adding Mask to UITextField

February 19th, 2010

Cocoa Touch is an awesome API, it contains a large set o frameworks that can be used to create fantastic applications for iPhone, iPod Touch and iPad, but if we compare Cocoa Touch with Cocoa API for MacOSX we won’t find some cool features like masking on input controls.
(more…)

DZoneGoogle BookmarksFacebookEvernoteLinkedInDeliciousShare

Returning a textual representation of a object in Objective-C

February 28th, 2009

Today I discovered how objetive-c allows the programmer to generate a textual representation of a object, you can do it by implementing a description method of NSObject protocol.

Please consider the following class interface:

Contact.h

1
2
3
4
5
6
7
8
9
@interface Contact : NSObject {
    NSString *name;
    NSString *address;
}

@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSString *address;

@end

(more…)

DZoneGoogle BookmarksFacebookEvernoteLinkedInDeliciousShare

Objective-C number formatting with NSNumberFormatter

December 11th, 2008

Today I finished an article to a local magazine about mobile development, this article gives a small introduction on iPhone development with iPhone SDK, this article covers the development of a simple application that perform some meansure conversion. One of learned things was how to do number formatting with NSNumberFormatter like we have below:

1
2
3
4
5
6
7
8
NSNumber *result = [NSNumber numberWithFloat: 0.0];

NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[numberFormatter setDecimalSeparator:@","];
[numberFormatter setFormat:@"0.00000;0.00000;-0.00000"];
   
NSString resultText = [[[numberFormatter stringFromNumber:result];

In this example I’m setting the number format to show a float number with 5 decimal positions and using comma as decimal separator since this is the brazilian decimal separator. I could convert and format a NSNumber by just passing it as argument to stringFromNumber method of NSNumberFormatter instance. Not so different from Java, right?

DZoneGoogle BookmarksFacebookEvernoteLinkedInDeliciousShare

My first iPhone application and the next challenges

April 23rd, 2008

Last sunday I finished the development of my first iPhone application, I could do this by using Xcode and Interface Builder, the last beta of iPhone SDK comes with good integration between these two tools, but there are some components missing on Interface Builder, like UIDatePicker and UISlider, I can bypass it for now.
(more…)

DZoneGoogle BookmarksFacebookEvernoteLinkedInDeliciousShare

Visitors Around the World

Polls

How Is My Site?

View Results

Loading ... Loading ...

Categories

Meta

Links

Advertising

hosted by easy2use.net