iphone

Application crashes with UITextViewDelegate

Hi, I'm new to iPhone programming and Objective-C and am having some trouble with my UITextView. I have a view with a text view as its subview. I created a separate class which I want to be the delgate of the text view. In my header for this delegate class, I have the statement @interface MessageTextViewDelegate : NSObject UITextVie...

CFStream: User-friendly errors

I need to connect to a remote host and exchange data with some binary protocol. I'm connecting with: CFStreamCreatePairWithSocketToHost(NULL, (CFStringRef)@"whatever.host.com", port, &readStream, &writeStream); Everything is fine, except the error handling. I'm handling NSStreamEventErrorOccurred in my stream's delegate...

What payment gateway should be incorporated to build an m-commerce iPhone Application?

I am exploring technologies to help incorporate a Payment gateway for an mobile commerce application on an iPhone. Does anyone have any ideas on how to approach this solution. Thanks in advance. ...

Xcode always launches all device builds through GDB even though a normal launch is attempted

Hi, I have an issue where Xcode always launches my device builds through GDB. Even though I choose "Build & Run" and not "Build & Debug" from the Build menu it launches through GDB. My simulator launches works as they're supposed to - through GDB only when I choose "Build & Debug". Is this normal behavior? It seems strange to me to not...

Coredata relationship tutorial? Adding/finding objects that belong to something?

Anyone have a link to a coredata relationship tutorial for basic create,retrieve,update,delete type operations? I have two entities set up, entity A and entity B. I have the relationships and inverse relationships set up between A and B. A can have many B. B can have only one A. Basically the tasks I need to do: 1) When adding B to ...

iPhone UIDatePicker setMaximumDate

Hi, I am trying to build a datepicker which has today as a minimum date and 1 Feb 2011 as Maximum date. I have set the minimum date as followed [picker setMinimumDate: [NSDate date]]; and this works just fine but the MaximumDate does not seem to be correct. [picker setMaximumDate: [NSDate dateWithNaturalLanguageString:@"11/02/01"]];...

how do you create a NSManagedObjectContext

In core data for the iPhone, I was getting all sorts of errors trying to save data to a NSManagedObjectContext. I believe that my issues were all to do with me using a `NSManagedObjectContext' that was being used in multiple threads. So I wanted to create a new NSManagedObjectContext and try that, but I cannot find the example code to ...

html5 iphone preventDefault() doesnt stop from "copy" to appear upon a touch

I have this code, which shows the coordinates of the touch as the user drags his finger across the screen. The issue is that is I touch the screen for too long, it selects the entire canvas and displays the "copy" bubble, which is the default behaviour. How do I get rid of that? <html> <head> <script type="application/javascript"> fu...

Color consistency between Photoshop, iPhone Simulator, and iPhone

I've been working a lot with Photoshop .psd files recently and have been bouncing back and forth a lot to ensure colors look just right on the iPhone. Can anyone offer some tips on calibrating macbook/apple cinema displays in regards to keeping color consistency between Photoshop, the iPhone simulator, and physical iPhones? ...

When/why/how to use the UINavigationControllerDelegate Protocol Instance Methods?

When/why/how would you use these methods? - navigationController:willShowViewController:animated: – navigationController:didShowViewController:animated: Can't you just use these UIViewController Instance Methods instead? – viewWillAppear: – viewDidAppear: – viewWillDisappear: – viewDidDisappear: ...

How to add the email address to the iPhone Contacts?

Hi, everyone, I want to ask a question about the iPhone Contacts and objective-C. I want to create a contacts in my program and add to the iPhone. I write the following code, the first name, last name and phone number is good, but I cannot add the email to the contacts. Can anyone help me? record = ABPersonCreate(); ABAddre...

iPhone - Linking touch events to different classes/controllers

I have a UISlider inside a custom UITableViewCell named SliderCell. I have a method in SliderCell which updates a UILabel to match the slider's value. - (IBAction)sliderChanged:(id)sender; I have the same method in a viewController that uses SliderCell in it's table. Base on the value of the slider, I want to reload an NSDictionary. ...

What is code to all procces name in iphone

I find this to kill process system("usr/bin/killall processName"); And i need know all process name in iphone at moment ...

How do I add an NSManagedObject to Core Data and specify it's "parent" object? (iPhone)

Okay, here's the situation. I have two NSManagedObjects called 'Store' and 'Aisle'. There is a one-to-many relationship from Store to Aisle and a one-to-one relationship from Aisle to Store. I have existing stores added in Core Data that I can access just fine. My problem is that I cannot figure out how to add an Aisle object to an e...

Radio Streaming on iPhone

I have implemented Radio Streaming functionality for iphone. I am successful to play audio likes mp3, mp4. But I need to play live streaming like AAC, WMA format which iPhone doesn't support directly. Is there any way to play this file formats. There is already one application available called Wunder radio on the app store. They also pr...

How can I get my website to be zoomed out by default on mobile phones?

So I want users to be able to see my background on my website. Currently my websites width is 925px and when you view the website in a mobile browser (e.g. iPhone, Opera Mini) it is zoomed in on the text and the user can't see the background. I've tried using the meta viewport tag unsuccessfully. How do I get my website to be zoomed out...

How to setup UIView touch handler without subclassing

How do I capture touch events such as - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event without subclassing a UIView nor using UIViewControllers. What happens is that I have a simple UIView created programmatically and I need to detect basic tap events. ...

Setting the contrast of an image in iPhone

Hi, I'm using the following code for setting the contrast of an image basing on the slider value. The slider range is from 0.0f to 2.0f. Its runnig fine in simulator but its crashing in device due to low memory. Can any one help me whats wrong in this code. Thanks in advance.... -(void)contrast:(float)value { CGImageRef img=refIma...

Core data Doubts?

Can I get results using all type of queries through features of Core data? (like Primary key, forieghn key,alter,update )? or FMDB is better than using Coredata for running all type of SQL queries? Core data will be useful in all situations? ...

iPhone known memory leaks - list

Is there a list of known leaks within the iPhone SDK sitting somewhere, all alone? I guess you would have it specified by version. (I just ran my test app - it has a leak outside the project itself (somewhere related to connections) when testing it on a v3.3.1 iPhone 3G, but the leak is not there using an iPhone 4 v4.0.2.). ...