cocoa-touch

How to represent object from array?

I have the following array, which was retrieved from JSON results: <NSCFArray 0x196e3e0>( { NameID = 3; Name = test1; }, { NameID = 6; Name = test2; } ) I'd like to go through each object via a tableview and assign its values to labels in a custom tableview cell. How do I access NameID and Name on each iteration? D...

MVC Pattern: Where does formatting/processing type work belong? (Objective-C)

As my Cocoa skills gradually improve I'm trying not to abuse the MVC as I did early on when I'd find myself backed into a hole built by my previous assumptions. I don't have anyone here to bounce this off of so hoping one of you can help... I have a custom Model class that has numerous & varied properties (NSString, NSDate, NSNumber, et...

NSXMLParser and namespace elements

I am using NSXMLParser to parse a Feedburner/atom feed. I can get most elements to work however I am not sure how to parse the following: I would like to get at and store the href from this tag. How do I do this? Thanks -Tom Printy ...

UIActionSheet problem with FBConncet {iPhone SDK}

hi everyone . i implement FBConnect for my app via UIActionSheet with 2buttons . my buttons are "Share On Facebook" and "Log out from facebook" . so i want when user click on share on facebook button FBLoginDialog shows and user log in to facebook with his account and then show FBStreamDial appears and user share something on his wal...

VoIP over 3G on iPhone, what's changed in the SDK??

Hi, I've been looking at the SDK3.2 to find out about the new capacity to direct call over IP on 3G network, but I don't see anything obvious in the API diffs. Is this just something Apple allows on a low level private framework or does it reflect on the public frameworks as well? if so, which framework, class, method? thanks for you h...

Why does one have to use CALayer's presentationLayer for hit-testing?

I was working on a Cocoa Touch application, and trying to handle touches by determining which sublayer of a view's layer was touched. My controller's code looked like this: CALayer *hitLayer = [self.view.layer hitTest:point]; This wasn't working. It would work if I tapped at the bottoms of sublayers, but not at the tops. After an hour...

NSFetchedResultsController, CoreData, SectionIndex and special chars (Umlaute..)

Hi, I am having problems with NSFechtedResultsController and using the created sectionIndex(data is coming from a CoreData storage). It seems to mix up the indexTitle versus the sectionName e.g. sectionName is "Ä" and sectionIndex is "Ƒ" (0x0191) regarding the unicode char. This seems to be the case with all special chars. this can lead...

How can I reduce the number of annotations on a map?

I'm coding a map view with around 900 annotations. Having this many annotations on a map make the performance suffer, so I'd like to reduce it to about 300 at a time. The annotations are representing shops in a country, so they tend to cluster a lot around major cities, then in small groups of 2 or 3 in smaller towns. I want to reduce th...

What framework/library to use for custom animated controls

We are making an app whose primary purpose is to display data, but we want to do so in a rich way. Our design includes several custom controls. For example, one control will be a wheel the user can spin to pick a time of day. You see an entire circle - a disk - that has time values going out like spokes from the center. It needs to spin...

Audio Toolbox playback only plays part of output buffers

I'm working on a project which is using Audio Toolbox for recording and playback of PCM data, and I'm having trouble with playback. In the simulator, I can record and play audio just fine, using a custom class to handle storing and sourcing PCM bytes for the recording and playback buffers as needed. On device (iPhone (3.0.1) and iPod 2G ...

UITabBarController 5 tabs .. tabs change from code but not when I click

Guys, I am a kinna new to iphone app programming ... i have a UITTabBarcontroller and have 5 UITableViewControllers inside it. Everything works fine ... I can change the tab using code ... but from the GUI when i click on different tabs, it wont change .... have tried a lot ... please help me out here thnk u ppl ...

change UIbutton color inside UITableViewCell

I have a simple problem ... but its turning into a very difficult problem .. i have a button inside uitableviewcell and want to change its color through code .... i could aceive it by changing its background image. But its kinna hazy ... its not the solid color ... and when i use [cell.button setBackgroundColor:[UIcolor redColor]] ... th...

iPhone Core Data: Cascading delete across a many-to-one relationship

I have two classes A and B with a many-to-one relationship from A to B (multiple A objects may reference the same B). The question is, if the delete rule on the A side is Cascade, will B be deleted only when the last referencing A is deleted or will it be deleted the first time an associated A is deleted. The delete rule for the B side...

Cocoa Touch Updating UITableView from Core Data

Hi there, Say I have two UIViewControllers, all working under a UINavigationController: RootViewController hosts a UITableView which contains a list of domain names. CodeViewController shows a domain. A user can view any domain they like; once the domain is viewed in CodeViewController, the name is added to the store via Core Data. ...

Changing properties in tab bar More page

I have a tab based app that has 6 view controllers. The SDK puts the last two controllers on a More page. I would like to access the More page so I can change the color properties. It uses a default blue navbar, but my app uses black bars throughout and I'd like to control some properties on the More page. But since this page is set u...

Referencing view in tabbar app?

I have a tabbar based app and would like to reference one of three views. There are three tabs. When tab2 is clicked, tab2view is created. tab1view needs to reference tab2view so it can be pushed into view. tab2view can be pushed into view via tab2 or tab1view. How do I give tab1view a reference to tab2view? tab1view will also ne...

IBOutlet declarations?

I have seen the code below written 3 different ways (with regards to IBOutlet) Does it matter, I would say adding IBOutlet to both the declaration and the @property was more concise. JUST PROPERTY: @class SwitchViewController; @interface iPhone_switcherAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; SwitchVi...

Objective-C object gets deallocated unexpectedly

I'm very new to Objective-C and I'm trying to develop an iPhone app. My problem is I get "message sent to deallocated instance 0x3d54830" error when I use an object inside an NSTimer. When I don't use an NSTimer, I can use the object just fine. For example: //These can be any objects. Le't say I have a Song class and a SongReader clas...

Where am I leaking CGMutablePathRef in this code?

In my code I have CGMutablePathRef thePath = CGPathCreateMutable(); If I don't release it I literally get thousands of leaks because I'm doing the action constantly. However, if I do release it, my game eventually crashes. Any ideas? Is it possible I'm releasing it in the wrong place? -(void)MoveObject:(int)Tag { representatio...

Incompatible type for argument 1 of 'bezierPathWithOvalInRect' error

Hi, I have the following code: - (void)drawRect:(NSRect)dirtyRect { [[NSBezierPath bezierPathWithOvalInRect:[self theRect]] stroke]; } - (NSRect)theRect { return NSMakeRect(1, 1, 1, 1); // made up some values } When I compile it says "Incompatible type for argument 1 of 'bezierPathWithOvalInRect' error". When I do this, howev...