objective-c

How to use a single NSValueTransformer subclass to toggle the titles of multiple menu items

I would like to make some bindings that toggle item titles in a popup menu based on a single numerical value in a text field. Let me explain: This is my UI: I want my menu items to automatically adjust to singular or plural based on the number in the text field. For example, when I type "1" in the box, I want the menu items to be l...

Can i get last modify date of ABPerson in iOS's Address book?

Can i get last modify date of ABPerson in iOS's Address book? ...

Using TinyPic.com (or another site) to store user's images in my iPhone app.

I'm writing an iphone app and don't really have the resources to rent sql server space to store user's pictures. Is there another way? Could a site like TinyPic.com be used? What objective-c code could I use to send/store a picture there... and then later retrieve it as needed? ...

Delegates in Objective C only on specific thread.

I have two threads main thread and worker thread. What I want to be able to do is schedule callbacks (delegates) to the worker thread irrespective of who calls functions that trigger those delegates. For example: /* mainThread */ [Obj asyncCallback]; // triggers callback to delegate foo() /* Worker thread should do all the callback pro...

Calculating bearing between two CLLocationCoordinate2Ds

Very "simple" problem: given two CLLocationCoordinate2Ds, how can I get the bearing (as radians) from the first to the second? I've done a lot of research and studying on this, both the general problem and Objective-C/Cocoa Touch/iOS specifically. Here's my implementation: - (float) getHeadingForDirectionFromCoordinate:(CLLocationCoord...

Problem With openPanelDidEnd in PyObjC in 10.6

The following code which worked fine under OS X 10.5 now fails on 10.6: @IBAction def addButton_(self, sender): panel = NSOpenPanel.openPanel() panel.setCanChooseDirectories_(YES) panel.setAllowsMultipleSelection_(YES) try: panel.beginSheetForDirectory_file_modalForWindow_modalDelegate_didEndSelector_contextI...

Using Instruments to improve memory-management with modal view controllers

I feel like I don't understand something fundamental here. I've been working on memory management in my app while using Instruments to check out live allocations. I have a modal view controller (settingsViewController) that has an image for a background. One thing I noticed was that even after settingsViewController dealloc is called,...

Does ABPerson in iOS have kABModificationDateProperty?

Does ABPerson in iOS have kABModificationDateProperty? Thanks for your help :) ...

Is there a way to have text display on the UIActionSheet buttons the way it does from the contacts app?

When you select text message from a contact in the contact's app you get a list of phone numbers and email addresses with the 'type' also in the button, however the 'type' is styled differently. Is there a way to get this effect with UIActionSheet buttons or would I have to roll my own? ...

NSRangeException related to UIActionSheet

I am using UIActionSheet to display 3 action buttons in a popover when a table row is selected. In .h of my tableViewController, I have declared the following: UIActionSheet *actionSheet; In .m of my tableViewController, I have the following code - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)index...

Making the Blue Editing Box in iPad

Hi guys, I am wondering if any developer have attempted to make the box that appears when you resize an image in Pages for iPad, it has 8 handles at the sides that allows you to drag to resize. Regards, Calvin ...

what are the major differences between C and Objective C. Is abstraction possible in C?

what are the major differences between C and Objective C. Is abstraction possible in C? ...

UIScrollView not detecting touch event

Hi All, I have a scroll view which has some controls like textField and textArea on it. I want to detect the touches event on scroll view so that I can use resignfirstresponder on my textfields. I have also tried subclassing UIScrollview, but the approach didnt work for me. Can anyone please help me in detecting touches event on scrol...

Saving Long/Lat as kml (track)

So, I've got a class with contains a NSMutableArray of CLLocation's, and a name. Now I want to save them to KML, ideally as a track (or , so I can use the file to display the locations traveled.) How would I go about this? I don't expect code, more guidance (I'm new to Objective-C and KML, so got a lot to learn! :) ) ...

get image form web service.

how to download image for showing in UITableView from web services with need to downloading again when i scroll table. ...

How can i make Twitter's row menu in iOS app?

Anybody can tell me how to make Twitter's row menu in iOS app like img below? This menu appear when i touch down move finger to left (Touch in UITableCell of UITableView). Can i make row menu like it? Thanks :) ...

select one cell at a time in UITableView

when i tap a cell in UITableView then the cell is selected and show selection with blue. but duration the loading next when a tap to one another cell that is also show as selected with blue. can i stop multiple selection in a UItableView. or deselect the cells for selection after one cell is selected. and also allow to selectable when i ...

Setting Properties Rundown in Objective C

One of the things I've been struggling with whilst breaking into Objective C programming is understanding how to manipulate properties. I'm perhaps out of my comfort zone using a proper coding language as opposed to scripting languages that I'm used to, so the declaring things in header files and implementation files is confusing me some...

How to append two NSMutableArray's in Iphone sdk or append an NSArray With NSMutableArray?

Hi Guys, I need to append two NSMUtableArray's can any one suggest me how it possible? My code is: NSMutableArray *array1 = [appDelegate getTextList:1]; NSArray *array2 = [appDelegate getTextList:2]; [array1 addObjectsFromArray:array2];//I am getting exception here. Anyone's help will be much appreciated. Thanks all, Lakshmi. ...

Difference b/w Objective C's self and C++'s this ?

can someone tell the difference between objective C's self and C++ this pointer? ...