objective-c

IKImageBrowserView Thumbnail Problem

Hello, everyone. I download IKImageBrowserView sample named "IKImageKit Demo" from Apple official website. But I find a problem. For example: When I import images from folder named "A", then I delete an image. Then I import other image (name as same as the deleted image), the thumbnail in IKImageBrowser will not change. How could...

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. ...

How to update the data in UITableView?

Hi, everyone, I want to ask a question about the objective-C and iPhone application. I am writing a program which contains a UITableView *. In the view, it has 1 table section which is 2 rows. Both of the row display a int. In the same page, it has a button. after the user press the button, both of the int will be updated. However, I fo...

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...

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. ...

dynamically creating UIImageViews in a custom class method call in xcode

i want to dynamically create and add to the view a uiimageview when a touch is registered within the frame of another uiimageview. i want these to stay on the screen and remain moveable when a touch is registered inside the frame of each uiimageview. here is the code i have now but it doesn't quite work right and is really glitchy(i.e. i...

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.). ...

Cannot figure out why my object is getting deallocated

I have an NSDate object which I use in the main thread of my iPhone app and I also reference it from a background thread, its defined like this: //header NSDate *currentDate; @property (nonatomic, retain) NSDate *currentDate; //implementation file @synthesize currentDate; Then in my app, I call a refreshData method which passes that ...

search a string in a text file from search engine

search a string in a text file from search engine ...

Remove the first 4 letters from string

Hi I am having a string as G531 Other Dough Products. Here I want only Other Dough Products, reply me with code. I tried with substring but that is not working. Thanks in advance . ...

How to set size of scrollview as the size of textview ?

hello I am using Textview which has dynamic any length data. i want to set the size of scrollview to more than the size of Textview. How can i set the size of scrollview as the size of Textview ? Thanks in Advance .... ...

Speech to text API for iphone?

Hello Can anyone provide sample integration or please let me know any 3rd party api for speech to text conversion in iphone ? Thanks & Regards, Tariq ...

NSFetchedResultsController ~ cache causing issues?

Ok here goes my setup: Object Model: * Category object is at the root * Product is linked to a Category (many-to-1) * ShoppingItem is linked to a Product (many-to-1) Application setup: My application has a TabBarController at the root and a tableviewcontroller at the root of each of the tabs. The first tableviewcontroller shows ...

Can we call a method by tapping on UITextField in iPhone sdk.

countryField=[[UITextField alloc]initWithFrame:CGRectMake(0,0,100,25)]; countryField.textColor = [UIColor blackColor]; countryField.font = [UIFont systemFontOfSize:15.0]; countryField.backgroundColor = [UIColor redColor]; countryField.keyboardType = UIKeyboardTypeDefault; countryField.enabled=NO; countryField.dele...

How to convert NSString with day light saving to NsDate

I have an NSString like this @"2010-08-30T11:00:00-04:00" . How to convert this to an NSDate ? Which DateFormat should be used with it ? I tried this @"yyyy-MM-dd'T'HH:mm:ss-SSS" . But didn't worked. Please help me. Edit I found @"yyyy-MM-dd'T'HH:mm:ss-SSS" was working fine in OS version 3.1 . But its not getting in 4.0 .This questi...

AppDelegate protocol

Hi! i've implemented a transition methood in my app delegate file and from every where in the code i want to call it in order to make nice and cool transitions. i call her like that [[[UIApplication sharedApplication] delegate] transFromMainToGalery]; for example. the problem is that im getting warning which is ok (cause it alrea...

How to pass a variable to sqlstatement?

const char *sqlStatement = "select rowid from mytable where name = 'mac'"; Then I am getting correct result. But If I do :- NSString *str=@"mac"; const char *sqlStatement = "select rowid from mytable where name = str"; I am getting error no such column : str. How to pass variable to sqlstatements? ...

unable to play audio file from document ??

when ever i try to play audio this error appears 2010-08-27 09:13:40.466 VoiceRecorder[3127:207] Failed with reason: The operation couldn’t be completed. (OSStatus error -43.) what does it mean I am physically storing file in Iphone Document folder and copying its name in my database so when ever I play it from database its correc...

What is the difference between Garbage Collection and Reference Counting in Mac OS

What is the difference between Garbage Collection and Reference Counting in Mac OS X. Thanks and regards. Mahadevan S ...