Hi, I have this call to stringwithcontentsofurl:
[NSString stringWithContentsOfURL:url usedEncoding:nil error:nil];
How can I give that a simple timeout?
I don't want to use threads or operation queues (the content of the url is about 100 characters), I just don't want to wait too long when the connection is slow.
...
Are there any issues when using IBAction when it is not actually called from a user's action?
If you have an action like
-(IBAction)sayHello:(id)sender;
You can call it from within your class like:
[self sayHello:@"x"]
The @"x" doesn't do anything, it just fills in for the sender.
You can actually create an IBAction method withou...
Is there a simple way to delete all the annotations on a map without iterating through all the displayed annotations in Objective-c?
...
My question is this: in many free iPhone apps adds which are basically imageViews are buttons. When pressed, they bring you to the iphone App store to buy whichever app was advertised. Can this be tweaked to open a hyperlink in the iphone's safari browser? and if so, how?
...
I have an application that downloads an xml file, parses the file, and creates core data objects while doing so. In the parse code I have a function called 'emptydatacontext' that removes all items from Core Data before creating replacements items from the xml data. This method looks like this:
-(void) emptyDataContext
{
NSFetchRequest...
I followed the tutorial
http://www.neoos.ch/news/46-development/54-uikeyboardtypenumberpad-and-the-missing-return-key
to dismiss the number pad,
this tutorial add the button as sub view to the number pad,
my problem is, in the same view i am using the text field to enter text also,so, how to differentiate the number field, and text f...
When i use GData API in my app for parsing xml,how could i get attributes and it's value?
Wanted a piece of example code.Thanks a lot.
xml:
<playurls><url islive="0" type="3" bit_stream="1">http://vods.netitv.com//dy2/2010/02/08/cf584b76-3579-4b75-a0c8-f7a473d79f8c.mp4
</url><url islive="0" type="3" bit_stream="2">http://vods.net...
hello all,
I am looking for component that can handle a spesific date.
what i am trying to do is to get Astring fron sever that represent date(for example 04-08-2012) in my iphone i want to be able to "work" with this date. such to compare it to another date , check if the date in the past or future and to print it to the app GUI
i tri...
A beginner's question:
If, in your nib, you have the File's Owner linked to the ViewController class, and you also have a NSObject-derived class, how do you communicate between the ViewController class and the NSObject class within code?
For instance, suppose ScientificCalculatorView.xib looks like this
File's Owner (class: Scientifi...
I would like to write a counter that shows how many seconds an app has be running for. (textView) and the counter should be cumulative and starts from where it left off. Im new to iphone sdk.
...
lets say I have aclass
@interface Foo :NSobject
{
NSstring *a;
NSDate *b;
}
Foo *temp;
my question is: when i use [temp retain]
does the counter of the members also retain?
lets say that i got ref of the class from some method and i want to retain the class do i need to retain each member?
...
Hi, i am working on a map application, in that i like to drop the pins (as in Zillow apps) when ever user change the map view. I am using following code code. i am try to load the xml data from server using NSAutoreleasepool to do the xml parsing in the background thread.
(void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL...
I am using core data and am generating classes from my data model.
I implement custom methods in these classes, however when i regenerate i generate over the top so i end up copying and pasting a bit. What i would like to do is split my implementation files ('.m') so i can have one header file with multiple '.m' files. then i can keep m...
This works fine:
NSString *myVariable;
- (IBAction) doFirstAction {
myVariable = @"123456789";
}
- (IBAction) doSecondAction {
NSLog(@"%@",myVariable);
}
However, if I do this (substituting the @"123456789" for some code which returns the same value ie "123456789") I cannot access the value in doSecondAction.
NSString *myVariable;
...
Apparently Apple has changed some term in the agreement again.
From http://www.appleoutsider.com/2010/06/10/hello-lua/
section 3.3.2 is now
Unless otherwise approved by Apple in writing, no interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-i...
Basically, I need to call a method in my AppDelegate from one of my view controller classes.
Currently, I'm doing the following:
myAppDelegate *appDelegate = (myAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate doMethod];
And including the myAppDelegate.h at the top of the .m file of the class:
#import "myAppD...
Hobbyist Cocoa programmer here. Have been looking around all the usual places, but this seems relatively under-explained:
I am writing something a little out of the ordinary. It is much simpler than, but similar to, a desktop publishing app. I want editable text boxes on a canvas, arbitrarily placed.
This is document-based and I’d real...
Hello,
I have tried to include openssl (I try to implement a ssh client) and I've added libssl.dylib to my XCode Project. But I don't know which header I have to include to use it.
Can anyone show me a tutorial how to use libssl in xcode?
thanks
...
I need help. The title says it all. Thanks so much! :)
...
I'm trying to record the contents of the iPhone screen to video , in the app I'm working I want the user to be able to create a little animation but I'm just not sure how to encode the screen contents/animation to video when their finished?
The problem with using something like ffmpeg is that its LGPL which can lead to licensing issues,...