iphone

NSNumber intValue giving EXC_BAD_ACCESS

I have an NSNumber being passed to be via a 3rd party API, and when I call intValue on the index I get a EXC_BAD_ACCESS error: -(CPFill *) barFillForBarPlot:(CPBarPlot *)barPlot recordIndex:(NSNumber *)index; { NSLog(@"bar index %i", index); int value = [index intValue]; } The output I get in the debugger is: bar index 0 ba...

Cocos2d Sprite not beeing added from another class

Hi, i'm having a little problem here and i cant figure out whats wrong. I have a simple setup. A CCLayer-subclass, in it's init-method I initialize a CCSpriteSheet and add it as child to the layer. - (id)init { ... enemySprites = [CCSpriteSheet spriteSheetWithFile:@"rock1.png"]; enemies = [[NSMutableDictionary alloc] init]; [self ad...

Enable Guard Malloc for iphone

i tried Run Gurad malloc for my app and i got this message GuardMalloc: Allocations will be placed on 16 byte boundaries. GuardMalloc: - Some buffer overruns may not be noticed. GuardMalloc: - Applications using vector instructions (e.g., SSE or Altivec) should work. GuardMalloc: GuardMalloc version 18 i dont know what is this good or...

what's the differences between [event allTouches] &[touches allObject]?

in uiresponder , - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; what's the difference between [event allTouches] and [touches allObject]? ...

Is there any method to save application's whole state?

Hey guys, we know that on IOS4, switch among several apps, the whole state of each app will be saved, when come back to the original app, the app will stay where it was. If user closes the app(from the app list on the bottom by double-click home button), then launch it again, the app will run from the beginning. I'm wondering if there...

Why is drawAtPoint Creating Duplicate Images in my tablecell's contentview?

I have a view with a custom slider. We are using a subclass of TableViewController that is generating instances of UITableViewCell. Inside each tableViewCell we add our custom slider (a UI View) as a subview. In here we have a view that serves as the slider's control knob. It is just a subclass of UIView with a gesture recognizer. The dr...

Something like rsync with the iPhone-sdk

Hi, I'm looking for an efficient means of copying an online file to the local iPhone. Something like RSync would be an ideal technology to use, since it only transfers the bytes that are different; does anyone have experience with anything that fits my description? What I'm specifically trying to accomplish is the transfer of an SQLite...

Can't set color for UIBarButtonSystemItem

I have been trying to have a UIBarButtonSystemItem in my toolbar and it always defaults to the standard blue. If I create it with an image or title it works fine with the correct color, try it with UIBarButtonSystemItem and it goes to the default color and nothing I have found on the internet works. heres the code: UIBarButtonItem *ove...

iphone threads beginner question, having trouble with managing autorelease pool

I'm having trouble with a simple threading example. I know my methods aren't complete, but as of now, I want to press the start button and have that fire off a thread that increments a counter every second. I know it's connected in IB correctly since the NSLog tells me it gets to my timerThread method. But then it immediately jumps ba...

taking control on vibration

Hi all, i knw this wat we use for vibration #import <AudioToolbox/AudioToolbox.h> AudioServicesPlaySystemSound (kSystemSoundID_Vibrate); but how to stop vibrating? i mean i want a switch through with i want to activate or deactivate vibration. HOw to do dat??? regards ...

UIImage created from CMSampleBufferRef not displayed in UIImageView?

I'm trying to display a UIImage in real-time coming from the camera, and it seems that my UIImageView is not displaying the image properly. This is the method which a AVCaptureVideoDataOutputSampleBufferDelegate has to implement - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer...

Distinguish between iPhone web browser and iPhone app user agent

What is the best way to distinguish on a server between a request that came from an iPhone through the web browser vs through an iphone with an app written in objective c? What differences do I look for in the user agent string? ...

How to use Qt library on iPhone

Hi everyone, I am develop a stock view app on iPad. I figure out that qtstalker app can run on Mac, with Qt library. Now I can run qtstalker on Mac, compile with XCode after qmake all the subdirectory of qtstalker. Now I would like to port this program to iPad. I know that I can not port completely without modification. How I can confi...

TV out an iphone application

I would like to display my application running on iphone on a big screem, either TV or using a projector. After a long search I heard about the undocumented API MPTVOutWindow which fullfill's my requirement. But i think this is not approved by apple. Is there any other options available in latest SDK to TV out an application ...

Examples of well coded cocoa iPhone apps on github

Hi Im looking for examples of well written Cocoa Touch iPhone apps to help me see what good cocoa code looks like. Specifically im interested in how people have layed out standard navigation apps. I am also interested in how different people have layed out the model/view/controller files as well as general naming conventions etc. Code...

How to push UIViewController

I have UIViewController in Viewbased application. I want to push another UIViewcontroller from it. -(IBAction) Myfunction { MedicineSearchSystem *medicineSearchSystem = [[MedicineSearchSystem alloc] initWithNibName:@"MedicineSearchSystem" bundle:nil]; [self.parentViewController:medicineSearchSystem animated:YES]; // Crash her...

how to delete cell with finger sliding iphone

Hello, i am trying to delete cell on tableview with sliding finger (like on the recent call) i know i need to implement - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { NSArray *index = [[NSArray alloc]initWithObjects:indexPath]; [...

Handling touches on Iphone

Im having a little problem on handling touches in my apps. I set my touchesBegan like this: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *currentTouch = [[event allTouches] anyObject]; touchPoint = [currentTouch locationInView:self.view]; if (CGRectContainsPoint(image1.frame, touchPoint)) { ...

How to associate full page curl animation for modalviewcontroller ?

Hi all, Currently I am showing a modal view controller for some info . I want to show or hide the modal view controller with full page curl animation . Currently I am showing this modal view controller from one of the view controller of the tab bar controller . I have the option of partialpagecurl in the modalTransitionStyle property...

iPhone SDK Core Data relationships problem

Hello.. I'm having a problem with relationships between to entities in Core Data. I'm parsing some JSON and adding the entities: if ([hourSets isKindOfClass:[NSArray class]]) { // check to see that we have got some hours back for (NSDictionary *hourSet in hourSets) { Hourset *thisHourSet = (Hourset *)[NSEntityDescription ...