how to pass local path to NSXMLParser
like this
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:storePath];
where storepath is a local path like this:
/var/mobile/Applications/56EEB906-2B73-493C-9BE7-2732440CDB69/Documents/xml1.php
and my code is like this:
//NSURL *urla = [[NSURL alloc] initWithString:storePa...
I'm having some trouble with colors in interface builder and cocoa. I built out my interface in photoshop, and when i copy the RGB values from photoshop and set my UI elements in interface builder, or through code, the colors are not even close. I've messed around with setting color profiles in photoshop but can't seem to find one that m...
What I want to achieve is a UISearchBar that moves up and covers the UINavBar, and contains a cancel button on the right of it. All goes well, until I use the following line of code:
searchDC = [[[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self] autorelease];
What ends up happening is the UITableVi...
I am working on an iPhone app, and in a particular view I need to load two different entities: One that will populate a UITableView, and another that will populate a UITextView.
Is it possible to fetch both properties using a single NSFetchedResultsController?
Or do I need to use two different NSFetchedResultsController?
Any ideas on...
NSXMLParser allows SAX parsing of either an NSData block or from a URL source.
The problem is that both these methods require the entire XML source to be known before parsing begins.
Suppose I have a stream of XML Data (say a sequence of NSData objects) and I want to process the stream using NSXMLParser or another cocoa class, how can ...
I have a cocoa app with a webkit to show somethink like utf-8 , but when the webkit to show utf8 character, it should show wrong character and I didn't know that , how to set the webkit show utf-8 character in my cocoa app?
...
i have a view in which i have table view and when user taps these cells in tabel view it gets loaded another view ..
like this i have view hierarchy and i need a navigation bar at bottom of my view whatever is the view currently visible in this heirarchy and i need to place 3 buttons on it ...
home,about,visit...
if any suggestions appr...
Hi,
Let's say you have a custom control similar to NSSlider but with support for choosing a range of values, instead of a single value. The obvious choice of properties is minValue, maxValue, leftValue, rightValue, or however you wanna name them.
You'd probably also want to make sure that leftValue and rightValue always lay in between m...
Is it possible to have the iOS and OSX documentation available for offline reading? If so, how?
...
I'm using core animation to transition between different view states in my application. However, I need to find a way to perform different tasks after the animations finish. I understand I can implement a delegate method and use the
- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag;
callback, however there's no ...
I have several NSComboBoxes created in Interface Builder, and one created programmatically.
The NSComboBoxes created in Interface Builder are perfect. I have their Value bound to the Shared User Default Controller, and when their view is opened they are sitting there with the correct value. Importantly, this value is shown as "normal"...
I'm looking are some CrashReporter logs for my Cocoa/MacOSX application and it looks like the reason for the crash is that some cleanup I expect to perform in the [applicationShouldTerminate:] method of the NSApplicationDelete isn't being performed. However, the app is terminating as evidenced by the following trace:
1 libSystem.B.dyl...
I've got a CAReplicatorLayer replicating its sublayer as per expected, but there's a built-in duration to the animation that I want to turn off. In other words I want to see the instantaneous results of replicating the base layer, rather than over the time duration that's implicitly specified by Apple.
Here's the replication code, brack...
Here's my code of generating data
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
[array initWithCapacity:20];
}
- (IBAction) readlog:(id)sender {
for (int i = 0; i < 20; i++) {
NSDictionary *d = [NSDictionary dictionaryWithContentsOfF...
What follows is an initializer method. It creates a Movie structure from a file, with an eye to extracting the raw pixels for processing, as per Apple QA1443. This is then wrapped in a QTMovie – sourceMovie = [QTMovie movieWithQuickTimeMovie: ...] – for convenience.
After initializing such an object, the second method is called, and we ...
How can I determine if the east coast is currently using EST or EDT using the iPhone SDK?
I am aware of the NSTimeZone class and I attempted the following but it did not work, the result is "East coast is NOT on DT" which it currently is. This leads me to believe that isDayLightSavingTime simply checks whether its being passed an ST or ...
I have the following code (both items and itemsCopy are NSMutableArray's):
//DO: populate items w/ 30 elements
[self.itemsCopy addObjectsFromArray:self.items];
//DO: remove all elements in items
Results
Begin Pass 1:
itemsCopy = 0
items = 30
End Pass 1:
itemsCopy = 30
items = 0
Begin Pass 2:
itemsCopy = 0
items = 30
End Pass 2:
it...
Hi all,
Can any body explain me what is the difference among sleep() , usleep() & [NSThread sleepForTimeInterval:] ?
What is the best condition to use these methods ?
...
Hi,
I would like to animate between two states of a view. Say, for example, I have a view with a label and when I change the text of the label an animation renders that change as a page flipping.
Now you can of course do this with a [UIView setAnimationTransition:forView:cache:]:
- (IBAction)nextPage {
[UIView beginAnimation:nil...
Hi all,
I've come across an issue with using a third party library, and am not sure what the common pattern to solve it is.
I'm using the asi-http-request class, which fetches http objects asynchronously using a thread.
In my objects dealloc() method, I do
[request setDelegate:nil];
[request release];
However the delegate is someti...