Hello, my uncle challenged me to make an application in which you can search the file system of a Mac. I've never actually had to do this yet in my programming experience, but I think it would be good to know as well. I have a search field, and a button that says search. Does anybody know how I can make that search the file system, and d...
I want to call a method which returns two values
basically lets say my method is like the below (want to return 2 values)
NSString* myfunc
{
NSString *myString = @"MYDATA";
NSString *myString2 = @"MYDATA2";
return myString;
return myString2;
}
So when i call it, i would use??
NSString* Value1 = [self myfunc:mystr...
hi, i got an error when i put Mac OS X Deployment Target to 10.6.0 :
ld: library not found for -lcrt1.10.6.o
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
failed with exit code 1
but when i use 10.5.0 it works well.
i recently deleted my developper folder and reinstalled xcode it is the main cause.
b...
Okay I've made an array of NSNumber objects that I've stored into an NSMutableArray. When the game loads it's unarchived and retained but all the NSNumber objects are gone. Here's my code:
times = [[NSMutableArray alloc] initWithObjects:[[NSNumber alloc] initWithFloat:time],nil];
[NSKeyedArchiver archiveRootObject:times toFile:@"times"]...
Hi
Can anyone tell me if its possible to change the interval of an NSTimer while its firing?
Seems like this should be possible but haven't figured out how...
Basically I'm trying to create a 'deceleration' effect.
...
Is it possible to communicate between Objective-C and JavaScript? Call a JavaScript function from Objective-C. Call Objective-C function from JavaScript? If so how?
...
So I stored an NSMutableArray of NSNumber objects into the file "times.plist" then I load it and retain it on launch and the NSLog shows the correct value, but later the [times count] equals 0. Why are the NSNumbers disappearing?
times = [[NSMutableArray alloc] initWithObjects:[[NSNumber alloc] initWithFloat:time],nil];
...
[times writ...
My project is composed by a PrefPane to set user defaults and a HelperApp that's running in background.
Both are accessing the shared preferences plist file through CFPreferences functions.
Basically the HelperApp is a CFRunLoopSourceRef: when it's triggered by power source events, it reads user defaults from the preferences plist and r...
How is this effect achieved? Code snippets are highly welcome.
This can be seen in Notes app and other apps on the App Store.
It seem that either the buttons on the navigation controller are transparent and show the custom background of the navigation controller or that they themselves have a custom background applied to them. Any idea...
This question is related to this one, but simpler. [I think I may be close to the end of these dumb questions and can get down to serious business :)].
I have a retain property and set to it like this:
UINavigationController *thing = [[UINavigationController alloc] initWithRootViewController:one];
// thing's retain count is one
nav...
I have a method which allocates an object and then releases it at the end. In between, the method calls another method which could possibly raise an exception, and the exception will probably be caught by the method calling my method. If this happens, the object will never get released (or will it?). How should I prevent this from happen...
Hi,
Right now I program exclusively with Objective-C using the Cocoa frameworks to write applications for the Mac OS X and iPhone/iPad platforms. I'm fairly fluent using the Objective-C language as well as the Cocoa and Cocoa Touch frameworks. I also know just enough C to be able to understand ObjC.
One of my projects requires that I ...
Hello
I'm using a new class with nib and tableview. To costumize the TableViewCells i have defined some functions and constant values (#define) and special TableViewCells
- (UITableViewCell*) CreateMultilinesCell :(NSString*)cellIdentifier { ... }
I want to use this costumized cell in other TableViews too.
Is it possible to pack thi...
I have an array of arrays that I want to use KVC on (at least I think I do -- it seems like the most straightforward way) but I can't figure out how to create keypaths for individual array indexes. My array looks like this
NSArray [
NSArray[0, 1, 2, 3],
NSArray[4, 5, 6, 7],
NSArray[8, 9, 10, 11]
]
What I want to do is get the maximum...
Pardon me if this is a "noob" question, I'm overextending myself a bit with this.
I'm trying to compile a library written in C for use in an iPhone app I'm developing. I can't seem to figure out how to do this, and I've been searching and trying things for hours.
I've tried using an External Build System project, and selecting the fold...
I'm trying to make a CCMenuItem that has scaled images. For example, I tried:
CCSprite* normalSprite = [CCSprite spriteWithFile:@"button_play.png"];
CCSprite* selectedSprite = [CCSprite spriteWithFile:@"button_play.png"];
selectedSprite.scale = 1.2;
CCMenuItem menuItem = [CCMenuItemSprite
itemFromNormalSprite:nor...
When creating a UIViewController derived class in objective-C, what goes into the init method, what should go into loadView and what into viewDidLoad - and more importantly why, and what benefit (performance?) does this have?
Also, how does this relate to UIView derived classes where the only option you have is the init method?
I know ...
I have an appllication in which when I click on NSButton of one nib,another nib loaded,and that second nib contains an NSTableView. which I need to load just after second nib loaded.
But I am Not able to do so. If I put that code in awakeFromNib then NSTableView again get initialize. its really a mesh I m not getting...
So,plz help me ...
Hi Guys!
So I've been doing a lot of reading. And I have been able to finally declare an extern MutableArray and access it from different Views. I have two views:
1) Testing View Controller
2) Test2
I declare the array as follows:
TestingViewController.h
extern NSMutableArray *myArray;
#import <UIKit/UIKit.h>
@interface TestingVie...
I have a set of class instances which have a BOOL instance variable called x. When a button is clicked I need x to be set to NO for all instances except the instance related to the button that triggered the method. Kind of like how a radio button works.
It’s easy to set all the instances of the x to variables to NO. I need help dete...