iphone

iphone clipping a MyPicker : pickerview : uiview

Just checking to see if someone has done this before. I used to have ways to modify the size of a UIPickerView. But it seems that ever since iOS4.0 it seems to be locked. If I do the usual trickery and compile targeting 3.0 it works as usual. But this is for a free app with iAd so it's going to be an iOS4 only affair. So I'm thinking o...

removeFromSuperView is not working?

I am trying to use MikeJ's technique for loading images into a TableViewCell asynchronously. However, I am running into one issue. The images are loading okay for me, but when I scroll down the list, the cells that don't have the image loaded yet would have an erroneous image showing until the correct image is fetched. I have drilled dow...

NSURLRequest cannot handle HTTP body when method is not POST?

Whenever I set a body on a mutable request with the method set to anything other than POST, the body is not included in the request and I get a kCFErrorDomainCFNetwork error 303 (kCFErrorHTTPParseFailure) when the server replies. Changing the method to POST is all it takes for the request to go through with no error. Is there any way to ...

iPhone consumable product is behaving like a non-consumable product (already purchased...)

Our app has a list of locked products that share the same consumable product id (i.e. one consumable product id for many products). Our server provides me with a list of products and the product id associated with them: item name="itemA" iphoneProductId="consumable.test.1" item name="itemB" iphoneProductId="consumable.test.1" item nam...

UIDate Picker background color

HI I would like to change the background color of the UIDatePicker from the current glossy image to clear just like in this example Any ideas how to do that? I tried datepicker.backgroundColor = [UIColor clearColor]; but it didnt work. ...

NSLocalizedString seems to ignore regions unless there is nothing else. Is this true or am i doing something wrong?

For my localizable strings I currently have an en, fr and en_CA. It all works fine and well except when I'm trying to use the en_CA. I have it set right and it is even reporting the currentLocale is en_CA but it still seems to use the en's values instead of the en_CA's. Has anyone faced this before? Thanks! ...

Adding an image to my UIViewController

Hi, just a quick question here. How can I add an image to my UIViewController. Currently, my view controller has a couple labels and a couple buttons, but I have a file line.jpg that I'd like to add to this view controller as well. And I'd like to add it at a specific location (namely, at the center of the screen). How could I (meaning,...

DetailView empty on first click from UITableView

So I have a working diary app but with one problem. The UIViewTable is populated by Core Data and everything is good. But when I choose a row for the first time and open the detailView it is empty, if I back up and click again it is populated with Core Data info. I have narrowed the problem down to one method in RootViewController and t...

iPhone - Catch horizontal swipes -before- subview

I have a view, that is able to go back to the previous view. Let's say this is a questionnaire. So my main view is the questionnaireView(Controller), and it has a subview which shows a question with 2 possible answers. When one answers the question, one presses next, and the questionnaireView(Controller) shows the next question in that ...

Json Parser output display in tableview

I am trying to parse using JSON Parser and the result which i get i have to put it into table view. I've passed a constant key value and a string . Is there parsing steps wrong? or missed. I have included the code for the JSON parser. Thanks in advance. SBJSON *parser = [[SBJSON alloc] init]; NSString *urlString =[NSString stringWi...

How to implement a common base view for iPhone ?

All of my application's pages share the same layout and a set of UI elements, which I've been trying to make a reusable component out of. I've gone the subclassing road, making an "abstract" subclass of UIViewController to hold the base logic for navigation, and a nib file laying out the UI. I've spent some time unit-testing the base c...

multi viewcontroller and full screen

Hello everyone I have a project in which I prefer only display full screen mode in one viewcontroller's view. I used [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES] to hide the status bar in the sub view controller. The time display and battery icon disappeared, but there is a blank white block replaced statusb...

How to access the "Custom Content View" of a UINavigationController

Hello all, I have an app that uses a UINavigationController to control its flow, and I want to be able to dynamically swap views into and out of one of the pages in my app. The UINavigationController Reference from Apple's Docs shows this diagram outlining the structure of a UINavigationController. So my question is this: from within...

What's the simplest way to make all my controls in my root UIView scroll?

Hello. I have a ViewController that manages a view full of controls, including UITextViews, UIButtons, and a drawing view. It's far more than I can fit on the screen, but I'd like my design to have it all in one place and make the root view scrollable. I've become very spoiled with Interface Builder automating much of the coding work ...

Waiting on JQuery to finish .live() or .bind() bindings?

Hi, I have a script which adds click event handlers to about 500 elements in the page via JQuery .live or .bind (not decided which yet), and I am having a JQuery performance issue. With a small dataset, I can load the page and as soon as the page has finished loading according to the browser, I can click on something and off we go. ...

Can't hear System Sound in simulator or on device

Hi all, I can't seem to get the AudioServices sounds to play, either on the device or in the simulator. Here is my code: NSString *sndPath = [[NSBundle mainBundle] pathForResource:@"click" ofType:@"aiff"]; SystemSoundID soundID; AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:sndPath], &soundID); AudioServicesPlaySyst...

UIWebView Referencing Images/CSS from Documents to Resources

I know there are lots of other UIWebView local file related questions but I can't seem to find an answer to mine. I'm downloading an HTML document and a CSS document and both get saved in the Documents directory. I need to be able to load images from the Resources directory and the CSS from the Documents directory. So I've got differe...

How to record and Play back from Memory using Audio Queue Services

Hello all. I've been trying lately to make a game that allows the user to talk and afterwards play what he talked back in a funny voice. The catch is that the recording is done only when somebody talks near the iphone (I've managed this part I have a recorder active all the time and get it's average and peak values). The problem is wh...

Objective-C can't assign a NSInteger to an NSInteger variable!?

Hey everyone, This is going to seem like a really silly question but I can't figure out why I'm getting an error. I have an instance variable declared as: NSInteger *scopeSelected; I'm using this variable to keep track of what scope has been selected in a UISearchDisplay controller using: - (BOOL)searchDisplayController:(UISearchDi...

Force clockwise/anticlockwise rotation for a CABasicAnimation of a UIImageView

I'm animating a pendulum which swings from 0 degrees to max 200 degrees and then back again. The problem is that if the pendulum goes over 180 degrees, it returns to 0 by the shortest route which is to continue clockwise. And I'd like it to go anticlockwise. Here's my code: ('right' is a boolean which is TRUE when the pendulum is swingin...