objective-c

How to parse the second child node from xml page in iphone

I am new to iphone development.I want parse an you-tube XML page and retrieve its contents and display in a RSS feed. my xml page is <entry> <id>xxxxx</id> <title>xxx xxxx xxxx</title> <content>xxxxxxxxxxx</content> <media:group> <media:thumbnail url="http://tiger.jpg"/&gt; </media:group> </entry> To retrieve the content i am using...

Implementing a gauge control with UIKit on the iPhone

For an application I'm working on, I'd like to implement sort of a gauge-like control. The gauge should be of vertical orientation and I'd like to get the effect of a dial with the values printed on it to move vertically so that the current value appears at the center of the gauge. While the part of the dial that is not currently visible...

Application terminated at middle.

Hi Guys, Here My problem is when Im running my build in the device sometimes my application is terminated at middle with displaying the message in the console as: Program received signal: "0". warning: check_safe_call:could not restore current frame Can anyone help why this was happening like this? Anyones's help will be appreci...

from dot notation?

Writing the code below without dot notation, do I have this right? FROM: if(self.yellowViewController.view.superview == nil) { } TO: if([[[self yellowViewController] view] superview] == nil) { } gary ...

Cast an Objective C UITextField value to float

I have a UITextField called txtDiscount It has a value in it: txtDiscount.text == 2.3 //for example I've tried: float test = (NSNumber *)txtDiscount.text; And it compiles, but at runtime breaks down. Unacceptable type of value for attribute: property = ..."; desired type = NSNumber; given type = NSCFString; value = . How can I ...

Why scanf doesn't block the thread for input in this case? Objective-C

Hi, This must be very simple but since coming from Java world I feel a bit in the woods in this case. while (operator != 'E') { NSLog(@"Enter:"); scanf("%lf %c", &value2, &operator); switch (operator) { case 'S': [deskCalc setAccumulator:value2]; break; case 'E': break; case '+': [deskCalc add:value2]; ...

Comparing a UITouch location to UIImageView rectangle

I have the following code to determine if a touch is within an image view in my table cell. However, it doesn't work. I compared the two with CGRectContainsPoint however, it doesn't work. Here is the code: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { // Declare the touch and get it's location UITouch ...

How to navigate from UIWindow To UIView

I have an iphone application which is having a UIWindow. I want to add more UIViews to that. I tried this. SettingsViewController *viewctrl = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:nil]; [self.navigationController pushViewController:viewctrl animated:YES]; [viewctrl release]; But it didnt work...

How to limit the xml parsing in iphone

I am new to iphone development .I want parse an image url from a xml file and display it in a RSS feed.There are three image url but i want to retrieve only one url and display it. <entry> <id>xxxxx</id> <title>xxx xxxx xxxx</title> <content>xxxxxxxxxxx</content> <media:group> <media:thumbnail url="http://tiger.jpg"/&gt; <media:thumbnai...

UIWebView Error in iPhone

Hi All, I am getting this error in webview while loading this url : http://www.thumbzine.com/rssfeed.php?vol=104 "Error Domain=WebKitErrorDomain Code=102 UserInfo=0xde6ce0 "Frame load interrupted"" [webView loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:@"thumbzine.com/rssfeed.php?vol=104"]]]; What is th...

Is there an XCode version of "Override/Implement Method"?

This is one of my favorite eclipse features. Does it exist in xcode? I'm getting tired of cutting and pasting from my header files in to my implementations. ...

Can you see anything wrong in this code?

NSString *path = [[NSBundle mainBundle] pathForResource:[arraySub objectAtIndex:indexPathHere.row] ofType:@"mp3"]; NSURL *file = [[NSURL alloc] initFileURLWithPath:path]; AVAudioPlayer *myPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:file error:nil]; self.player = myPlayer; [player prepareToPlay]; [player setDelegate:self]; [self...

Help needed Using C File In Project, iPhone

Hello all, I am new to all this, but here goes: There is an apple file that I would like to use parts of for my app. It is called BatteryTimeRemaining.c. http://www.opensource.apple.com/source/PowerManagement/PowerManagement-211/pmconfigd/BatteryTimeRemaining.c I want to be able to use some of the calculations in it, the problem bein...

Missing Selector from Obj-c Three20 Library Catalog

I'm using http://github.com/facebook/three20 in my iPhone application. I've followed the instructions to include the framework in my project. I've verified it twice now (at the recommendations of people on the google group and IRC). I get the following error when some of the Three20 code attempts to use a Cataloged selector on the UIView...

Find out if AVAudioPlayer finished playing inside a function

How can you find out if a AVAudioPlayer finished playing a sound inside of a function? ...

NSXMLParser foundCharacters method did not parse the elements without end tags

I am new to iphone development.I am parsing a xml page .The xml page concist of many elements inside the parant element < entry > .When parsing inside the NSXMLParser foundCharacters method i gave a print statement to print The "currentElement". It does not print all the elememts between the< entry > and tags.It just print only some 13 ...

How to get a unique identifier for a protocol object

I'm trying to make a dictionary store a map of delegates that correspond to a protocol. I need some consistent key that represent a protocol. For example the following gives me a protocol object Protocol * one = @protocol(SomeProtocolDefinedEarlier); And it responds to [one hash] but the hash isn't the same each time you get a proto...

Add sub Key to plist programmatically

Can anyone help me add children to a plist? I think I want to record an index of rows from the plist and then state which index row to write the key too. I'm not sure how to say if the key will be a string, dictionary or array. The following is code from another question on adding a key to root. NSString *path = @"path/to/some/file"...

How to display the image in a cell?

I am new to iphone development.I want to display image in each cell.I am having only the url of the image in a array.please help me out.Thanks. ...

What is a good Objective-C App to get started on?

I am starting Objective-C with intention to get into extensive iPhone Development. Where are some good places to start? I have purchased 2 books: Programming in Objective-C by Stephen Kochan and Beginning iPhone Development by Dave Mark and Jeff LaMarche The tutorials are good, I would just like to get into my own t...