iphone

iPhone AVAudioPlayer loop stuttering?

I have a sound that is about 2 seconds long which I have set it's it's numberOfLoops property to -1, but it has a .5 second lag between loops i want the sound to fade into itself when it is looping. Help please! ...

Any links to information on the Ford Sync SDK?

This is a joint effort between Ford and Microsoft and it's about time they opened up the SDK to developers. http://www.engadget.com/2009/12/18/ford-to-give-sync-some-app-store-flavor-opening-api-to-devs-in/ Will there be a .NET compatibile version of the SDK? It sounds like you just have to be able to communicate via your application ...

Reusing NSString in the same .m file

I have a string (currently defined in my .h file) that I'd like to fill and reuse in my .m file. Here's the setup: User clicks btnA in my interface btnA runs a method (buttonAClicked) that sets the NSString's value to "foo" USer clicks btnB in my interface btnB runs a method (buttonBClicked) that returns the value of the NSString (eg:...

Change size of UIAlertView buttons

I have three buttons in a UIAlertView, and I only want to change the size of two of them so that I can have toe first two on their own line and then the third button on it's own line.. ...

Memory-mapped resource - or not?

Hi all, I'm trying to memory-map and use a largish binary data file from my iPhone bundle resources. I've added the "Resources should be file-mapped" line with a checkmark to my Info.plist. Then I'm getting the data block like this (error handling and data release omitted): CFBundleRef bun = CFBundleGetMainBundle(); CFURLRef url = CFBu...

AudioQueue +kAudioQueueProperty_CurrentLevelMeterDB

Hi I am using AudioQueue to record a sound file.In which AudioQueueLevelMeterState have mPeakpower and mAveragePower.In which unit (Db or Dbfs) it return value if i used (AudioQueuePropertyID) kAudioQueueProperty_CurrentLevelMeterDB. ...

A question regarding the ApplePush Notification Service

hi, friends if u know Apple Push Notification Service,Alert comes through OS when server sends message. if i click view option of that alert ,then where to handle this in code ...

Strange behaviour with AVAudioPlayer on the iPhone

I'm attempting to play a sound using AVAudioPlayer. Should be simple, but I'm seeing some odd results. Code: NSString *path = [[NSBundle mainBundle] pathForResource:@"pop" ofType:@"wav"]; NSURL *url = [NSURL fileURLWithPath:path]; AVAudioPlayer *sound = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil]; [sound play]; [sound r...

Custom TableViewCell indent issue

So I've got a custom tableviewcell set up with a NIB for the layout. Inside the cell I have 2 imageviews, and when I go to delete a record, both the images indent, and I can't figure out for the life of me how to stop them from doing it. Again, these are imageviews laid out in IB, not through a Rect. I know shouldIndentWhileEditingRow...

handle touchesBegan method for UITextField in UIScrollView

Hello, I have a situation here, I have to handle touchesBegan for textfield. This textfield is in scrollview. I tried this so far: I made a subclass of UIScrollView @interface CustomScrollView : UIScrollView { } @end @implementation CustomScrollView -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"good"...

How to call a scene from a UIviewController in Cocos -2d

I have problem when placing a UIViewcontroller over a menuScene. my UIviewcontroller(named "share") consists several button like submit,play again,main menu etc. But the problem is that as this UIviewcontroller class reside over menuScene sometimes clicking on UIViewController page execute menuScene menu like (startgame,help,credit etc...

how find position of CAlayer during animation?

I am implementing game application.In which i am using layer for animation. CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, NULL, previousValuex, previousValue); CGPathAddLineToPoint(path, NULL, valuex, value); previousValue=value; previousValuex=valuex; CAKeyframeAnimation *animation; animation =...

iPhone Optimal Stack Data Storage

I have a set of data that I need accessible insdie my iPhone app. The data is constant and currently in a simple CSV format. One of the columns could easily be used as a key in a dictionary but what is the most efficient way to have this const data accessible inside the app? I'm thinking instantiating and populating a NSDictionary at lau...

Viewing Ad-Hoc crash reports from an iPhone

I'm doing some beta testing. I've got a crash and trying to figure it out. If I connect the iPhone, I can see the Crash Report in the XCode organizer. So I see this (my app is called Lineskipper): Thread 0 Crashed: 0 libobjc.A.dylib 0x323fe6f4 0x323fc000 + 9972 1 UIKit 0x32ba205e 0x32b60000 ...

how to display specific dates in KCalander(Open Source)

hi ,All i want to use KCalander (which is Open Source on www.code.google.com) in my project but i want to allow select only one date from awailable dates (means every monday of limited time period/dates awailable for reservations) what am i want to display only that dates/day in KCalander. is that possible with the use of UIDatePicke...

What Am I Missing? : iPhone Objective-C NSInputStream initWithData

I'm creating an NSInputStream from an NSData object but once created the stream reports NO for hasBytesAvailable: NSData* data = [outputStream propertyForKey: NSStreamDataWrittenToMemoryStreamKey]; NSLog(@"creating stream with data 0x%x length %d", [data bytes], [data length]); NSInputStream *insrm = [[NSInputStream alloc] initWithDat...

How to increase picker view ( transformed pickerview ) width ?

Hi all, I am trying to scroll the picker view horizontally and this is my code. in viewDidLoad I did this, CGRect frame = horizontalPickerView.frame; frame.size.width = 50; frame.size.height = 216; frame.origin.x=90; frame.origin.y = 200; horizontalPickerView.frame = fra...

App that uses VPN on iPhone

Hello everyone I need to use the iPhone to write an application that communicates with a server app. It will either be Wifi (when close) or GPRS/etc when remote. The major requirement is for a secure connection. (So VPN was suggested) So basically I have 3 questions in the same sphere: 1. Is there VPN support in iPhones 2. Another way...

Compass Calibration problem

Hello All, How to get the Direction from Compass Calibration, i used core location framework and don't know how to get north direction from the function: - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading; if anybody knows help me to get the solution. ...

Dragging 1 of 52 cards in UIView. Which is a better method?

Hi people! Currently I have 52 cards UIImageViews in IB UIView. And my objective is to drag 1 of this 52 cards into a Square, and if the the card is dropped into the Square, it will stay there. Otherwise, it will snap back it's original position. MY question is which is a better method? Creating a custom class NSObject and changing e...