objective-c

NSthreading but still not working with activityprogressview

[progressind startAnimating]; [self performSelectorOnMainThread:@selector(methodgoeshere:) withObject:[NSDictionary dictionaryWithObjectsAndKeys: aURL, @"aURL", aURL2, @"aURL2", nil] waitUntilDone:YES ]; [progressind stopAnimating]; [navigationController pushViewController...

Using NSString stringWithFormat: with a string from NSDictionary

I'm getting an NSString from a dictionary that needs to have a variable integer, something like: "You have %i objects." How do I put the calculated integer value into the string? I would like to do something like NSString *string = [NSString stringWithFormat:[dictionary objectForKey:@"string"] But I don't know how to pass in an arg...

Dictionary popup on iPhone (like iBook)

I am currently displaying text in a uiwebview. However I would like to allow a user to click on a word and register an event. Apple has one is sort of thing with iBook. When you click on a word you can choose to look up the word in a dictionary. How can I do the same thing with Web view? I have thought about making every word a link...

SBFormattedPhoneNumber issue in iOS4.0

I am using the below code in my application which works perfectly in iPhoneOS 3.1.3 but not working in iOS 4.0. Any body affected by using this. NSString *currentPhoneNumber = [[NSUserDefaults standardUserDefaults] objectForKey:@"SBFormattedPhoneNumber"]; ...

Passing objects from AppDelegate.m to View Controller

Hi I have an iphone application in which I am fetching & parsing data in in applicationDidFinishLaunching. Now I want to transfer this fetched data which is in one NSMutableArray to my first view controller to display it there. Whats the best way of doing this... ...

Resume back to my application when call is ended in iphone

Hello friends, I want make a call from my iphone application, when i end the call my application should resume back.How to do this functionaly is there any tutorials regarding this kindly help me friends. Thanks ...

learning objective-c is better for understanding computer architecture

than higher level languages such as Java C#... is this argument valid? I'm new to iPhone development and some people have told me this. ...

Make custom class of NSObject serializable

Hi I want a custom class based on NSObject to be serializable. I have read this (http://stackoverflow.com/questions/2182115/make-a-custom-class-serializable-in-objective-c-iphone) but want to ask some additional Qs. 1) Does NSObject implement NSCoder? 2) I also want to ask if I can serialize an array of some objects of this custom cl...

Random number with modulus in Objective C

I have a very basic random number function which generates a random number from a range; ie: // The random is seeded earlier on in the applicationDidFinishLaunching() function -(NSUInteger)makeRandomNumber:(NSUInteger)minNumber to:(NSUInteger)maxNumber { //NSUInteger i = (NSUInteger)( (random() / (double)RAND_MAX) * y); NSUInteger i...

Strange code in objective-c

Hello guys! I found a part of a code written by someone else. @interface Fly : CCSprite { id var1; id var2; } Then in the .m file - (void) dealloc { [var1 release]; [var2 release]; // don't forget to call "super dealloc" [super dealloc]; } It is written right? I don't think the id type can be released. Maybe the isa variable i...

iPhone Album Art Effect

Hi guys, I'm just wondering here if there is an in-built view for this. I haven't managed to find it, but then I may not be looking in the right places. I'm trying to find the effect used in the Album Art view of Music (or iPod) on the iPod Touch (or iPhone/iPad). The effect that scrolls between multiple album covers, pushing all other...

How to connect to Exchange-2003 form based authentication per objective-c

Hi all, I want to log on on the Exchange 2003 with form based authentication (FBA) via http-request (in objective-c). Idea: 1)to connect with the code below and get 2 cookies from server. 2)to connect to server per WebDav with these cookies There is the code for the first step. But instead of cookies I get the html-code for login-wi...

Calling function in the first view from the other viewcontroller

Hello everyone, I hope that you will succeed in at least a little to clarify me how and what to do, I'm sure I'm wrong, so I really need an expert opinion. I have two viewcontroller together with nibs what I want is to call function that is in first class from another ViewController, the problem is that another viewcontroller manages to ...

Your request could be not completed in itunes

Hello , i got one problem when I send url from itunes it giving request could not be found error I am getting , this is url I am sending , in system browser its open and giving output, but from iphone its not given, http://itunes.apple.com/us/video/hips-dont-lie-feat-wyclef-jean/id205700602?uo please help me, thank you ...

How to call a method of another class

I would like to call the method mymethod of class b, using the method currentMethod of class a. How do I do this? ...

When to use InterfaceBuilder to build views?

Hi Going thru both the extensive online documentation AND the various code samples in the dev center I am perplexed. Apple's recommends to ALWAYS use IB when creating your views, and yet, in many of the code samples, views are created entirely in code (initialized in the loadView method of the viewController). Is there a 'best practice' ...

NSTimeInterval issue

Hii all, i am writting the following code but my application is crashing . I don no why.Actually i want to calculate the speed but app crashes at line no 4 .please explain.debugger says.. Program received signal: “EXC_BAD_ACCESS”. - (void)viewDidLoad { [super viewDidLoad]; NSDate *date = [NSDate date]; initialDate = date...

How can a shape with curved sides be drawn in Objective-C?

In Objective-C, how do I draw a 2D shape similar to the one pictured here? (sorry could not embed image). Thanks! -appleHap ...

How to generate chapter metadata in an M4A file?

Hi, Anybody know how to generate chapter metadata in Mac OS X? (preferably Cocoa). I've tried to create an M4A file by concatenating two AIFF files. The M4A was generated fine but the chapter marks are all gone. Here is my prototype code. Is there anything wrong with it? -(void) generatePodcast { NSLog(@"Generating..."); NS...

how can I get the topmost view at any time in iphone sdk4?

how can I get the topmost view at any time in iphone sdk4? ...