objective-c

How can i loop all nodes in an XML document in objective-c and change their values then save the xml?

Hiya - I am really struggling here - I want to load an XML document in objective-c and loop each node and encrypt the string value of that node. Then encryption bit i have sorted but when i run the following code it just changes the root node and every other node and not the values of the nodes. e.g. - i want to go from: <root> <...

How can I scale the height of a UITextView to fit a changing amount of text?

I created a nib for a specific view I have. The view has a text field that may change height depending on the amount of text in the view's "represented object". For example, a blog post screen would have to handle different amounts of text as blog posts are not the same length and you obviously only want one nib to represent all blog p...

Pass Result of ASIHTTPRequest "requestFinished" Back to Originating Method

I have a method (getAllTeams:) that initiates an HTTP request using the ASIHTTPRequest library. NSURL *httpURL = [[[NSURL alloc] initWithString:@"/api/teams" relativeToURL:webServiceURL] autorelease]; ASIHTTPRequest *request = [[[ASIHTTPRequest alloc] initWithURL:httpURL] autorelease]; [request setDelegate:self]; [request startAsynchr...

How to do a line break for a UITextField?

I am storing text in an SQLite database and one field looks something like this: "blah blah \n\n blah blah" However, when I display the text using a UITextField, my app actually displays the "\n" and doesn't break the line. Anyone know what I am doing wrong? Thanks ...

NSArray: add multiple objects with same value

How can I add multiple objects to my NSArray? Each object will have the same value. Ex. I want the value "SO" added to my array 10 times ...

Why release the NSURLConnection instance in this statement?

I read this in a book. -(IBAction) updateTweets { tweetsView.text = @""; [tweetsData release]; tweetsData = [[NSMutableData alloc] init]; NSURL *url = [NSURL URLWithString:@"http://twitter.com/statuses/public_timeline.xml" ]; NSURLRequest *request = [[NSURLRequest alloc] initWithURL: url]; NSURLConnection *connectio...

NSSortDescriptor for NSFetchRequest sorting unexpectedly

My entity has a property (sortOrder) that is of the type Decimal(NSDecimalNumber) but when I execute a fetch request using that property as a key, I get back results in a seemingly random order. If I output the value of the property I get really strange values until I get it's intValue. Example: The first run produces this result. Th...

Why is there no way to do introspection in Objective C with Objects?

I have seen examples (on here especially) of calling hideous C functions and getting structures back that have to be iterated, replete with reams of underbars. Why can't I do this (pseudo to follow): Money *cost = [[Money alloc] init]; for (Property *property in [[cost class] properties]){ .. } for (Method *method in [[c...

Registering UIRemoteNotificationTypes

Will this be done on every launch of the app? Since it is in the applicationDidFinishLaunching method. Is there a way to do this once and for all? Thanks! ...

Problem with calculating floats

strange situation, when performing the following lines of Code: const float a = 47.848711; const float b = 47.862952; float result = b - a; I get a (NSLog %.10f) result = 0.0142440796. I expected to get 0.0142410000. What's going on? ...

after build and submission I can't run my app on my iPhone

even though I select debug, i get this: a valid provisioning profile for this executable was not found . i can't install it on my phone again. what should I do? ...

Keeping object in memory (iPhone SDK)

I am trying to create a UIImageView called theImageView in the touchesBegan method that I can then then move to a new location in touchesMoved. Currently I am receiving an "undeclared" error in touchesMoved where I set the new location for theImageView. What can I do to keep theImageView in memory between these two methods? EDIT: I am ...

Horizontal page curl in iPhone - I have - But Valid ?

Hello ! Every one. I was googling for applying horizontal page curl in iPhone. I also tried this, but it wasn't appropriate for me (To change orientation & work in different ori.). I tried to google more. Finally I got a link or link . From Where, I could Understand the horizontal page curl. But when I went to code deeply, I found some...

Stop scrolling to top in UIWebView - iPhone

I have placed following javascript in my html file. <script TYPE="text/javascript"> function srk(){ document.ontouchmove = function(e){ e.preventDefault(); } } </script> I am scrolling my webview by following code with some animation. [myWebView stringByEvaluatingJavaScriptFromString:[NSString st...

Is it possible to set image or button at the center of navigationbar in iphone?

Is it possible to set image or button at the center of navigationbar in iphone? ...

Struggling to make sense of some Objective-C code

I'm an Objective-C newbie and am enjoying reading/learning Objective-C in order to do iPhone development but I'm struggling to understand some of the code, especially the code that comes with the UIKit framework. For example, take this line: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSelection:(NSInteger)section { .....

Implement VOIP in iphone and ipad.

Hi, Does anybody is aware of implementing VOIP feature in iphone and ipad. The Things for which i need clarity is, By using which third party library/protocol can i implement this feature? or is der any in built classed available in objective c which i can make use of?? Is there any Apple store accepted iphone application which uses ...

custom Copy Responder in iphone

Hello ! I have a webview in my application. I want to handle when user copies something from web view, my custom method - should be triggered. I have tried following. I have placed following method in myViewCtr.m file -(void)copy:(id)sender{ NSLog(@"hi ! Hello "); } But nothing working - What should I do to implement the same ?...

what I do for show the accessorytype in custom(uilabel) uitableviewcell when cell contentcolor is black in iphone?

what I do for show the accessorytype in custom(uilabel) uitableviewcell when cell contentcolor property is set to be black i want to show whole cell's color is black but when i use cell.accessoryType =[UITableViewCellAccessoryDisclosureIndicator through this i can't reach my target. ...

Is Geo API limited to businesses in US only

Can someone help with the info whether GeoAPI is limited to locate businesses within US only? Looked around in their documentation but could not locate it. The limitation I found was for 20k query per key. But nothing related to businesses location limitation. OR Is there any other API that allows to locate businesses around the world?...