iphone

iPhone database migration times out

I have an iphone app that allows you to download map tiles, which are stored in a core-data sqlite database. I'd previously set up database migration using momd, following this guide - http://iphonedevelopment.blogspot.com/2009/09/core-data-migration-problems.html That all works perfect when testing upgrading, when I have small amounts ...

iPhone SDK - How to disable the picture preview in UIImagePickerController?

Is there any way to disable the image preview after taking a picture with the UIImagePickerController? I want to dismiss the ImagePicker as soon as the user pressed the shutter release button. ...

Selecting row while UITableView is in editing mode

I have a UITableView where when I put it in editing mode, I want selective rows to be selectable, however, they are not. Is there a way I can force them to be selectable? ...

Where does this code leak?

Instruments is telling me that this code leaks. Where? Do I have to release conn? - (void)loadFeatureXML:(id<BPLFeatureLoaderDelegate>)delegate { _delegate = delegate; NSURLConnection *conn; NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.myxmlfeed"]]; if ([NSURLConnection can...

How to test UIViewControllers at build time?

I'm a big believer in testing, but not a very good practitioner. I've done pretty well at getting coverage on my model objects and programming them in a TDD style. I'm actually enjoying it so much I'd love to extend this to my controller layer, particularly my UIViewController subclasses. Unfortunately, many UIKit classes don't function...

iphone Animation: why does rotating a UILabel around X axis cut off its bottom half?

I want to rotate a UILabel around the X axis, and animating it. But when the animation starts, the text of the label is cut in two, horizontally. The bottom half disappears, the upper half is rotating. Why? Here's the code: CATransform3D _3Dt = CATransform3DMakeRotation(radians(90.0f), 1.0, 0.0, 0.0); CABasicAnimation *transformAnimat...

How to customize iPhone UISlider control at runtime - where do I place the color update code?

I have added a UISlider control to an iPhone View-based application and have wired up a text field that gets the values from the slider. To fit with the user interface colors in the application I need to change the color of the slider. With a little googling I was able to find 2 samples which do this (http://blog.hill-it.be/post/2009/03...

sending messages across views

I need to tell a uitableview to reloadData when something happens on another view (or at least that is what I think I need to do) how do I do it?? the uitableview is just an IBOutlet of a uitableviewcontroller object. more details: So i have an array of data as kind of a database and a user creates objects to populate the database on v...

Shorter way to write this code?

I know how to make all these uiimageviews disappear and come back again, but I don't know how to write this shorter. They are all assigned unique tags 1-35. I want to check if ALL of them are hidden and then perform an action. if(test.hidden==YES && test2.hidden==YES && test3.hidden==YES && test4.hidden==YES ...

How would I know iPhone is moving?

Hi, Is there any way to find, iPhone movement?. I need to know if iPhone is still i.e its not moving then do some thing or else if iPhone is moving(in vertical or horizontal direction) do some logic. Do I need to read accelerometer didAccelerate method. Or there is some other way like reading current location (lat/log) values. [I DON...

how can i retrieve the text data from sqlite datadase in objective-c ?

i am using this -(void) Data { databaseName = @"List.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [documentPaths objectAtIndex:0]; databasePath =[documentsDir stringByAppendingPathComponent:databaseName]; [self ch...

is it possible to resolve Plugin file not found on iPhone?

how can i fix this warning? warning: Unable to read symbols for "/XcodeBeta/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/Internet Plug-Ins/QuickTime Plugin.webplugin/QuickTime Plugin" (file not found). ...

Encrypt nsdata in iphone and decrypt it in php

Hi All, I am new to Iphone development , I want to create an application in which I have to upload some data on php server using my Iphone application. For this I have an file on the Iphone whose content I have to upload on php server. For this I have converted the content of the file in NSData and now I want to encrypt this nsdata obje...

Send UIWebView title to UINavigationBar

Hi I have looked everywhere but nothing as help, I am trying to send the UIWebView page Title to UINavigationBar. I would also like it if a user clicks on a link the UINavigationBar shows a back button but if on the home page hide the back button. If you can help that would be very nice ...

How to publish the content in facebook of iphone

hi, I am new to iphone development.I have created facebook application and i have displayed the login page and publish page. now i want to share my content(title and summary) display dynamically. i dont know how to give the contents dynamically, Here my code and display statically, it will published. but i want to give my contents d...

Linking Errors setting up GTM to do iPhone Unit Tests

My colleague and I have been struggling with unit tests now for weeks. We have tried to get SenTest, GTM, and other frameworks set up, but we can never get past a gnarly ball of linking errors. Here's where I am now with GTM. I would appreciate any guidance. Beyond helping out on SO, if you have experience with this, I'd happily pay a ...

How to create a view hierarchy programmatically without using a nib ?

Hi guys. How to create a view hierarchy programmatically without using a nib ? Thanks in advance. ...

How to print the date in iphone?

I am new to iphone development.I am having array of date .I want to print the date in my console.But I didn't want to convert it into a string and print it.I want to print as a date.How can i achieve that.Please help me out thanks. ...

How to avoid unrecognised selector sent to NSCFArray sortUsingDescriptor: in iphone?

I am new to iphone development .I am trying to sort a NSMutable array with reference to the date which is saved as object for the key "pubDate".After parsing the url i am saving the date as date format in an array"myPubDate". (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{ //NSLog(@"found characters: %@", string)...

How to avoid "NSInternalInconsistencyException" in iphone?

I am new to iphone development.I am sorting an mutable array. For sorting NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"pubDate" ascending:NO]; [recent sortUsingDescriptors:[NSArray arrayWithObjects:descriptor, nil]]; recent1 = [recent sortedArrayUsingDescriptors:descriptor]; [descriptor release]; I am gett...