Hi everyone
I have an issue while localizing a game. I followed the steps of localization. I put 2 versions of images, strings into 2 directories which are fr.lproj and English.lproj. It does switch between French and English. But the problem here is sometimes it switch everything, sometimes it just switches a few images, or a few lines...
#import <Foundation/Foundation.h>
int main (int argc, char const *argv[])
{
SampClass *obj=[[SampClass alloc] init];
[obj release];
NSLog(@"%i", [obj retainCount]);
return 0;
}
Why does this give retainCount of 1, when it should be 0
...
Possible Duplicate:
iphone how to check that a string is numeric only
I have one NSString, then i want check the string is number or not.
I mean
NSString *val = @"5555" ;
if(val isNumber ){
return true;
}else{
retun false;
}
How can I do this in Objective C?
...
Hi there guys, It's a bit of time I'm using analytics in my iPhone applications and I find it very useful...but apparently it seems to give me only the ability to track pageviews and events.
I just would like to know if there's a way to track even custom variables defined by me, as web analytics does.
I.e. I'm releasing the new version...
i have a uitableview cell added some labels something like this
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[...
This is for some reason really hard to find and solve. Cannot find any documentation on it.
I've got a non-document based application which I would like to open all specific file types, but I do not want to use NSDocuments but let my code handle the opening of file and processing of it. I've added the CFBundleTypeExtensions and all, sett...
So i'm overriding dealloc method because the object is a composite object made up of one other object.
I originally had this dealloc method:
-(id) dealloc; // Override to release the Rectangle object’s memory
{
[rect release];
[super dealloc];
return self;
}
After looking in the book I saw another answer:
{
[rect rel...
I'm looking to stitch some images together, with the images always being added to the bottom of the previous image.
e.g. I have images A,B and C. I would like them to appear on top of one another like:
A
B
C
What's the best way to do this?
Thanks!
...
I was considering developing an application which would:
1) form part of a suite of similar applications; and
2) allow the user to download additional chargeable content.
I would be extremely grateful if somebody could point me in the direction of any resources where this approach is discussed programatically and practically (i.e. App...
Does anyone know a good example for Paging the views using dates... Calendar Like Paging on the Table View Header? I know it can be done a lot of time management, financial management apps have it. I just need to go on a right direction before cooking something of my own.
Thanks.
...
I'm calling setNeedsDisplayInRect from an NSTimer function every two seconds. This works perfectly, and draws a square in a random position, with a random color. However, in some circumstances I would like to draw a square x number of times in the NSTimer function (using a for loop) - but, after numerous error testing it seems that drawR...
Hello everybody!
I've created a new App and want to test ist in release Version. So I copied the Growl Framework to my ProjectFolder and added into XCode.
Then I copied the new files in the Target to my Project and copied the growl.framework to the new "Copy Files" Framework folder in "Targets". When i debug my Project, its all right, ...
I'm trying to understand an example in the Kochan Obj-C 2.0 book. It looks like this. Basically we have a standard add fraction method:
-(Fraction *)add:(Fraction *) f {
Fraction *result = [[Fraction alloc] init];
int resultNum, resultDenom;
resultNum = nermator *f.denominator + denominator*f.numerator;
resultDenom = denominator *f.de...
Hi,
Somewhere on my code I need to create several windows from a main window, each functioning with a specific configuration but all instances of the same controller object.
I also need to keep a list of open windows, so whenever I open a window I store its instance in a dictionary and when the window is closed I send a notification to...
I have the following UITableView DataSource method:
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index
On some items (i.e. section index titles) I just want to return "nothing", so that the table view won't jump to any section. I tried to return nil, but I get the "R...
My question is similar to this one, but I need further clarification. I often get exceptions during code like this:
NSError* error;
if (![managedObjectContext save:&error]) {
NSLog(@"Failed to save to data store: %@", [error localizedDescription]);
}
However, when I put a breakpoint in objc_exception_throw, I can find out that an ...
Hi guys,
I have an application that loads core data, then calls the XML Web Service to get updated data. I basically want my app, rather than to erase all the data and load everything (including new) to persist, I want it to add only the new stuff onto the existing stack (without duplication).
What's the general consensus strategy for ...
I've created an iTunes like subclass of NSScroller, however if both the horizontal and vertical scrollers are visible in an NSScrollView or NSTableView I'm left with an ugly white square in the lower right corner. Anyone has a clue on where to add my custom drawing to fill that in with something prettier?
...
Hello,
I'm not sure if there is away to do this but it doesnt hurt to ask i'm using regexkitlite to create a iPhone app. Im specifically using the Regex lib to parse some html. My question is in a regular expression such as @"<a href=([^>]*)>([^>]*) - " each match in between the brackets can be placed in an array using
NSString *r...
I initialize an ivar AVAudioPlayer variable, play and the try to release its memory. After the release line, it doesn't set to 0x0. After the nil line it doesn't change to 0x0. Does AVAudioPlayer require something special to release its memory?
audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath: [[NSBun...