I have NSMutableDictionary object say obj. When I write it to the disk using
[obj writeToFile:filename atomically:YES] , the file does not get written to the disk. But the same set of statements work for a smaller mutable dictionary.
The first obj is (nonatomic, retain) property object of a class. The second smaller obj is a temporary ...
The below code behaves as expected however the compiler keeps telling me this:
warning: 'StatusViewController' may not respond to '-beginLoadingThreadData'
How do I get rid of that warning and most important why xcode believes that is the case?
here is my code:
[self beginLoadingThreadData]; // called in the loadDidView block
- (void...
I'm working on an iphone application and having some trouble with memory leaks. I've read some docs about garbage collection that it make it sound simple but I must be missing something. I've got a viewController that needs access to an array which may need to repopulated from time to time. Here is a simplified version of what I have:...
I have submitted my app to the App Store, and Apple says:
At this time, XYZ APP cannot be posted to the App Store because it is crashing on iPhone 3G running iPhone OS 3.1 and iPod touch running iPhone OS 3.1.1 and Mac OS X 10.5.8 whenever a user attempts to add a reminder from their Contacts. There are two ways to reproduce this issue...
I know that I am for responsible for this in the code, but in a object-oriented and MVC sense, who should really load the model. I have a model for representing RSS feeds that is being loaded from a url. The model is really thin and the controller manages downloading and parsing of the XML and then passes it on to the model. Is it better...
I am confused at this setting (Project -> Edit Active Target).
The Search Paths can differ based on the SDK setting (simulator vs device).
But if I provide both simulator and device paths, for lets say the Frameworks path, then i get linker errors. But it seems if I only provide the proper path for whichever SDK i have selected, then it...
You can easily play sounds and record sounds using the high level AVAudioPlayer. And you can play sounds using the same framework, while the iPhone screen is locked. Can you record sounds at that time?
...
I'm developing on the current 3.1 SDK, but I'd like my app to support all versions of the iPhone 2.2.1 onwards. I don't have a copy of the older SDKs around anymore and I can't find them on Apple's site. (We've always been at war with Eastasia.) Is there still a way to get it from the iPhone Dev Center?
...
I want to display current time in my iPhone app using my own custom graphics. What's the most efficient way to get the hours, minutes and seconds info? I thought about using NSDateFormatter to get each part but this seems to be too CPU intensive.
...
I am trying to add facility of asynchronous transmission in my project.
I want following in my application.
A table view should load data through web service ( I can do )
Each cell must have an image ( I can do )
But the problem is up to now I was using synchronous transmission.
i.e all data is loaded & then displayed including imag...
I am using webservices.I am sending request from the iphone and fetch the data.I am using http request.But i want to use ASIhttprequest so how it possible?
...
Hi.
I need the date as a string but not the time and it has to be localized.
So for example USA should be Sep 25 2009 but for New Zealand it would be 25 Sep 2009.
I can get the date into a string by specifying the format "MMM dd YYYY" but It's not localized.
Any ideas?
...
I am trying to work on application in which images should be loaded asynchronously.
Are there any examples related this?
I tried pokeb-asi to understand asynchronous transmission, and it works within that application fine.
But I want to know how to do it from scratch
I am facing following problems.
I don't know the exact way to do ...
I'm using NSKeyedArchiver to write out an NSDictionary of my app's data to the filesystem.
NSMutableData *data = [[NSMutableData alloc] init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[archiver encodeObject:myAppsDictionary forKey:kDataKey];
[archiver finishEncoding];
BOOL success = [dat...
I'm trying to add the ability to send an email from my iPhone app, and step one appears to be to add the MessageUI Framework to my project and I it doesn't appear in my list of existing Frameworks. There is something called Message Framework. Is that it? Has Apple renamed it?
I did download the MailComposer sample and I can see that ...
I'd like to add additional behavior to a class derives from NSManagedObject and there are 4 distinct (for now) groups of behaviors. I don't need my decorator class to be persisted with CoreData -- it's purely for adding run-time behavior.
However, if I try to apply the standard Decorator pattern, I can't call '[super init]', which make...
In my specific case, I'm writing an iPhone application. I've seen widgets you can place on your website that users can click on to become a fan of your page, but I can't find anywhere in the api or documentation, a way that you can facilitate "becoming a fan" through an application. Has anyone else had success with this? I've spent ab...
I'm having trouble sorting an NSNumber using NSSortDescriptor. For whatever reason it won't sort into the correct order. What am I doing wrong?
- (NSNumber *)sortNumber {
NSNumber *sum = [NSNumber numberWithFloat:([self.capacity floatValue] / [self.availability floatValue])];
return sum;
}
It is defined as an Int32 in the xcdataMode...
Hello,
My iPhone app is tab bar-based, but I would like to fire an action which switches out the tab bar controller view completely and replaces everything in the window with a view from a different XIB file. I would guess this has to be done in the application delegate (since this is the "chief" class), but I don't know the right way t...
I have a C++ class that I'm using from my Objective-C++ controller in my iPhone app. The C++ class does some calculations on some data, returns a result, and then is done -- but it leaks like crazy. I'm wondering if I can somehow make use of Memory Zones (aka malloc zones aka allocWithZone) to solve this. My idea is to allocate the ObjC+...