iphone

OpenGL gradient fill on iPhone looks striped

Hi! When I draw a gradient fill with OpenGL, the output looks striped, i.e. it's rendered with only about the a fourth of the possible colors. In the render buffer all the colors appear but not in the actual output. I'm developing on iPhone 3G running iOS4. Any ideas? Peter ========== ========== GLint redBits, greenBits, blueBi...

how to scroll page left and right with user touch iphone

Hi all, in an Iphone app, I am in need of building a page that scroll left and right by user touch. Much like the built-in weather application already existing in every iphone/ipod, but I am not interested in having a page control. The left and right scrolling is like a sort of history browsing. Moving the finger left and right, I can ...

add and remove subview in code block doesn't animate

I have this code for flashing an image on a map as a part of MKAnnotationView: UIView* containerView = [mapView viewForAnnotation:enemy]; UIImageView* redCircle = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Red_half_circle.png"]]; [UIView transitionWithView:containerView duration:2.9 ...

Whats the difference between armv6 and i386?

I am trying to link libssh2.dylib (a 3rd party library compiled by Matthew Wilkinson using libssh2 library from http://www.libssh2.org) to my xcode project but when I try the following code: const char * libssh2_version(int required_version); printf("libssh2 version: %s", libssh2_version(0) ); Heres the error I get: ld: warning: in...

App works on iPhone device, but not on Simulator

So I tried to add OpenFeint to my Cocos2D game, didn't work (I have no idea why), so I removed everything I added. Now my game (that worked perfectly before) is working on my iPhone device, but crashing on simulator. When debugging I get "EXC_ARITHMETIC" on line: int retVal = UIApplicationMain(argc, argv, nil, @"APPNAMEAppDelegate"); ...

AudioServicesPlaySystemSound vibration works but not sound

AudioServicesPlaySystemSound doesn't do anything but AudioServicesPlayAlertSound makes the iPhone vibrate. AudioServicesCreateSystemSoundID returns success. I'm developing on iPhone3G running iOS4. Any ideas? Peter ===== Here's how I create the sound: NSString *sndPath = [[NSBundle mainBundle] pathForResource:@"first_touch" ofType:@...

iPhone CoreData migration fails with "Can't find model for source store"

I have an iPhone app that is using CoreData. I recently made some minor changes to the data model and now every time the app is opened I get an error "Can't find model for source store". I have 2 version of the data model and the only changes I've made were some additions of some fields. I was following the guide here which worked initi...

Add to Home Screen Web App Problem

Whenever I add my webapp to the home screen and click on a link, it takes the user out of the web app and into Safari. The link is a home button, it takes the user back to the home page. The home page works fine, but it only leaves the app when I click the home button. The web app works fine on my Mac. Here is the code: <a href="<?php e...

Retaining the value in multiple object creation

I want to keep the value of a variable in my multiple class instances... Here is what I am doing: 1. Declaring a class level variable. 2. Setting it in inside one of my function during first initialization 3. Trying to fetch this during next object creation. Here, I am not able to retain the value. Any clue? I have this variable define...

Different behaviour on iPhone and iPad

I have a UITextView for which I want left/right/top/bottom content margins and the code I used is: // Set the paddings UIEdgeInsets aUIEdge = [aTextView contentInset]; aUIEdge.left = 15; aUIEdge.right = 15; aUIEdge.top = 10; aUIEdge.bottom = 10; aTextView.contentInset = aUIEdge; But this gives me correct output in iPhone and not in i...

iphone & rest web service - what is the best practice?

I am developing an iphone app that uses a php web service for all functionalities. I am planning on creating model objects to communication between my UI and web service. Is it better to create model classes on php to communicate between my iphone models and database? or is it ok to communicate directly from database to my model classes...

best plotting library for iOS sdk

What is the best plotting library for the iPhone's iOS SDK? I tried out core plot but looks like it's still pretty unstable. Any help would be appreciated. ...

testing ocr for iphone but not working

i am using ocr code but i am not getting any value while scanning value of cc and text are void means i cant see any output what i am doing wrong here?? - (NSString *) ocrImage: (UIImage *) uiImage { //code from http://robertcarlsen.net/2009/12/06/ocr-on-iphone-demo-1043 CGSize imageSize = [uiImage size]; double bytes_per_line = C...

iPhone - how can this code leak???

very simple code, but leaks as hell... check it out. - (void)loadView { NSString * myTitle = @"HELLO"; NSString * message = @"\nThis stuff is leaking!\n"; NSString * cancelButton = @"Dismiss"; NSString * otherTitles = nil; [self showAlert: myTitle : message: cancelButton : otherTitles]; } - (void) showAlert: (NS...

Are there any iPhone/iPad tools for rapid development of catalogs?

A number of apps I build are catalogs. Consider this website that showcases housing http://www.zuccalahomes.com.au/search.php I get a number of requests to build iPhone/iPad apps that have a search system that effectively displays data like this in the app. Users search, click on results, see some images etc Most of the apps need to lo...

Rejecting an app that is Pending Developer Release

I have an update to my app that has been reviewed and is pending developer release. I have found a bug in this version and would actually like to reject this binary and keep my existing binary. Once I fix the bug, I would like to re-upload a new binary. Is this possible? ...

play the sound from mic using the AUGraph

hi guys, when i'am using the AUGraph to realize playing sound from the mic, i have a problem, in the device(iphone 3g), i can only hear from the right side of the headset, but it is well in the simulator, i can hear from both of the side of the headset. here are the code i use to connect the input to the output: AUGraphConnectNodeInp...

Why use TT_RELEASE_SAFELY in three20 for iPhone?

#define TT_RELEASE_SAFELY(__POINTER) { [__POINTER release]; __POINTER = nil; } Why is does three20 consider it safe to assign an ivar to nil after releasing it? Is it unsafe to leave out the ivar = nil step? This is all I found: http://github.com/facebook/three20/commit/1b946f475fb28d60e0aafc9ef394050c642c3a5b#commitcomment-115517 I ...

iPhone MapKit Framework to cache Google map for offline use

I am planning on a map project for hiking on iPhone. Since the area for hiking may not be covered by mobile network. Therefore, it is necessary to pre-cache the map (Google) of the area. 1) Can MapKit Framework support caching Google Map on iPhone locally ? 2) Can MapKit Framework support to use offline map during GPS-ing ? Thanks. ...

Problem accessing bounds on multiple UIAlertViews

I'm using UIAlertViews to display specific in-app messages and occasionally my app shows multiple alerts. The problem comes when I am attempting to access the bounds of the alerts. Here is some code to illustrate the problem. This is put in a brand new View-based app: - (void)viewDidLoad { [super viewDidLoad]; [self makeAl...