iphone

UIViewController background Image

How do I set the background image of my UIViewController? What is the code to do it? Right now I have self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image.jpg"]]; but I don't want a pattern. I want it to fill the screen properly. Thanks! ...

iOS4: how do you set a CGContext's transormation matrix to an absolute number?

I'm currently making a graphical application, and it will make my life a lot easier if I simply flip the context's transform matrix upside down whenever I want to draw something upside down, which is quite frequently. However, the only command I can find that supports this is CGContextScaleCTM. This is fine I guess, but it's an additive ...

playing a sound, waiting it to finish playing and continue (iphone)

Hi guys, i'm new with the iphone and objective c, so far, I have been able to code some small examples. i would like to play a sound and, continue with rest of the code when the sample finishes playing, i.e: printf("hello"); playASound["file.wav"]; printf("world"); actually i'm getting: print hello, play the file and print world at ...

NSClassFromString Case Insensitive Objective-C

I am attempting to instantiate classes from different XML sources. The cases of the class names are inconsistent (camel, upper, lower) across these sources. Does an equivalent to NSClassFromString exist for this? For example, something allowing for: Person *person = [[NSClassFromCaseInsensitiveString("Person") alloc] init]; Person *pers...

High Resolution iPhone Background

According to Apple's website, the iPhone 4 is 960-by-640-pixel resolution at 326 ppi. I made an image with these specs, however when I put it onto my iPhone as a background for one of my applications, it is way too big and you can only see the upper left corner of the image. How do I make it fit and how do I make a high resolution iPhone...

Modal View with Navigation Controller

Hi, still cannot figure out what I am doing wrong. Just trying to get a modal view with a navigation controller inside. Here is my project http://www.matthewpateman.com/New.zip Can anybody tell me what I am doing wrong? I want "ShopModalView.xib" to pop up in the navigation controller, but its just diplaying a blank page… ...

iPhone TableViewCell with dynamic height crashing.

I've been trying to create a TableViewCell consisting of 2 UILabels in the first row, and another UILabel in the second row. The layout of frames & labels works correctly in the simulator. However: 1) The height is not dynamically increasing / decreasing with each cell 2) The Table crashes whenever it is scrolled in the simulator Ca...

UITableView as Picker

I want to use a tableview as a picker. For example, when selecting a ringtone for a contact a tableview of ring tones appears. What is the ideal way to accomplish this? It seems like this would be very common. Thanks for your time. ...

ViewDidLoad not the right command

I can't seem to find what I am looking for in the Apple documentation. I am saving a simple string to an NSUserDefaults location and I want it to load that string into a UITextField in a view that I have already created. Everything is working great with the data persistence (it is saving and loading correctly) but it will only load the...

-[ClassRoster controllerWillChangeContent:]: message sent to deallocated instance

I know these errors are very app-specific and almost always due to over-releasing an object. I just can't spot it and the debugging tips I have read haven't done the trick for me yet. According to this debugging advice, my "offending object" was allocated in this code block (located in AddClass.m): - (void)tableView:(UITableView *)tab...

Universal app using way less memory on iPad vs iPhone

Hi, I have written a universal app that's working fine on both iPhone (iPod Touch) and the iPad. The only difference for either platform are the nib files and the launch page graphics. Both iPad and iPhone nib files have the same functionality, just the graphics, buttons and text are bigger on the iPad. When I run Instruments on both a...

AQXMLParser unable to parse byte-array?

I've a general question, I've been using NSXMLParser to parse a pretty large XML file containing byte array's of images sent from a web service to the iPhone. I tried switching to AQXMLParser to bring down the memory footprint however now I'm unable to decode my byte arrays in the same way. When parsing the URL I use foundCharacters t...

how to concatenate values to the string ..

i want to cancatenate strings with comma as a separator and result must be stored in string... comma=@","; for(i=0;i<[resources count];i++) { Record *aRecord = [resources objectAtIndex:i]; temp=aRecord.programID; if(i==0) pid=temp; else //i am using this one to cancatenate but is not working why? pi...

Zooming within pagingScrollView

A follow on from the question I asked yesterday. I have a paging scrollView that only pages in the y-axis. At the moment I have it working that I have an array of UIImageViews containing different UIImages and the photoScroller works as i'd expect but when I try to add the imageView as a subview of another scrollView to allow pinching a...

How can I convert a Universal iOS app to a stand-alone iPhone app?

Hello. I started building a Universal app and it turned out the design doesn't work well with the iPad, so I've decided to make it a stand-alone iPhone app instead. By that, I mean I'd like the app store to see my app as an iPhone app, not a Universal app. I was just about to create a new project and move my existing iPhone code over ...

iPhone SDK: how to properly handle errors of NSBundle resource loading?

I'm using NSBundle resources to load some media: NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:someValue ofType@"someType"]]; if there is no resource found, the url value, of course, remains valid and using it would cause application crash, so the simple check if(!url) { //or even (!mediaPlayer), or (url ...

Asynchronous Callbacks to Dismissed Viewcontrollers?

Have noticed issue while testing iphone app that if one quickly opens/dismisses a modal view which contains asynchronous http calls the app eventually freezes up with a EXC_BAD_ACCESS message. I'm relatively confident that there aren't any memory leaks in either the modal view or the viewcontroller that's launching it (at least none tha...

iphone bar code reading open source library?

can anyone send me the link for iphone bar code reading open source library? ...

making array data able to be favorited and loaded in a table

hello i have an array that features data in an array of arrays. its like the items in format root array rootArray = [[NSArray alloc] initWithObjects:@"1", @"2", nil]; i want to knw what action to give a uibutton in order to be able to change a boolean value to is_favorite for that cell and make it show in the favorite table. so i wan...

How can I make a box's edges smooth without anti-aliasing?

I'm creating a dice game for the iPhone. I'm using SIO2 as engine, but I think this question is more general OpenGL-related. Since the iPhone lacks support for anti-aliasing, my dice looks kind of edgy. If possible, I'd like to make the edges of the die rounded and smooth instead of sharp. I've found one app, MotionX, that manages to d...