iphone

UIScrollView Rotation

I have a scrollview that automatically generates a series of subviews containing imageviews. The concept is that it's pretty much a custom PDF style reader, where each page is loaded in to an imageview as an image. There are three "layers" - the outer UIScrollView, the automatically generated subViews and the imageview inside the subview...

Selector being performed when trying to set UITextField text

Hi, i'm trying to clear a UITextField whenever the UIControlEventEditingChanged event is being performed. However, when I set the text to nothing, the UIControlEventEditingChanged event is being called again, and this is the way it keeps going. This is my code: - (void)updateText { //other code textfield.text = @""; //othe...

applicationDidEnterBackground

this function is called automatically when quit application..but in my application this function cannot called automatically ...

AdvancedTableViewCells and UITabBar

Hi everyone, Very simple, but maybe difficult to answer question. How do you include an AdvancedTableViewCells (à la AppStore) inside a tab bar item? (Just like the App Store Top 25 tab bar item) Thanks for your help ! ...

How do you handle a UIPickerView in UI Automation iPhone application testing?

In the following UI Automation script code, I'm able to get the values from a UIPickerView, but I'm not able to select the picker: var picker = window.pickers(); UIALogger.logMessage("picker array count: " + picker.length); var pickerWheels = picker[0].wheels(); UIALogger.logMessage("picker Wheel count: " + pickerWheels.length); va...

iPhone, how do I toggle my Edit button for my debale with to Done and back to Edit ?

I've added my edit button self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:@selector(editNavButtonPressed)] autorelease]; But I don't seem to be able to turn it to Done and back, the console says its Null -(IBAction)editNavBut...

Iphone Sdk:Is it possible to use an UISwitch to enable and disable PNS(Push Notification Service) ?

I find some sample code about PNS,article here and I also create an UISwitch to enable PNS how to give a method to control the PNS ? This is how I declare cell cell.textLabel.text = @"PNS"; [cell.textLabel setTextColor:[UIColor grayColor]]; pushNotificationSwitch = [[[UISwitch alloc] initWithFrame:CGRectZero] autorelease]; [cel...

How do I change the product name within an Xcode project?

I have an application that I would like to be called IFrames. I've named all of the files appropriately (IFramesAppDelegate, etc.), but when I run it in ad hoc mode it shows up with the name "photoframes" instead. How did this happen and how do I change the name of the product to match the name I've provided for the project? ...

fuzzy pixel straddling when drawing in a CATiledLayer on iPhone 4

Hi, I'm drawing a line in a CATiledLayer using the following code: - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx { CGContextMoveToPoint(ctx, 130, 100.5); CGContextAddLineToPoint(ctx, 160, 100.5); CGContextSetRGBStrokeColor(ctx, 1, 0, 0, 1); CGContextSetRGBFillColor(ctx, 1, 0, 0, 1); CGContextDrawPath...

Why does the following code to play audio in the background not work?

I want to play audio in the background when I quit an application, but the following code does not appear to achieve this. What might I be doing wrong? - (void)applicationDidEnterBackground:(UIApplication *)application { printf("hello"); UIApplication *app = [UIApplication sharedApplication]; //beginBackgroundTaskWithE...

MailComposeViewController - when i press button "Cancel" i don't see the panel with "Draft" ,"Save Draft" and "Cancel" buttons

I am using the MFMailComposeViewController Controller like this: MFMailComposeViewController *picker1 = [[MFMailComposeViewController alloc] init]; picker1.mailComposeDelegate = self; [picker1 setSubject:@"I have a pencil for you"]; UIImage *roboPic = [UIImage imageNamed:@"RobotWithPencil.jpg"]; NSData *imageData = UIImageJPEGRepres...

Initialize a UIView in high resolution for iPhone 4

Hi All, How can i init a uiview to be in high resolution (640x960) on iphone4? i tried to put a scaleFactor of 2.0 to the uiview but that did nothing also how can i test that the device the app is running on accept high resolution ie. it is an iphone 4 thanks in advance, Benoit ...

Why can't I access the Back button in my iPhone application using a UI Automation script?

I have a simple function that should check if the view is at the home interface, and if not, bring it to the home: function returnHome() { if (UIATarget.localTarget().frontMostApp().navigationBar().name() == mainTitle) return true; // set tab bar to calculations UIALogger.logMessage("Set tab bar to main."); if (UIATarge...

OpenGL ES - How to Draw a filled Polygon?

Hello ! I tried googling and searching on stack but I didn't find anything :-( ( http://stackoverflow.com/questions/2842339/mapping-irregular-shapes-or-other-polygons-cartoons-sprites-to-triangles-in-op ) I want to draw a filled polygon in OpenGL ES on iPad (2D, don't need 3D) (I'm new to OpenGL && OpenGL ES) It seems simple on OpenGL ...

Sound manipulation reverse/playing recorded sound backwards on an iPhone

Hi everyone, I try to get my head around how to deal with some challenging requirements for my iPhone App. Requirements: 1. Record sound (voice of a person) 2. High quality 44100Mhz - 32 bit 3. Slow down playback (without pitching voice to high or to low!). however we would like to know how to do pitching/alter voice high and low as we...

iPhone gamecenter submitting highest score?

Hi, I am using below function to submit score to game center. How to modify below code so that i can send the score only if it is highest than already submitted score. And i dont want to maintain the scores locally. Any help? - (void) reportScore: (int64_t) score forCategory: (NSString*) category { GKScore *scoreReporter = [[[GKScore...

[How to] enable/disable cellular data settings through code - iphone(jailbroken)?

Hi All, I am working on a iphone(jailbroken) application, in which I need to enable/disable the cellular data service through some code. Now I am using a mobile substrate application to do that. But I need to know is it possible to access the iPhone Core Settings through code, if so please tell me how can I do that? Looking forward .. ...

iPhone app compatibility with iPad - Must I Support x2 Mode ?

Hi all, I have witten an iPhone game using Quartz 2d. It works fine all devices including the iPad, however when you use the "x2" magnifier on the iPad the game has major display problems. Do I have to make my game work with the x2 magnifier on the iPad - or can I somehow specify that it does not work with x2 mode ? Thanks in advance,...

Check APN on Iphone

Is it possible to know which APN is currently in use? ...

iPhone SDK: Button appears too stretched for iPhone app running on iPad

When I try to run my app on the iPad the buttons are too big. Below is two images One is of the app running on the iPHone sim. The other is the app running on the iPad sim. Notice the button in the iPad apps left hand corner. The button is too big. This is the code I use to create nav buttons. Any help appreciated. //add back bar but...