iphone

How delete attributes in core data?

And how check attributes or nil? ...

Game Engine usage for Normal iPhone apps

When the standard iPhone UI controls become too bland, and you want your simple score keeping app to pop a little more with colour, animation, non-standard GUI fonts, and background wallpaper, etc., would it make sense to integrate a game engine for such things? I've tinkered with Unity3D and Torque2D, and wonder if anyone has used them...

How to make sure an float value is always a multiple of 0.25?

I have a float value that must be constrained to an multiple of 0.25. Examples of valid values: 1.0, 1.25, 2.0, 2.5, 20.25, 20.5, 21.0, 21.25, ... Examples of invalid values: 0.93, 3.31, 4.249, 5.02, ... Is there an mathematic function or something convenient to achieve this? When the value is invalid, I would round it up to the neare...

How do you play a section of audio using an audioqueue?

Working from the speakhere sample code I have managed to specify the start time by setting mCurrentPacket. How can I set the end time? I figure its to do with the amount of frames you buffer but I can't seem to get it working. ...

Adding and switching between subviews

I have a View which I want to have a label and 2 buttons on the top in a panel. This area wouldnt change. Instead of new view and Xib files and setting their position to below the main view, I would like to know how one can add a subview to the main view so that the subview can change and be modified. Or is it better to go with separa...

Clicking a link in UIWebView pushes onto the NavigationView stack

Basically, I'd like to know how to intercept a click in a webview and then have a new view pop up that has a navigation bar at the top (with a back button) and the content to be the link I clicked. I currently have a tab bar template with 5 tabs and each tab is currently set to NavigationView and inside each of those tabs are views tha...

Recording Mono on iPhone in IMA4 format

Hi, I'm using the SpeakHear sample app on Apple's developer site to create an audio recording app. I'm attempting to record directly to IMA4 format using the kAudioFormatAppleIMA4 system constant. This is listed as one of the usable formats, but every time I set up my audio format variable and pass and set it, I get a 'fmt?' error. Here ...

Is possible replace a plist file when my iPhone app is running?

Hello guys, is possible replace a plist file when my iPhone app is running? I'd like to implement backup into my app (into the backup zip I have also the plist file) and I don't understand how can I replace the plist file with its backup. ...

Built-in function for converting between unicode characters and virtual keycodes in Cocoa?

Is there a way to convert a unicode character to a Mac virtual keycode? (without building my own table?) It looks like on Windows there is VkKeyScanEx, but I'm not aware of a similar function for Cocoa on OS X. I'm actually trying to do this for the iPad. I want to convert character taken from the keyboard and convert them into key code...

I am not able to refresh the old view on button click

I have viewBased Application, i have 3 view controller in that. When I want to go back to first view from second view, I want that view to be reloaded from start. Code I use to dismiss the present view is: //Back Button Code: [self dismissModalViewControllerAnimated:YES]; //Code I use to go to new view is: [self presentM...

I want to trigger a http request when my app is in background

I want to set a alarm in the mean while when app goes background,Alarm should keep on running,When the alarm time expires,I want trigger a http request.Is that possible? If so should I use ASIHttprequest? If I use ASIHttprequest will my app will be rejected? ...

How do you deal with singleton objects in your app?

The first approach that comes to my mind is to put the singleton object in the appDelegate object as property. In this way you can access it from anywhere using #import "myAppDelegate.h" // ... [[(myAppDelegate *)[UIApplication sharedApplication] delegate] SingletonObj] The downside is you have to explicitly cast and import the header...

How do I print out a property of a Core Data element?

I'm trying to set a value and then return it using Core Data. This is what I`m doing right now : NSManagedObjectContext *context = [(AppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; NSManagedObject *newShot = [NSEntityDescription insertNewObjectForEntityForName:@"Shots" inManagedObjectContext:...

core data displaying to-many relationship data in second view controller

Hi, I am fairly new to this, so please bare with me, my core data model look like this 2 entities with the 1st TableViewController displaying the districts, and when user selected the district, it pushes to the 2nd view and display the schools in that district. I have the 1st TableViewController with the NSFetchedResultController setup...

-dismissModalViewControllerAnimated: works on iPhone not iPad

I'm having trouble with getting the -dismissModalViewControllerAnimated: to work on the iPad (as an iPhone app). For some reason it doesn't seem to do anything. I call -presentModalViewController:animated: in MainViewController, after which I've tried calling the -dismissModalViewController from the presented view controller (using [se...

iPhone SDK: pushViewController not resizing view as expected

Trying to figure out why my view is being pushed up into the nav controller. From, the documentation... "The view is automatically resized to fit between the navigation bar and toolbar (if present) before it is displayed." In my case it is not. The view doesn't seem to take into account the fact a nav bar is there. Any ideas? MultiS...

Condtional Environment Varialbes in Xcode

I would like to create some environment viables in Xcode for heavy debugging such as: NSDebugEnabled NSZombieEnabled MallocStackLogging MallocStackLoggingNoCompact Is it possible to create a new build configuration that is a duplicate of "Debug" where those environmental variables are set to YES, but i can just switch to regul...

XCode Error For IPhone App

Hi Everyone! Brand new to Iphone development, My app loads but then it crashes right away, in the console I get this reason: reason: '[<MyViewController 0x6939d60> setValue:forUndefinedKey:]:this class is not key value coding-compliant for the key delegate.' Stack: *** Call stack at first throw: ( 0 CoreFoundation ...

get google coordinates by touching the map. iPhone

Hi, How to get the coordinates by touching the map. Like i want to place a pin where I have tapped on the google map in iphone application. Kindly explain me with an example. Thanks, Best Regards, Naveed Butt ...

How to keep the previous drawing when using Quartz on the iPhone?

I want to draw a simple line on the iPhone by touching and dragging across the screen. I managed to do that by subclassing UIView and change the default drawRect: method. At the same time in my viewcontroller I detect the touch event and call the [myView setNeedsDisplay] when necessary. The problem is that when I try to draw the second l...