iphone-sdk-3.0

How to create PDF document using iPhone SDK? [duplicate]

↘锁芯ラ 提交于 2019-11-30 15:53:14
问题 This question already has answers here : iOS SDK - Programmatically generate a PDF file (4 answers) Closed 6 years ago . How to create PDF document using iPhone SDK? Any tutorials and examples to do this would be helpful. Thanks! 回答1: Quartz 2D Apple tutorial http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html#//apple_ref/doc/uid/TP30001066-CH214-TPXREF101 回答2: Theres a great open source api for creating PDFs. You can add

I cannot get in app purchase test to work

左心房为你撑大大i 提交于 2019-11-30 15:21:39
I have had zero success with in app purchase. I have submitted the free app binary, and then rejected the binary. I have added the test product. I have approved the test product TAP001. I have followed the code examples to no avail. I do a SKProducts request using both "com.companyname.appid.TAP001" and just "TAP001" Regardless, I get an empty response.products and response.invalidProductIdentifiers with the product string I sent. I created a test user, but seeing how I cannot get any product info, the test user doesn't really come into play yet. Can in app purchase be tested in debug or

iPhone - Move object along touch and drag path

旧城冷巷雨未停 提交于 2019-11-30 14:18:10
问题 I am developing a simple animation where an UIImageView moves along a UIBezierPath , now I want to provide user interation to the moving UIImageView so that user can guide the UIImageView by touching the UIImageView and drag the UIImageview around the screen. 回答1: So you want the user to be able to touch an image in the middle of a keyframe animation along a curved path, and drag it to a different location? What do you want to happen to the animation at that point? You have multiple

ABAddressBookCopyArrayOfAllPeople and ABAddressBookGetPersonCount return different sizes

自古美人都是妖i 提交于 2019-11-30 14:11:37
I have an app which crashes occasionally due to the array returned by ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering() having a different size to ABAddressBookGetPersonCount(). The shell of the code is shown below. Usually nPeople is the same size as the array. However, on one user's iPhone (or at least, as reported by one user), nPeople is almost twice as large. I can stop the crash by using the array size, rather than ABAddressBookGetPersonCount(). However, I am not sure if this means I am not accessing all of the Contacts in the iPhone. Has anyone come across this issue before?

How can UISearchDisplayController autorelease cause crash in a different view controller?

微笑、不失礼 提交于 2019-11-30 13:56:16
问题 I have two view controllers A and B. From A, I navigate to view controller B as follows: // in View Controller A // navigateToB method -(void) navigateToB { BViewController *bViewController = [[BViewController alloc] initWithNibName: @"BView" bundle:nil]; bViewController.bProperty1 = SOME_STRING_CONSTANT; bViewController.title = @"A TITLE OF A VC's CHOOSING"; [self.navigationController pushViewController: bViewController animated:YES]; [bViewController release]; //<----- releasing 0x406c1e0 }

Out-Of-Memory while doing Core Data migration

微笑、不失礼 提交于 2019-11-30 13:30:18
问题 I'm migrating a CoreData model between two versions of an application. I was storing binary data as blobs in the previous version and I want to take them out of the blobs for performance. My issue is that during the migration it seems that Core Data loads everything into memory which leads to Low Memory Warnings and then to my app being killed. Apple documentation suggests the following : http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles

Getting an NSArray of a single attribute from an NSArray

℡╲_俬逩灬. 提交于 2019-11-30 13:05:25
I am facing a very regular scenario. I have an NSArray which has object of a custom type, say Person. The Person class has the attributes: firstName, lastName and age. How can I get an NSArray containing only one attribute from the NSArray having Person objects? Something like: NSArray *people; NSArray *firstNames = [people getArrayOfAttribute:@"firstName" andType:Person.Class] I have a solution of writing a for loop and fill in the firstNames array but I don't want to do that. NSArray will handle this for you using KVC NSArray *people ...; NSArray *firstName = [people valueForKey:@"firstName"

Adjusting the positions of the labels in a UITableViewCell

久未见 提交于 2019-11-30 13:00:26
问题 I'm using a UITableViewCell with UITableViewCellStyleSubtitle. However, because of the background image I'm using for the cell, I don't like where the detailTextLabel is going. I want to move it and resize it within the cell, but nothing I try seems to work. CGRect currRect = cell.detailTextLabel.frame; cell.detailTextLabel.frame = CGRectMake(currRect.origin.x + 20, currRect.origin.y, currRect.size.width - 40, currRect.size.height); I tried putting this code into both tableView

how to show countdown on uilabel in iphone?

南笙酒味 提交于 2019-11-30 12:16:31
问题 i have a uilabel and a uislider on a view. i want to set label's time using slider.range of slider is 00:00:00 to 03:00:00. means 3 hours.and intervel on slider is 0.5 minutes.also how to show.i want the timer runs even if application is closed. 回答1: First off, there's no way to keep the timer running after your app is closed. Background apps simply aren't allowed on the iPhone. There are ways to fake it with a timer (save a timestamp when the app exits, and check it against the time when it

iPhone p2p - Is there a way to connect to more than 1 devices?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 11:38:53
问题 Is it possible to connect to more than 1 devices using the new GameKit framework? Till now all the examples I've seen show how we can connect to 1 device. Even the default connection interface lets the user select just one connect. Thanks. 回答1: There's a fairly good overview here at the following link of how to configure and use GameKit for your App. GameKit Programming Guide: Peer-to-Peer Connectivity Unfortunately, you will not be able to use the GKPeerPickerController standard UI picker to