iphone

Iphone View origin changes after presentModal

Hi, In my application i present a UIImagePicker. When i dismiss this modal, my rootView goes from origin.x=5 to origin.x=0. Does somebody knows why my view will automatically changes the origin when i dismiss or present my modalViewController? I tried resetting the origin in viewDidAppear and viewWillAppear, but no luck. If i change t...

iPhone - Any way to set different Default.png per target?

Hi I have two target builds in my iPhone app project, and I want to build each one with a different Default.png for the load screen. At the moment I am having to place the file with the correct name in the project folder, build, then swap it out with a different one and build the other target. Is there an easier way? Thanks ...

How to convert xml to sqlite

Hey guys I have a xml file that has a lot of info that I would like it to be in sqlite tables. I am wondering if there's any tool, app to transform xml to sqlite. By the way I am on OS X and I need the info for an iPhone app, so I can also take scripts or some source code to make the trasmformation. Best Regards. Carlos Vargas ...

section uitable by current date?

hey everyone, i want the user to input a row into the table...and the row to automatically make a table section for the day it was added and keep it in order by day.. aka the user added a row to the table today...put it under feb 22...tomorrow they will add another cell put it under create another section feb 23, and add the row to it...

tableview editing

hi i am working with iphone sdk and i need to know when there is a new item or when the user remove an item from the tableview because it is a 'drinks' section and if the user add or remove a drink, i need to show it in another view. thx ...

iPhone - Play resource mp3 with MPMusicPlayerController

Is it possible to play a resource mp3 file with the MPMusicPlayerController or do I need to use the AVAudioPlayer API? ...

iPhone: How to Determine Average Light/Dark of an Area of an UIImage

I need to place labels with a transparent background over a variable-content UIImage. Readability will vary significantly depending on the relationship between the color of the label's text and the color/luminosity of the area of the image displayed under the label. Since the image will be constantly changing, the color of the label's te...

Adding a UINavigationController to a tabbar application

I have a three view tab bar app the second view of which I want to contain a navigation controller. in the navcontroller the first/root view will be a custom uiview containing a uitableview that when you touch a cell will push another custom uiview in to disclose details about the touched cell. I have found the documentation on doing t...

UISwitch looks strange when added as accessoryView in UITableViewCell and the cell is selected !

Hi, I'm adding a UISwitch as accessoryView for my UITableViewCell, everything works fine excepts that when the user selects a row in the table; the UISwitch gets a very strange layout : Is that "Normal" ? I'm still running with SDK 3.0 (in case this is a bug in 3.0 but my searches didn't give me any hint regarding this). I've seen o...

What's the correct procedure for replacing an expired developer's certificate on an iPhone xCode project?

My iPhone developer certificate expired. I got a new one (developer_idendity.cer) but I'm not sure how to make my xcode project and my iPhone use it. I keep getting the Code Sign error: a valid provisioning profile matching the applications Identifier 'com.example.foo' could not be found. What's the procedure to follow when your devel...

Preventing cell reordering for particular cells in iPhone SDK

Hello! I have 2 sections in my UITableView. I want the 2nd section to be movable but the 1st section of cells not. Specifying canEditRowAtIndexPath and canMoveRowAtIndexPath doesn't help - the first section cells although not showing drag controls, they still change places if a cell from the 2nd section is dragged over. Is there a worka...

How to read crash log? How to find why the app crashes in system library? What means EXC_CRASH (SIGABRT)?

I got an crash logs from a customer to figure why my app crash on her iPhone. Here some info from crash log: Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x00000000, 0x00000000 Crashed Thread: 0 Stack trace for Thread 0 Thread 0 Crashed: 0 libSystem.B.dylib 0x3293f98c 0x328c1000 + 518540 1 libSystem.B.dy...

How can I add an image into a tableview "header"?

I have a tableview where I am displaying a list of data. I would like to have a logo instead of just text for the header portion of the view. The code below gives me just the text. Any ideas on how to get the image in there? (void)viewDidLoad { [super viewDidLoad]; self. = @"Videos"; ...

ASIHTTPRequest set timeout

Hi, How can I set the session timeout using ASIHTTPRequest ? Thanks ...

Three20's URL-based navigation + tab bar example?

Hi, I just found out how easy it is (or at least is supposed to be) to do state persistence with Three20 library. However, I am unable to figure out how to use the URL mapper with a tab bar (UITabBarController). The situation is this: I have four tabs and different controllers for them: FirstViewController, SecondViewController, Thir...

iPhone animations - animating one things causes other things to be animated

Hi there, I've animated moving a UIView as follows: CGRect rightPop = CGRectMake(167, 270, 142, 73); [UIView beginAnimations:nil context:NULL]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:0.4]; [rightToast setFrame:rightPop]; [UIView commitAnimations];...

Redraw UITableView after updating data

Hi I have a UITableview that I load with data async so the tableview might appear without data. I have tired the ReloadData method but the tableview remains empty until I scroll the tableview, suddenly the data appears. The same thing happens when I load a tableview as a detailedview and switching between items, the previoud items data a...

How to use Key Value Coding to Set Property Values in ABPerson

Given this key/value pair: FirstName = "Steve" I'd like to set the property of an ABPerson in the iPhone Address Book, like so: ABRecordSetValue(person, kABPersonFirstNameProperty, @"Steve", nil); The problem is, I won't always know what key is submitted. (It will be equivalent to a property constant without the "kABPerson" before it,...

Need help with memory leaks in RSS Reader

I'm trying to write a simple RSS reader for the iPhone, and it appeared to be working fine, until I started working with Instruments, and discovered my App is leaking massive amounts of memory. I'm using the NSXMLParser class to parse an RSS feed. My memory leaks appear to be originating from the overridden delegate methods: - (void)p...

iPhone SDK - UITextField subview of UITableCell gives drawing issues?

I'm adding some UITextFields, UITextViews and UIImageViews as subviews to a UITableCell. When I'm entering some text to the TextFields or TextViews and scroll the table up or down, I get some drawing issues. The text of every second field overlaps other fields like this: I'm creating the form elements like this: self.formFields =...