objective-c

Reachablity may respond sharedReachability

I try to check internet connection and use following: Reachability *reachManager = [Reachability sharedReachability]; Befor I'll add the necessary framework. And I get warning: "Reachablity may respond +sharedReachability". Run app and get crash. Any solution? ...

call method in different from @selector in Objective-C

Hello, How do we call a method which is in classB from @selector tag of classA.?? Can i do it in this way?? [tis_obj authenticate:self action:@selector([classB method]:) accName:@"BOOK" User:@"User"]; Is there a possibility to call a method of different class form@selector tag?? or should the method be always in same...

Where the iPhone store the calendar information?

Hi, everyone, I want to ask a question about the iPhone application. Where does the calendar information stored in the iPhone? Is it by using EKEvent? ...

Releasing UIImage imageNamed

When I use UIImage imagenamed: should I set the variables which hold UIImages to nil before exit? I notice that sometimes when I switch between views which have UIImages, the memory keeps growing and growing with each switch back and forth. ...

Create a clickable image map on iPhone

Hello All, I wanted to create a clickable map for the United States, when user select a state it will be highlighted and display another detailed view.Like the following web application. http://www.usflashmap.com/samples/real-estate-map/index_ext.html I would appreciate any suggestion on how this can be achieved on a native iPhone a...

How to get the NSError message in Iphone sdk?

Hi guys, I am having the method in my view controller as shown below: - (void)parser:(PaymentTermsLibxmlParser *)parser encounteredError:(NSError *)error { NSLog("error occured"); } Here I need to show the Actual error message in the NSError in my alert can any one suggest how to get it. Hope I get Quick response from you guys. ...

Objective-C getting User fullpath

Hi guys, im learning Objective-C with XCode. Im tying to get the User full path directory, im getting "good" return, but without the user full path (/User/Asinox), just im getting NSPathStore2. I was trying with NSHomeDirectoryForUser() and with StringByExpandingTildeInPath and the result was the same (NSPathStore2). Im using XCode 3....

Objective C processor timer

Hi all, I would like to compare the real efficiency of different scripts. I currently use a timer : NSDate *start = [NSDate date]; // Do something NSLog(@"Elapsed : %f",[start timeIntervalSinceNow]); But it is not relevant since it might depend on the OS working in the background, etc... Does something that really measure the p...

setAnimationTransition:forView:cache: objects are "glitching" during transition

I have UIViewAnimationTransitionFlipFromLeft in my application and it displays a new view with a text field and two buttons. On the iPhone, as it's loading the view, the text field will be scrunched up and the text on the buttons off-center until the view has loaded, then after a very small delay, the text field and buttons' centerings w...

Build error 71 on X-Code

Hi Guys, I've been working on a GUI program for a while now, and I just can't get it to compile correctly, I am constantly receiving the following error - Command /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings failed with exit code 71 I've done some searching around to try to find a solution, ...

iPhone 4 image resolution and image size

Hi all, I am totally in confusion. Apple told that in iPhone 4 one can use high resolution image... than the standard one.So i use 2 image([email protected] and image.png)... [email protected] has 50*50 dimension and 72 resolution image.png has 25*25 dimension and 72 resolution than when i run the code UIImage *image = [ UIImage imageNamed:...

multiple parameters in @selector in Objective-C

hello, If this is the method name which has to be called: -(Authenticate_Obj)Authenticate_User:(NSString*)Number:(NSString*)name:(NSString*)password how to call this method from the @selector ?? can i do it in this way?? [tis_obj AuthenticateMobileServer:self action:@selector(AuthenticateUser:::)]; Thank You. ...

Better Understanding Memory Release

I am new to Objective-C and as my first application I am writing I will be starting off with a simple WebKit based browser. So far I have done good and am able to load websites but after a while of usage memory usage tends to get high. I have read the documentation on retain, release, autorelease management and I just had one question. I...

NSTimer selector calling

Can someone explain to me how exactly the NSTimer behavior is? Basically I want to know if there is a way to always have the NSTimer event happen. Event if there is currently something executing. For example, in: NSTimer* testTimer = [NSTimer scheduledTimerWithTimeInterval:.01 target:self selector:@selector(testMethod) userInfo:nil re...

Creating a Swingometer on the iPhone using Core-Animation

Hi there, I'm trying to create a swingometer, a bit like the ones used in golf games, where the user holds a button to start a swing, releases at the apex to determine power, at which point the 'swing' reverses direction, and the user taps again on the way down to set the accuracy. Rather than having a bar that fills up, I would like ...

access a variable of another class via a property

hi all, I have two classes,In classA I create a variable that I need to use in classB , should i use property ? is there anyone to explain me easier ,how to set StringValue of variable in one class to the textfield of another class? thanks ...

How to ignore transformations when drawing an image with drawAsPatternInRect:

I draw a background image in a view with the following code: CGContextRef currentContext = UIGraphicsGetCurrentContext(); CGContextSaveGState(currentContext); UIImage *image = [UIImage imageNamed:@"background.jpg"]; [image drawAsPatternInRect:rect]; CGContextRestoreGState(currentContext); This works well. But when I change the size...

Crash with NSTimer while handling HTTP Connections

Peace , my eXercice is to make the application connect , send and receive data to remote webserver and this is every 10 Secondes so idea goes to work with NSTimer and adding it into a runLoop , but the connection is established only once and then then ( in the next 10 seconds ) the app Crashes . Here is my Code , THANK YOU for HELPING . ...

create timestamp of now as NSNumber in objective-c

Hi everyone, how can I get timestamp as NSNumber? I only need something like this: 1232885280 Thanks ...

how to get data from web server to iphone or ipod

Hi all, I'm quite new in iPhone development and I need to develop an app. I must get mp3 data from a web server, which provides a simple saving the mp3 in my app document or folder and use it in an application, which should also dislpay a table with rows like: song1 song2 song3 But at present I don't know at all how to get this web p...