hi all
I'm trying to create an NSService in a Bundle project. I need to add a main and other bits of code to the actual cocoa bundle created for me by xcode.
Is this as simple as just adding an object-c class via the xcode wizard, then adding my main function to that? or is there some other magic way or other steps involved?.
Many tha...
Can anybody point me in the right direction to be able to encrypt a string, returning another string with the encrypted data? (I've been trying with AES256 encryption.) I want to write a method which takes two NSString instances, one being the message to encrypt and the other being a 'passcode' to encrypt it with - I suspect I'd have to ...
Hello,
I'm creating an autorelease pool in a for loop (in method A). At each iteration of the loop, I'm calling another method (method B). Method B returns an autoreleased object to Method A. If I drain the pool within the for loop in Method A, will that release the objects sent from Method B?
Thanks!
...
Can anyone tell me if the NSString instance variable "planetName" needs to be allocated / released by me (as in the example below) or is that done when the class instance is created / allocated?
My understanding is that int and float don't need to be, but not sure about NSString & NSArray ...
@interface PlanetClass : NSObject {
...
Any ideas why the line below would be leaking memory?
cell.imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:person.imageURL]];
within the cellForRowAtIndexPath method:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView d...
I have the following code which works fine...
int testarr[3][3] = {
{1,1,1},
{1,0,1},
{1,1,1}
};
[self testCall: testarr];
Which calls this function:
- (void)testCall: (int[3][3]) arr {
NSLog(@"cell value is %u",arr[1][1]);
}
I need the array to be of variable length - What is the best way to declare the function?
Us...
How can I capture the selection of a NSMenu header with an IBAction method created in connection with interface builder? I am not sure "header" is the right word so see the image below:
Is it possible to create an action for this the way you can with the selection of regular NSMenuItems? I can create the relationship in interface bu...
I have placed the following code in my program
CATransition *animation = [CATransition animation];
[animation setDuration:0.5];
[animation setType:kCATransitionFade];
[animation setSubtype:kCATransitionFromLeft];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
[[th...
I have an Objective-C class that looks something like:
@interface myClass : NSObject
{
NSMutableDictionary *aDict;
}
Its setter method looks like:
- (void) setADict: (NSMutableDictionary *) newDict
{
[aDict release];
[newDict retain];
aDict = newDict;
}
I've created an instance of the object, put data into aDict, an...
I'm trying to restore the state of my multi-tabbed iPhone application. There are more than 5 tabs, each with it's own navigation controller. On applicationDidFinishLaunching, I determine which was the last tab the user was on and set it with
myTabController.selectedIndex = persistedTabIndex;
I then call a function on that tab's root v...
Hi guys, I keep on getting this error "error: expected specifier-qualifier-list for core data code im working with, in the app delegate.
Now when i get this error and about 40 other errors relating to managedobjectcontext etc, i thought maybe the library needs to be imported. Now i havent done this before, but i went to Frameworks group...
Hi,
I am a newbie in iphone developmenst its my second sample code.
I am trying to add subViews to a View and generate events according to the view which is touched. The projects I am experimenting with is a newly created, clean Window-Base application,
I wrote the following code into the one and only viewController's code:
@interface ...
Hi all,
I want to identify the device on which my application is installed.
That means, when I install the app on the iphone, it should tell me the device information.
The information is like, the device is 2G, 3G or 3GS.
Currently I am getting only model, name, systemName, systemVersion of the device.
I want to know the device is 2...
As you can see the view I need to change is the provided view to customize the tabbar order. I want to change the color of the navigation bar (displaying "Konfigurieren" which means "Configure"), I already found out how to change the color of the "More"-Navigation Controller, but not this one. Can anybody help me with that?
...
Hey,
I want to add a click able button to a MKAnnotation as seen in this screenshot of the Maps application:
...
hi,
I'm trying to made a cocoa app that read-write to a .plist file.
I can retrieve informations from the .plist, write into, but when a key (only with strings) is empty, the app don't write to the plist.
here a sample:
-
(IBAction)saveBoot:(id)sender {
NSString *errorDesc;
NSString *bootPath = @"/myplist.plist";
NSMu...
Hello
I want to create an application in which I have to read PDF file which is alreay stored in iphone. How can I read it. I have no idea about it. Please help me for that.
...
I'd like to override a method in an Objective C class that I don't have the source to.
I've looked into it, and it appears that Categories should allow me to do this, but I'd like to use the result of the old method in my new method, using super to get the old methods result.
Whenever I try this though, my method gets called, but "supe...
I was doing some iphone development and I could use the iphone-dev toolchain to build to the ARM platform. Is it possible to build objective-c code to x86?
http://code.google.com/p/iphone-dev/
What should I used to build another toolchain? Possibly with cygwin.
...
I am trying to migrate in core data using the automatic migration. The difference between the two versions is I added an additional attribute a model. When I attempt to add the PersistentStore to the coordinator I get the following exception
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unrecogni...