iphone

playing a .caf file: works fine in simulator but not in iPhone

Hi, I'm building a voice recorder. Recoding and playing works fine on simulator. But on iphone it doesn't work. (I followed the exact steps as mentioned in iPhoneOSProgrammingGuide/AudioandVideoTechnologies) printf("%s(player)\n",[[self.soundFileURL absoluteString] UTF8String]); AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] ...

Recreating UIView.frame to move it

I have a UIImageView object created in IB, and has an outlet. I want to move it, but only change the y value, so I have: CGFloat x, w, h; x = image.frame.origin.x; w = image.frame.size.width; h = image.frame.size.height; image.frame = CGRectMake(x, /*formula to figure out new y value*/, w, h); When this runs, the image simply disappea...

find out the force in iPhone

I have to develop an application. Requirement is given below. I have to put an indicator like speedometer in the bike. iPhone is put in the corner of a Car. The iPhone is in a placed in a car, from where it can't be dropped anywhere and can't be moved even. ( there is a special place in car where user place iPhone ) Now, Car is going...

Xcode 3.2 in Snow Leopard hangs running unit tests

So I have some unit tests that pass in Xcode 3.1 / Leopard. These use SenTestingKit in an iPhone app project and are built/run in a separate "Test" target. I just upgraded to Xcode 3.2 on Snow Leopard and the tests seem to run (I get logs in Console.app and see them passing), but Xcode beachballs and must be force quit'd after they are r...

iPhone SDK: [cell.contentView viewWithTag:1] or [cell viewWithTag:1]?

I am not sure which one to use? cell.contentView sometimes give me weird errors like [uiview settext]...?? I was trying to setText to a UILabel* ...

iphone sdk: Can't reuse cell with viewWithTag (can not setText to reused labels)

This is my cellForRowAtIndexPath function. I could not get the setText to the label to work. Can you please help me out? // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UILabel *messag...

Testing View Controllers --iPhone

My question is 2-fold. 1. Can I use OCUnit to test View Controllers. If so, how should I do it? If not, is there another Testing Kit I can use? ...

awakeFromNib opposite?

Is there a reverse of awakeFromNib, a method called when the nib is closed? I know an application delegates receive a notification the the application will terminate, but was wondering if there was to save some state information on a simple NSObject. ...

Iphone Search Bar clear button crashing app

I'm working on an iPhone app with a search function, where writing search terms in a UISearchBar changes (filters) the output of the UITabelView below. When user is editing the content of the search bar and deletes all of the text, the following code is executed in - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)se...

What dpi resolution is used for an iPhone App ?

I am working on a template for an iPhone App and was wondering what dpi resolution is used for it ? 300 or 72 ? I am not sure and I hope somebody can answer me that question. thanks in advance farid ...

Error in xcode project: ld: library not found for -lcrt1.10.6.o

Just upgraded to Snow Leopard, installed Xcode 3.2, then installed iPhone SDK 3 for SL. In a project, I now get the following error on build: ld: library not found for -lcrt1.10.6.o I've searched around the net, but nothing helpful can be found. ...

MKMapView setRegion: odd behavior?

I'm working on a 3-tabbed iPhone app., where I want each tab's view to look like it shares the same map. So at the moment, I'm just trying to figure out how to reset each view's MKMapView's region when one clicks on a new tab. [In other words, if you're on tab 1 and zoomed all the way in on a spot, then click on tab 2, I want it to sho...

app keeps crashing

So i'm almost done creating my iphone app but it keeps crashing. Here are the crash report and the plist. Not sure which one you guys need to help me out on why it keeps crashing.... plist: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; <p...

Can an XCode static library require linkage with a dynamic library?

I have created a static library in XCode that requires several dynamic libraries (e.g. libsqlite3.0.dylib). I can create an application that is dependent upon my static library using cross-project references in XCode, but it seems that I have to manually add all of the required dynamic libraries to each of my application projects to get...

iphone tab bar controller and core data.

Ok bit of a newbie type question. I want to use Core Data, together with Tab and Navigation controllers. In XCode if I create a Navigation Based Application I get the option to choose Core Data. Whereas If I create a Tab Bar Application I don't get the choice. I understand that Tab Bars display view controllers so it kinda makes sen...

Possible to use iPhoneSimulators framework in a Cocoa App?

I am toying with the idea of creating a iPhone UI editor that isn't Interface Builder! Mostly to see if it is possible to do... I have been able to link to the UIKit.framework in a Cocoa app that I have created by dynamically loading it (via NSBundle functionality). I have been able to instantiate an UIView from there. Now the question i...

NSManagedObject subclass outside of managed object as a normal object

Hi all, I have an entity object Country with country name and country code. It is a subclass of NSManagedObject and I am using it with core data model to store its value to a persistent store. I have a place where the same Country object will used as a normal object i.e. I will use it to store some temporary country name. For that I ...

How to remove CoreData's objects from memory?

I use CoreData to store image data that user took from iPhone's Camera. Over time, the memory consumed by these objects keep increasing, but I don't know how to clear those objects from the memory. How should this be done? ...

How do I choose the correct view for zooming with multiple UIScrollView objects in a view (iPhoneSDK obj-C)?

I have added several UIScrollViews as subviews of a single UIView and set the frames so that each one is clearly visable. I set scrollEnabled to YES and set the contentSize larger than the bounds/frame. I do this in a for loop, and with each pass of the loop I release the UIScrollView (though the object is still stored because it has bee...

disable autofocus feature in iPhone 3G S

I want to disable the auto focus feature in the iPhone 3G S. How i can do it programmatically? I used custom UIImagePickerController for my camera application. I don't need this feature in my application. please help me. ...