iphone

Cocoa/Iphone dev - target/action mechanism

Hi, I started learning Iphone development. As i'm reading about the cocoa development framework, few principal notions came around and with it a little bit of confusion. I want to make sure I understand things right and to get a little clarification : Delegate - basically the strategy design pattern. I set my class delegate and data so...

wsdl2objc problem

i am trying to use wsdl2objc with this soap webservice.But when am using it in my iphone project , am getting this error. Undefined symbols: ".objc_class_name_ndfdXML", referenced from: literal-pointer@_OBJC@_cls_refs@ndfdXML in HomeViewController.o ld: symbol(s) not found collect2: ld returned 1 exit status Here i used ndfdXM...

cellular network in iphone

Hi All , i have a requirement that to hit the url using pdp_ip0 network i.e.,I need to use cellular data network while wifi is already connected. And So I need to send\receive data over the internet, using cellular data network.so i think first i have to find is there a cellular network connection is there or not. so do you have any idea...

Invalid binary on iOs 4 app submission

I am trying to submit an iOs 4 binary and get "We do not accept applications built with this version of SDK" message. I build with XCode 3.2.3 iPhone 4 GM Seed iPhone 4 based SDK iPhone/iPad as a target family iPhone 3.0 as a target deployment family ...

Core Data - Add Static / Lookup Data

I am creating an application, and am using Core Data as my backend data source. I am wondering how I can manually add entries into a Core Data Entity which can be used to hold static data which will never change throughout the applications lifetime. ...

Is there any way to check if there is any input to the mic or not?

Hi ppl, Is there any way to let's say, user clicks a button, and then he needs to say something to the mic, but only after he finishes to talk to the mic, the app will wait 5 seconds, and then the app will do something. is there any code or example for this? to check if there is an input to the mic or not. thanks in advance! ...

How to parse the Manifest.mbdb file in an iOS 4.0 iTunes Backup

In iOS 4.0 Apple has redesigned the backup process. iTunes used to store a list of filenames associated with backup files in the Manifest.plist file, but in iOS 4.0 it has moved this information to a Manifest.mbdb You can see an example of this file by making a backup with your iOS 4.0 devices and looking in your ~/Library/Applicatio...

How often should I save to Core Data?

I'm working on an application backed by Core Data. Right now, I'm saving the Object Context as and when I add or delete an entity to and from the Context. I'm afraid it will affect the performance, so I was thinking of delaying the save. In fact, I could delay it all the way until the application is gonna terminate. Is it too risky to s...

Can you please tell me about this warning?

I'm getting this exception in [self.navigationcontroller PopViewControllerAnimated:YES]; 2010-06-21 19:12:46.585 IChitMe[31250:207] *** -[NSKeyValueIvarSetter addSubview:]: unrecognized selector sent to instance 0x377010 2010-06-21 19:12:46.593 IChitMe[31250:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentExcepti...

iphone, write csv file in sandbox

Hi, i must write (at start of app) and delete is content (at the end of app) a csv in my sandbox file with a stream of data. For your experience, what's the best way to do this? edit: i'm trying with this: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = ...

Reusing NSMutableString correctly on the iPhone

Using objective-c on the iPhone, what is wrong with this code? Is it leaking memory? Why? How would I do this correctly? NSMutableString *result = [NSMutableString stringWithFormat:@"the value is %d", i]; ... then later in my code... I might need to change this to: result = [NSMutableString stringWithFormat:@"the value is now %d", i...

Detect if a UILabel hide another UILabel on same UIView.

Hello. I'm developing an iPhone application. I have a UIView used to augmented reality. I add some UILabel to that UIView dynamically and I want to know if there is a way to know when a UILabel hide another UILabel added on same UIView. In other words: I'm adding UILabels at the middle of the screen (y position is always the same, x c...

how to assign a color for particular text in xcode

Hi friends,, How to assign a color to the particular text. i don't want to use the textview. Thanks ...

How to get TTPhotoViewController to display a UIImage?

I have a UIImage that I want to display with TTPhotoViewController, but TTPhotoViewController does not take a UIImage as an argument. It does take a TTPhoto as an argument, so I'm wondering if there is a way to convert a UIImage to a TTPhoto or if there is any other way to get the TTPhotoViewController to display my UIImage other than se...

writeToFile Output .plist not writing correct values

Hi Guys I've been trying to write a simple shopping list program but when i try to write the modified values back to a plist file i only get the original values that were in the file to start with. My original plist file is one large array (dataArray) of dictionaries with only two fields in each dictionary one bool and one string when ...

Send Email using MFMailComposeViewController

Currently I have a UITextView field with the CheckBox "Detect Links" checked. The contents of the field will always be an email address. What I want to do is allow the users to tap the email address and the mail composer open inside of my app. I have read how you implement sending an email inside of your app using MFMailComposeViewCon...

NSThread, how to call a method with 2 param's

Im trying to use NSThread so my display pic can load in the background so im calling it by [NSThread detachNewThreadSelector:@selector(displayPic:aURL :aURL2) toTarget:self withObject:nil]; But as im passing through 2 Strings, how would i construct this statement? Thanks ...

iPhone - How to use ABTableViewCell ?

Hi, I'm working on a UITableView whose cells contain an UIImageView subclass which gets data from a URL and cache images to the iphone disk. Problem is, event with cached images the scrolling tends to be stuttering. So I searched a bit and found ABTableViewCell ( github.com/enormego/ABTableViewCell ) which is supposed to dramatically i...

Problem with MFMailComposeViewController's "No mail accounts" alert - SDK 3.0 vs SDK 4.0

Hi all, I have a problem with this piece of code when I build it for different Base SDKs: MFMailComposeViewController *mail = nil; mail = [[MFMailComposeViewController alloc] init]; NSString *description = @"Some mail string"; if([MFMailComposeViewController canSendMail]) { mail.mailComposeDelegate =self; [mail setSubject:story...

NSURLConnection hangs on recieving not too big amount od data

I have some code here: (...) NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if( theConnection ) { webData = [[NSMutableData data] retain]; } and delegate methods: -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { ...