cocoa-touch

How can I make it so that all dates in a UIDatePicker are the same color?

By default, UIDatePicker displays today's date in a blue font and the rest of the dates in black. How can I make it so that all the dates are black? ...

Possible to reliably open AND edit an NSKeyedArchiver's archive?

I'm using something like the code below to save an NSDictionary of objects to the device. Is there a way to open this archive, drill down into the Dictionary items that it contains and, ideally, edit the data? My guess is no, not reliably, as the optimization done when saving makes the archive difficult to interpret...at least it appears...

How to make a "view" Outlet show up in a ViewController nib?

I'm working on my first iPhone app and have been able to get most things done. There's one problem that I've run into a few times and I want to understand the issue better. In XCode, if I go File->New File->UIViewController subclass and make sure that both UITableViewController subclass and With XIB for user interface are checked, then...

problem - when playing a sound the animation freeze\slowing

when playing a sound the animation freeze\slowing problem. sound size 20kb mp3. animation size 5kb png. also happens in other animation functions. basically whenever i play a sound the animation slowing down or pauses, what to do ??? code: - (void) startAnimation { [UIView beginAnimations:nil context:nil]; [UIView setAnimatio...

Is app startup time restriction limited to applicationDidFinishLaunching?

If my app shuts down because load time takes to long, can I move some code in or being called from applicationDidFinishLaunching into the RootViewController? Meaning, is the (shutdown) timer only looking at applicationDidFinishLaunching? ...

[UIApplication sharedApplication] doesn't return windows

I need to add a view to window on iPhone, so i tried to do this: [[UIApplication sharedApplication] windows], but it seams that the array contains only one window. Can anyone tell me what i'm not doing write/what i need to do? ...

How do I measure the velocity of a swipe?

I'm developing a game that will use the force of the swipe as a variable user input. I read from the documentation that on the touchesEnded event, I can get the allTouches array which is a list of the user touches collected from touchesBegan. From this I plan to get the last two touches to get the direction of the swipe. I will also get...

help! when playing a sound the animation freeze\pauses

basically whenever i play a sound the animation slowing down or pauses, what to do ??? sound size 20kb mp3. animation size 5kb png. code: - (void) startAnimation { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.8]; CGPoint destination = CGPointMake(152,20); pink.center = destination; [UIView commitAni...

The right place to do things in Objective-C

I started toying around with the ObjectiveFlickr framework with the goal of creating a relatively simple iPhone map application showing geotagged flickr content within the current MKMapView region. I ran into threading related trouble before and now I have the feeling I am getting something fundamentally wrong in my architecture. Basical...

How to create a demo like Convertbot

Convertbot (http://bit.ly/4EAUwY) has an embedded demo that is accessed through their info button in the app. However, it doesn't seem to use the Mediaplayer framework. They've also managed to get the demo very small, since the total app size is only 1.8MB. Any ideas how a demo like that can be created? ...

Issue with deselectRowAtIndexPath in tableView

I have a cell with a few lines of text which changes colour when selected/highlighted. The problem is that as the new viewController is being pushed, the deselection animation occurs which is visually distracting as the text suddenly reverts to the unselected state. I have moved the deselectRowAtIndexPath statement after the line where t...

Is self a pointer?

What kind of thing is self? Is it correct to call it a pointer? Or is it a variable? Or what else? ...

What's the difference between these imports?

For example, sometimes there's an import like this: #import <Cocoa/Cocoa.h> and sometimes the import looks like this: #import "Foo.h" Now what's the difference there? The first is in < > tag things, and the second is in doublequotes. What does the first do? Is that used for pre-compiled files like frameworks which are compiled alre...

Crashing while trying to move UITableView rows

I've got some rather complicated rules for moving rows around in a UITableView. There are an undefined number of sections and rows per section, and based on various rules, rows can be moved within or between sections by the user to specific other locations. All of the data updating and everything is working. But occasionally, after mo...

iPhone animation problem SImulator vs Real Device

Hi! This is my first question her so please be gentle: I have followig animation code running smoothly on the simulator as well as on the real device (I am testng on iPhone 3GS 3.1.2). Animation is a simple transition between the 2 views, something like book page flipping. One diffrence betwen simulator an real device (The problem I can...

Language Mixing: Model and View

Consider developing an application where the model will be written in C++ (with Boost), and the view will be written in Objective-C++ (with Cocoa Touch). Where are some examples showing how to integrate C++ and Objective-C++ for developing iPhone applications? ...

Does updated provisioning file require new build?

If I add someone to my adhoc provisioning file, can I just send them the last build and provisioning file? Or do I need to do another build with the updated provisioning file? ...

How do I replace the back button with another UIBarButtonItem in a navigation controller when editing?

I have a standard UINavigationController setup. One particular view displays an "Edit" button on the right side of the Navigation Bar. When that button is pressed and the view switches to editing mode I would like to replace the "Back" button on the left side with an "Add" button. Of course, when editing is finished (the user presses ...

CGRectIntersectsRect fails when the imageView is rotating.

Hi all, In my current project, i am moving a car in all directions. It is rotated also. During rotation the frame of the car changes and hence even if it doesnot collide with another imageview, it shows that the frames are colliding. That is because of change in the frame of the car imageView during rotation. So what can i do to find th...

chopping deadspace out of UIViewAnimationTransitionCurlUp?

I'd like to utilize UIViewAnimationTransitionCurlUp more often in my applications however it has a very annoying trait... namely that the first 20% to 35% of it is non-action... I know this is the case because I set an animation duration to 20 seconds to confirm my suspicions that the culprit wasn't simply setup time internal to [UIView]...