objective-c

how to write async function

what i need to learn for it? ...

How can I tell if a referenced object has been deallocated in objective-c?

After upgrading to iPhone OS 4.0 the application started to crash after switching between applications. The application crashes in the same place when the application receives a memory warning. It seems like some objects are automatically deallocated when a memory warning is received and then when we try to use the deallocated objects t...

How to access sqlite database from server in my application.

hi all, I am new in iphone and i work a project in which required to put database on the server. I take link on the server and create our table on the server. i search on the net i find that below process. The Client Side Application: 1) receive input from the user (or client app event) 2) generate SQL request 3) XML encode the reque...

how to get plist file's data content in tableview's cell in iphone?

In my application i hve tableviewcontroller and its detailviewcontroller(dvc). dvc contains textfield and button.I actually want when i clicked on button textfield text is replaced the tableview cell text.what can i do ? explain in detail ...

iOS4 creating two UIActionSheets, 3.1.3 creating one? Why?

The code below creates one UIActionSheet in XCode 3.2.2, iPhone OS 3.1.3. Embedded in the Action Sheet is a date picker. But it seems create two sheets in XCode 3.2.3, iOS4, with one overlaid on the other. Also, I get this error in the console (again, only with XCode 3.2.3, iOS4): wait_fences: failed to receive reply: 10004003 What ...

Memory Leak Mystery

Greetings. I'm almost finished with my first iPhone app, but have run into trouble with XML parsing. Instruments reports that the instantiation line sparks a memory leak in my parseXML method, but I can't figure out why. Here's the (entire) code for the method. Any guidance is greatly appreciated. -(void)parseXML:(NSString *)xHC { B...

apns-python-wrapper device token issues

To use the module apns-python-wrapper here: http://code.google.com/p/apns-python-wrapper/ you need to convert your iPhone's APNS device token, however, I'm not sure how to convert it. Here is the fresh new token returned from the device: 8fa9c60685c158a3cf6f9c5de164b3817e68a075fcfdafcd982aa4b3d2ca99c7 And this is what it needs to look...

Xcode leaks tool does not identify property leaks

Hi I have this simple code @interface chatApp4Message : NSObject { NSString* line; } @property (nonatomic, retain) NSString* line; @end @implementation chatApp4Message @synthesize line; @end As you can see, I don't release the line property. However, when running this following simple code under the xCode leaks tool, I get no indic...

UITableViewCell Overlapping Issue After Adding and Deleting Instances of Model

Hi Guys, I'm having a weird issue with my UITableView. The cells are configured from an Array of my Contract model. Adding and deleting instances work well. When I add a new Contract after previously deleting one, the old cell and the new cell's content are merged on the new one. Here's a picture: http://cl.ly/1WZy/ (Can't post image...

show UIButtons one by one in a UIView

Hi I have a UIView which contains several buttons that are designed by others in Interface Builder. Now I need to show the buttons one by one with a 0.2 second delay, when the View is loaded. Can someone give me some clue how I could implement this? e.g. in which method call what kind of animation. ...

Is there a way to move row to the selected row in UITableView on image click not on row selection

iam building an application in which iam showing the 5 small images in a single row of the UITable view cell. i want to make selection of row on each image clicked not on the selection of row . - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 160; } - (UITableViewCell *)tableV...

Objective-C Dot Syntax and Init

I have read a number of snippets that mention you should never use dot-notation within your init or dealloc methods. However, I can never seem to find out why. One post did mention in passing that it has to do with KVO, but no more. @interface MyClass : NSObject { SomeObject *object_; } @property (nonatomic, retain) SomeObject *obje...

iPhone device has taken over!

Hi, I have been developing an iPhone app for a few months now (my first app) using the 3.1.2 SDK. All of a sudden, my app started defaulting to running on the device during debug. I assumed that somehow my target settings had changed, but when I checked them, they said they were targeting the simulator, not the device. I checked all the...

UITableViewController not reloading data - ASIHTTPRequest

Hi all, I am having trouble getting my UITableViewController to reload/refresh the data. I have a method which uses ASIHTTPRequest to call a URL and bring back some string data. I am trying to put this data into a cell of the table, but [self.tableview reloadData] is not working. I was thinking that the ASIHTTPRequest completes its ...

Xcode unable to create new "Window-based application" iphone app from template

I'm trying to create a new "Window-based Application" in Xcode and I'm getting the following message: Internal Error File: /SourceCache/DevToolsIDE/DevToolsIDE-1688/pbxinterface/Wizards.subproj/PBXWizardChooserWizard.m Line: 1365 Object: <PBXProjectWizardChooserWizard:0x200b845e0> Method: sheetDidEndWithReturnCode:fileSystemLoc...

XCode Documentation - Offline Reading

Is it possible to have the iOS and OSX documentation available for offline reading? If so, how? ...

Adding UIView to UITextField

Hi, I am trying to use a custom iPhone control called Kal, which displays a calendar, and I want to modify it. Kal programatically sets a table view as follows: tableView = [[UITableView alloc] initWithFrame:fullWidthAutomaticLayoutFrame style:UITableViewStylePlain]; tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIVie...

core data simple update ?

hi all, i'm beginner on core data and try to understand how to simply update an object wich is already stored myObject is a NsManagedObject setValue forKey needs .. a key but how could i update with something like setValue:mynewvalue forkey:myObject.key ok that 's not the way... have an idea with example please? thanks ...

iPhone - ABTableViewCell and animations

Hi, I'm using a ABTableViewCell subclass ( http://github.com/enormego/ABTableViewCell ) as cells of a UITableView. This improves scrolling smoothness a lot as cells have many elements including pictures, but I can't find how to create animations for a single element of a cell. For example, when a image is loaded from the web, I'd like ...

NSOperationQueue seems to hang on completion for a few seconds

I have a custom view controller that implements the from UITableViewDataSource and UITableViewDelegate protocols. When I load data for my table (in my viewDidLoad method), I create a NSOperationQueue and a NSInvocationOperation and add it to the queue. I throw up an activity indicator, and viewDidLoad exits. The method used for the op...