ios

MPMoviePlayerController - Controls are not aligned

Hi @all, My iPhone app (created under iOS2), has a strange behavior. The left arrow is not aligned with other controls (on both iOS3 and 4) My other apps work fine... Does someone have any idea ? Update : That bug appear with all iPhone in my company, and in all iPhone in my customer's company (both compiled on many computers or ...

How to append drawings to existing CGLayer effectively

Hi, I'm working on a drawing app. Currently all the user's drawings are drawn into separate CALayers. To improve the responsiveness of freehand drawing when the CALayer's path gets large, I am caching parts of the path at regular intervals in a CGLayer. The following code shows how I have implemented this within the CALayer's drawInCont...

Keyboard won't dismiss when popover closes on iOS 3.2

- (BOOL)popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController { [self dismissFirstResponder]; return YES; } -(void)dismissFirstResponder { [nameField resignFirstResponder]; [descriptionField resignFirstResponder]; [helpField resignFirstResponder]; } I have tried loads of different things,...

iOS Keychain Security

we want to use certificates on the iPhone to authenticate for MS Exchange Sync. We are not sure how the security concept is implemented to protect this certificates. e.g. is it possible to get "full" Keychain access on the iPhone if no ScreenLock is enabled? (or with an Jailbroken iPhone). Does anybody has some links about this? ...

Managing resources and keeping them out of version control.

My iPhone app will have a map with about 10 points on it. It will play sound files based on the proximity to those points. What's the best way of managing these resources? Coordinates and accompanying sound file could be stored in a plist, as an array of dicts with latitude, longitude and file name. Then the sound files could be store...

Can I use NSDateFormatter to convert this date string to an NSDate?

I have this string... 2010-08-24T16:00:00-05:00 and I'd like to extract the time portion from it (i.e. 16:00) and convert it to its 12-hour equivalent (i.e. 04:00 pm). I'm trying to use NSDateFormatter to accomplish this, but it's not working... NSDateFormatter* dateformatter = [[NSDateFormatter alloc] init]; [dateformatter setDateF...

Native JSON support in iOS?

Is there a class to parse JSON from a server in the iOS SDK? (similar to NSXML for XML and by extension RSS.) ...

MPMoviePlayerController Stack Overflow

I'm trying to use MPMoviePlayerController in a fairly simple iPhone app. The basic layout is an UIApplicationDelegate associated with a UIWindow xib file. Within the "applicationDidFinishLaunching" method, I'm trying to play a movie with the following code: // Path to the movie NSString *path = [[NSBundle mainBundle] pathForResource:@...

How to create UIImageView with image from a link?

How to create UIImageView with image from a link like this http://img.abc.com/noPhoto4530.gif? Anybody can help me? :( ...

How do I persist CLLocation between app launches?

Hi there, I want to persist 2 CLLocations between app launches. This is the ONLY data I want stored in memory between launches. How do I go about doing this? Does CLLocation have a writetofile or store it in coredata or NSUserDefaults? I want to store the whole CLLocation object, don't want to store only lat/lon and then do more calculat...

What are good techniques for high performance full screen bit-blitting on iOS?

Assume I want to program a Star Field animation. Not by using OpenGL but by drawing directly to the screen buffer or to off-screen buffers that can be placed on screen. That Star Field demo running on the TRS-80 is of course just an example. Think video decoding or full-screen animations as other possibilities where rates of 20+ frames ...

can i send sms in my phone ? programically~!

Hi there i'm a newbee of iphone os sdk my question is that can i send sms in my phone ? programically~! yesterday, i found a example code and coded it. but the code gave me a sms dialog ( Internal sms program ). i just want to send sms programically without the interanl sms program is there any example code? thanks in advance ~! ...

oraganizing projects and utility classes

I have some Utility Classes. Developed them for one project, but going to re-use them in others. What is the best way to organize this - avoiding copy and paste etc. Should I build one project with just the utility classes and make the actual "Product Projects" depended on this "utility project" ? ...

Simple http post example in xcode?

Hi, I have a php webpage that requires a login (userid & password). I have the user enter the information into the app just fine.. but I need an example on how to do a POST command to a website. The apple example on the support site is rather complicated showing a picture upload.. mine should be simpler.. I just want to post 2 lines of ...

WebDAV Server for Cocoa iPhone and iPad running iOS

I'm looking for a WebDAV server - best Open Source - for iPhone and iPad for integration in my app. It should be possible to list, download and upload files. I would like to point the server root on the 'Documents' folder of my app, so the methods should be mapped directly to the file system if possible. On my search through the interne...

UITapGestureRecognizer only working for items visible on stage at initialization

So, I iterate through a loop and create UIViews which contain UIImageViews (So that I can selectively show any given part). These UIViews are all stored in a UIScrollView. I add gesture recognizers to the UIViews in the loop where I created them. When I run the program, only the items initially visible within the UIScrollView have thei...

How do you create a Set of Entities which all have Relations to other Entities with Specific Attributes? In Core Data.

I've got a Core Data entity called "Card" which has a relationship "info" to another entity, "CardInfo". It's a one-to-many relationship: each card can have multiple CardInfos, but each CardInfo only has one Card. The CardInfo entity just has two strings, "cardKey" and "cardValue". The object is to allow for arbitrary input of data for ...

Core Location Manager Prompt/Alert problem

I have come across an interesting problem which I am unable to debug. My application is using core location services and works fine in both the simulator and on the device once location services are enabled. I have tested it by manually toggling the permission in the settings pane. However for some reason when the user has not set any...

How to identify sender's ip address of a udp packet received on iOS device?

How to find out the sender's ip address of a udp packet that was received on a device running iOS 3.2 or higher? For example, if using Python on a computer, I'd use SocketServer.UDPServer which takes a subclass of SocketServer.BaseRequestHandler which defines the handle callback. When a packet arrives, the callback is called and the se...

Can I proactively close my iOS app?

There are some rare data-corruption circumstances where rather than attempt a recovery in the same session, I'd like to perform some fixes and then shutdown the app so the next launch will be safe. Short of hard crashing the app with something dumb like *(unsigned int *)0 = 0xDEADBEEF, I can't find an API in Cocoa that causes a graceful...