Thanks for your help. Here I have another question. I get the data through XMLParsing, now I want to store it in iphone's cache, and the XML Fields are updates every 12 hours.how can i check that XML Fields are change or not? and how can I store the data in iphone's cache memory so that evry it does not has to interact with web. Can anyb...
As a newcomer to iPhone development and Objective-C in general over the last few weeks I have come across numerous mentions of 'Toll free bridges' between CF and NS frameworks.
One particular example would be CFStream and NSStream.
Does a resource exists documenting all of these bridges and how to use them ? Is it just as simple as cas...
I want to write an NSOutputStream to a server with apple's sample code:
NSURL *website = [NSURL URLWithString:str_IP];
NSHost *host = [NSHost hostWithName:[website host]];
[NSStream getStreamsToHost:host port:1100 inputStream:nil outputStream:
[oStream retain];
[oStream setDelegate:self];
[oStream scheduleInRunLoop:[NSRunLoop currentRu...
How does one turn the "Simulate Interface" and the "Build and Go in Xcode" menu items into something usable for iPhone development? Right now the Simulate command brings up the Simulator with a black screen and the Build & Go gives a "No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=i386, VALID_ARCHS=armv6)." error. T...
is it possible to set a UILabel's distance between the line, as i had a UILabel contain 3 lines,and linebreakmode is wordwrap
...
Hi
I've read that imageNamed: is bad when trying to initialize images. But then what is the best way? I am using imageWithContentsOfFile: and passing the path of an image in my resources folder
[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:imageName ofType:@"jpg"]
This call is made some 30 times in a for loo...
How do you get the keyboard (for editing a UITextField) to come up in the correct orientation if you are in Landscape mode?
I'm doing a game in openGL in landscape mode.
I add a UITextField when it's time for the user to enter their name for a high score. I can rotate the UITextField (with a CGAffineTransformMakeRotation thanks) but ...
I have an application that has a UITableView. This UITableView is populated by an NSMutableArray being held (as a property) in the appDelegate. You can think of this as an email window. It lists messages in a subclassed UITableViewCell. When a new message appears, I have all the code done which downloads the message, adds the data to the...
I have UIScrollView which has subviews (pictures) added do it. each time a user touches the a picture in the scrollview, it toggles a checkmark ontop of it.
NSMutableIndexSet *picturesArray; <- declared in .h
(void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event {
if (!self.dragging) {
[self.nextResponder touchesEnded: ...
I wrote this function in a Helper class for reading a table from my database, and returning it to my controller.
On my viewdidload, i cache this result into a class variable (retain property set) and trying to use that inside a picker view control's delegate method. (titleForRow)
Somehow, I get a EXC_BAD_ACCESS when I try to access the...
I'm getting an error when I run any project with the JSON-Framework installed:
Xcode could not locate source file: NSString+SBJSON.m (line: 50)
I assumed this means it can't find the sdk, the strange this is that the project builds and runs up until I make my first JSON call:
NSArray *data = [responseString JSONValue];
The JSON fold...
I have a UITableView populated with a location-based datasource. I'm calling [self updateView]; to manually refresh the view after the location is found which works fine...but for some reason the didSelectRowAtIndexPath method isn't getting called. Any ideas of why it's not working?
Code snippet: http://pastie.org/464300
...
I'm trying to include an image in an email, which is being sent using a mailto: URL in an iPhone app. The image shows up on the sender's mail app, but after being sent, the tag seems to be stripped out entirely. Here's a snippet, which has been escaped by hand:
[mailUrl appendString:@"&body=%3Cimg%20src%3D%22http%3A//stackoverflow.com/c...
I’d like to apply a stylesheet exclusively to the iPhone, without doing browser sniffing (via the user-agent string) on the server or via JavaScript.
I particularly don’t want Internet Explorer to apply the stylesheet. Apple’s suggested code for applying an iPhone-specific stylesheet, i.e.:
<link media="only screen and (max-device-widt...
As my question in the subject above states, what requirements do you typically have to meet in order to say "Ok, I need encodeWithCoder: and initWithCoder: instantiation for this"? Typically you can write object state to NSUserDefaults, so I'm curious when do you experts decide to use one vs the other?
...
I am using one navigation controller in my application. I am having one main view (with main view controller) and few options views. Options views are viewed by navigation controller when a button clicked on main view's toolbar.
Everything works as expected for first time. When I came back to main view from navigation controller and tri...
It seems like all of the Cocoa Touch templates are set up to load a nib.
If I want to start a new project that's going to use a view controller, and load its view(hierarchy) programatically, not from a nib/xib, what are the steps to setting that up or adjusting a template.
I though all I had to do was implement -loadView, but I have t...
Hi,
I'm writing a mapping application that is required to run even when the iphone is locked.
so, in my application's applicationDidFinishLaunching method I call,
application.idleTimerDisabled = YES; and revert it back when application exits.
But there seems to be a lot of issues with this.
When the iPhone is tethered and the app is s...
I have a main view that manually creates a UIViewController (not a UINavigationController) and adds that controller's view as a subview.
The subview then dismisses itself via [self removeFromSuperview]. I understand this releases the view, so that is good, however I now want to get also get rid of the UIViewController I alloc'ed immedia...
Hi
My iPhone app was running fine. I added a component to my xib file (an activity indicator). I have created my own init method and am using the XIB name in the init method. Now I get this error when I do a pushViewController
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loa...