objective-c

Objective-C: Getting UIActivity indicators for images in UITableView

Hi guys, I was wondering if anyone knew the best way of getting in a UITableView, where we have images on the left hand side, for the images to appear with UIActivity indicator gradually rather than not being there and appearing all of a sudden. Ive seen that on a few apps and wanted to know how to do it. ...

NSURL Authentication when server does not present a challenge

I am in a situation where I need to send authentication (basic HTTP Authentication) to a server but the server does not send me a challenge first. This has been tracked down to be a duplicate of the wget switch --auth-no-challenge. My problem is, I do not see any way to get NSURL to do this. I have implemented basic authentication in ...

How can I prevent myself from accidentally using an NSNumber's pointer when I want its intValue?

One feature of Java that I really like is autoboxing, in which the compiler automatically converts between primitives and their wrapper classes. I'm writing a Core Data application in Objective-C/Cocoa, and I'm finding it frustrating to deal with my integer attributes programmatically. Here's why: //img is a managed object that I have ...

Animate UITableViewCell height on selection

Hello, I've been doing a lot of Googling to try to figure out the correct way of doing this, and so far I am at a loss. I have subclassed UITableViewCell with my own view and I am trying to animate the height of a UITableViewCell to expand when it is selected, and to contract when it is selected again. This table has the potential to ...

Extracting the index of an Xcode array

The following line works fine in the NSLog: NSLog(@"Selected Number: %@. Index of selected number: %i", [arrayNo objectAtIndex:row], row); but I would like to make the index assigned to an integer variable: int num = ([arrayNo objectAtIndex:row], row); the line above produces an error. What I am doing wrong? ...

Calling the same Viewcontroller file from within the file itself.

The following segment of code opens a new page "ScreenA" with a animation motion: ScreenA *Acca = [ScreenA alloc]; [UIView beginAnimations:@"flipping view" context:nil]; [UIView setAnimationDuration:1]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationTransition:UIViewAnimationTra...

building cocoa project with maven

i have a cocoa project and i'd like to build it with maven. is there any maven plugin for building objective-c code? ...

Parsing and Writing XML in MAC 10.3.9 Cocoa?

Hi, What is the Best way i can do Parsing or Writing into XML using cocoa for mac10.3.9.? Im mentioning the version of OS specifically because, i read in the documentation like, Mac 10.3.9 sdk does not support NSXML class.? I Found an OpenSource libaray (libxml), is it the only library i can use???? Please give me some suggestion regar...

how add the action sheet in the cell of table view.

I want to add the action sheet in cell of table view, i want when i click on the cell of table view the action sheet should come and after i click on the the option in action sheet, i want to go to the next view. ...

how to connect to yahoo messenger through yahoo iPhone application?

Hi All, I'm trying to develop an application in iPhone which will connect to various Instant Messenger and currently working to connect to yahoo messenger. Can anyone help me to find any api or source which will be helpful for me. Thanks in Adv. ...

How to Slide TextView in iphone?

Hi everybody, Can Anyone tell me how to slide textview in iphone in the same manner as we do with images. I am developing an application in which I want to side the TextView. I have 5 TextViews. Can anyone help me with this..... Thanx in advance... ...

How to rotate text drawn by Quartz on iPhone

I want to draw some texts using Quartz. Now the app draws , but I want it to show as "0123456789". Is there any way to show its normal orientation? Here is my code: //set image view drawImage = [[UIImageView alloc] initWithImage:nil]; drawImage.frame = self.view.frame; [self.view addSubview:drawImage]; UIGraphicsBeginImageCont...

read single line from text file in objective-C

Hi, I want to read a text file in Objective-C till a specified delimiter For eg:if this is my .txt input file , @abc = name1$ @xyz = name2$ i want to read abc and assign it in the string variable key,and read name1 till $ and assign it to variable value for eg:expected output key = abc value= name1 key = xyz value= name2 Kindly...

iphone, objective c, xcode

Hi, I defined a UIView "RowOfThree" inwhich there are 3 labels. i also defined a UIView "Table" inwhich there are numer of objects of type "Row". the following code is in a method within object "Table": RowOfThree *rowOfThree = [[RowOfThree alloc] init]; [self addSubview:rowOfThree]; for some reason it doesn't add the view. i tried def...

Should I create a own .h file for my protocol and are there naming conventions for them?

When I create a protocol, I was used to put it right into the .h from a class that this protocol belongs to. But what when I want a pretty "general" protocol that a lot of classes might use? Would I make a .h file for this protocol only? And if so, are there special naming conventions to distinguish it from a class header file? ...

How to "PERFORM" or call something, repeatedly?

If I have something I want to do repeatedly in an Xcode iPhone app, how do I set it up and call it? For example, if I wanted to do this simple line lots of times from lots of different places in an app: label1.text = @"Hello"; And then what if I wanted to call or perform it from lots of different apps: how would I convert it into my o...

Creating the Phone App's in-call view in iPhone

Hello guys, I'm trying to create this sort of "pop up action sheet" view similar to the in-call view in iPhone's phone app. I believe this is a custom view, since I can't seem to find this in any apple references. But somehow the Google app and Discover app both have this view and look awfully similar (I've attached the images below). ...

is it necessary to give distance filter for acquiring best location?

I am using location manager in my application and i'm getting inaccurate location.I'm using below code for getting location locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; and in didupdatetolocation method i'm using this code. LatitudeData = [[NSString alloc] initWithFormat:@"%f",newLocatio...

Suppressing "'…' is deprecated" when using respondsToSelector

I'm supporting 10.4+ by picking the most-current API at runtime: if ([fileManager respondsToSelector:@selector(removeItemAtPath:error:)]) [fileManager removeItemAtPath:downloadDir error:NULL]; else [fileManager removeFileAtPath:downloadDir handler:nil]; In this case, 10.5 and up will use removeItemAtPath:error: and 10.4 will u...

Creating a Modal Dialog or Window in Cocoa Objective-c?

Hi, Im new to cocoa development. I need to create an modal dialog, which is to loaded from a Nib File and should be displayed on a button click in the main window. Im able to create a custom window in a nib file and was also able to load the custom dialog on button click but it was not a modal dialog.im able to switch back to my main...