iphone-sdk-3.0

iPhone SDK and Multipage tiff

耗尽温柔 提交于 2019-12-01 13:18:22
问题 I need to access the iphone APIs to read a multipage TIFF image file format, dose anyone know how:, if not how can I build and use the open source libtiff on iphone/xcode. 回答1: I've created my own solution for this: NSTiffSplitter. You can find it on github. NSString *pathToImage = [[NSBundle mainBundle] pathForResource:@"Example" ofType:@"tiff"]; NSTiffSplitter* splitter = [[NSTiffSplitter alloc] initWithPathToImage:pathToImage]; UIImage *page = [[UIImage alloc] initWithData:[splitter

How to set iPhone Wallpaper Programmatically

不问归期 提交于 2019-12-01 13:08:13
I am developing an application in which I have to set image as the iPhone wallpaper (the background image on the "slide to unlock" screen). Do we have any API reference for this. Please help Thanks in advance Parmeswar Not presently, the only thing that you can do is save the image to the camera roll and give the user instructions on how to change their wallpaper using the new image. NSString *str_mainMenu = [[NSBundle mainBundle] pathForResource:@"Unlock" ofType:@"jpg"]; mainView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageWithContentsOfFile:str_mainMenu]]; 来源: https:/

How to call function in every “X” minute?

天涯浪子 提交于 2019-12-01 12:53:05
I was trying to make a sample iphone application to update current location. I have a function that logs the current location, "logCurrentLocation", but I have no idea how to call this function automatically in every X minutes( or seconds). Please advise me which method I need to look at in the apple documentation. Thank you for your help. sung. Check out the documentation for NSTimer. It allows you to schedule a timer which will call a function (defined by a "Target" object and a "Selector" you want to call). You can change the interval at which the timer fires, and it should do the trick! 来源

How do you change color/image on the default backBarButtonItem?

拜拜、爱过 提交于 2019-12-01 12:44:53
I need to change color on the default "self.navigationItem.backBarButtonItem". To accomplish this I´ve created an custom Button class and implemented it like this: - (void)viewDidLoad { [super viewDidLoad]; BackButton *blueSaveButton = [[BackButton alloc] init]; UIBarButtonItem *temporaryBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:blueSaveButton]; temporaryBarButtonItem.title = @"Tillbaka"; self.navigationItem.backBarButtonItem = temporaryBarButtonItem; [temporaryBarButtonItem release]; [blueSaveButton release]; [self gotoLocation]; } But this has no effect at all on the button

How I can access the call log/history of iPhone

耗尽温柔 提交于 2019-12-01 12:32:50
This is for jailbroken iPhone. Is there a way I can access the call_history.db on iPhone which is a database where apple logs the phone call information. It is stored at /private/var/mobile/Library/CallHistory directory. When I try to enumerate directory paths under /private/var/mobile/Library it does not list CallHistory folder but everything else. I guess Apple does allow access somehow despite of having all the permissions. Is there a way I can get access to call_history.db and copy it under my app? I have already gone through another stackoverflow question here Accessing the iPhone's Call

how to upload image dynamically on server?

那年仲夏 提交于 2019-12-01 12:32:14
In my application i want to upload the images to server. I am able to upload images on server but the name of the image mention in front of filename=%@.jpg. remains the same for images [body appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@.jpg\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; but i want to save the image on server with the same image name it has...... plz help me out. following is my code: -(IBAction)upload:(id)sender { //imageview is a UIImageView NSData *imageData = UIImageJPEGRepresentation(imageView.image, 100); //

Play sound with screen turned off / don't let iPhone go to sleep

风格不统一 提交于 2019-12-01 11:41:44
So I have an application and I want to keep it working even if the screen is turned off. Previously when I wanted to do that I used this hack/trick - I play a silent/empty sound in a loop in the background (AudioServicesPlaySystemSound) so if user presses the on/off button the application still works in the background - so it never allow iPhone to go to sleep mode - it just turned off the screen and maybe things like wifi or bluetooth (and on the iPod Touch accelerometers as far as I remember). And it worked. I wanted to use the same trick in my new application but when I was testing it now it

Try to integrate LinkedIn in iPhone application

混江龙づ霸主 提交于 2019-12-01 11:35:38
I have download the source from https://github.com/ResultsDirect/LinkedIn-iPhone . Demo working fine, and try to use in my application. I have followed all the steps already whatever required as mention here in post ... But I have getting the error "_OBJC_CLASS_$_RDLinkedInEngine", referenced from: "_OBJC_CLASS_$_RDLinkedInAuthorizationController", referenced from: When I comment the lines of RDLinkedInEngine and RDLinkedInAuthorizationController then error are removed - (void)loadView { [super loadView]; // rdEngine = [[RDLinkedInEngine engineWithConsumerKey:kOAuthConsumerKey consumerSecret

A TimeMachine taking my iDevice back to 3.1.2?

淺唱寂寞╮ 提交于 2019-12-01 11:14:22
My biggest headache now is find a iPhone 3Gs with iOS 3.1.2 on it. iPhone 3Gs is everywhere, but all of them are with iOS 4.1 or even higher. My question is, is it possible that I get a iPhone 3Gs (with iOS 4.x) and some software package so that I can restore it back to iOS 3.1.2? Btw by saying 3.1.2 I mean the official non-jailbreaking 3.1.2. Many thanks, Di You would have to have your SHSH's saved with Cydia, then you can downgrade to any version you like (that's supported). With that said, after downgrading, You could always not jailbreak, so it's a legit iOS 3.1.2, but you would have to be

Insert imagedata into MySQL database from XCode using PHP & JSON

一个人想着一个人 提交于 2019-12-01 11:12:03
问题 How to insert/store images in MySQL database from XCode via PHP using JSON? 回答1: From the xcode, you do: -(void) uploadImage: (UIImage *)image { NSData *imageData = UIImageJPEGRepresentation(image, 10); // setting up the URL to post to NSString *urlString = @"http://url.of.your.server/imagesupload.php"; // setting up the request object now NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@