iphone

didFinishPickingMediaWithInfo return nil photo

Hello, I am working to capture an image that is returned in 4.0 using - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [[picker parentViewController] dismissModalViewControllerAnimated:YES]; // MediaType can be kUTTypeImage or kUTTypeMovie. If it's a mo...

Expected specifier-qualifier-list before... Error in C++/Objective-C iPhone project

So I'm going through the first tutorial in O'Reilly's iPhone 3D Programming book. At this point in the tutorial, it pulls all the OpenGL ES stuff into a seperate c++ interface. I have followed the book to the letter, as far as I can tell, yet I can't seem to figure out this compiler error. I'm fairly new to C++ (mostly C# in the past), s...

*** attempt to pop an unknown autorelease pool

Does anyone know what this error means? * attempt to pop an unknown autorelease pool I am seeing this in my app that uses NSOperations in NSOperationQueue. Each operation has it's own Autorelease pool. Since each operation is parsing xml and pushing information into Core Data, I periodically 'drain' my autorelease pool and re-create i...

Mixed type iPhone project(navigation and opengl es)

I would like to have the menu part of my game a navigation style application, customized as I want. Then when the player starts the game it should load the game and run like an opengl es application. How is this done? is it 2 types of apps joined? Im thinking keeping all the xib files for the menus etc. but I am not sure how to connec...

How to create view from a nib file in xcode?

Hello I have the following code to create a view and put it in scrollview to allow paging the code works fine however what I couldn't do is loading views from a nib file in other words I want to use "initWithNibName" instead of "initWithFrame"? - (void)createPageWithColor:(UIColor *)color forPage:(int)page { UIView *new...

Building for lower version number for iPhone distribution

If I have built an app for 3.1.3 (using for instance the frameworks within the 3.1.3 folders) how do i then target a version below that (3.1.2) for the ad hoc and distribution builds? Do change the Base SDK in the Project Info (Distribution) settings or the Target Info (Distribution) settings? (I've always been unclear on the diff betwe...

Platform for develop on multi OS-Phone

I want develop on Android and iPhone... How Platform can i use? ...

Check if a C enum exists

How would I check that NSRegularExpressionSearch exists before using it? enum { NSCaseInsensitiveSearch = 1, NSLiteralSearch = 2, NSBackwardsSearch = 4, NSAnchoredSearch = 8, NSNumericSearch = 64, NSDiacriticInsensitiveSearch = 128, NSWidthInsensitiveSearch = 256, NSForcedOrderingSearch = 512, NSRegularExpressionSearch...

iOS 4 Build SDK

Hi, I installed the iOS 4 SDK yesterday. I previously had the 3.1.2, 3.1.3 and 3.2 SDKs installed. Since installing the iOS 4 SDK, I only have 3.2 and 4.0 available in Xcode. When I load an Xcode project that was targeting an older version (say 3.1.2), it says "Base SDK Missing" in the toolbar. I've been able to reset the project to ta...

Leaks in NSURLConnection

Hi, I have googled a lot and read a lot about the leaks issue with NSURLConnection, but none of them gives a definite answer as to what is the solution to overcome these leaks. I create an asynchronous connection and every time the connection is established, I get a GeneralBlock-3584 leak. Sometimes the responsible library is shown to b...

iPhone 4 - TabBar Icons

Hi, how can I set high qualitiy TabBarIcons so it will look nice on the new iPhone 4 ? Thx Sebastian ...

iphone have to hit back twice to get out of view

I have numerous buttons that go to different views on my main page and they all work the same way - they go the view and the area for the back button has the text of the title of the main page. Then on one view, it says "Back". When you click "Back" - the view stays the same but the back button text changes to the same as the rest with...

CABasicAnimation animates everything when it should only animate one thing

I made a bunch of little individual pictures, each with a separate CALayer, and they're supposed to fade in and out asynchronously at different rates. Each has a background sublayer and a fill sublayer. A timer runs in the background to animate each one individually at specific moments. For the current behavior of the program, rather ...

iPad rotation bug when using MPMoviePlayerViewController

Issue summary Changing the orientation of an iPad device or simulator while playing a video using MPMoviePlayerViewController results in an inconsistent rotation state upon dismissal of the video player. This is a known bug in iPad SDK 3.2, documented at http://www.openradar.me/8012810 Sample project I have prepared a minimal sample ...

How to rewrite text in an iPhone app

I'm having a problem refreshing text on a timer. I am displaying the current time and refreshing the screen every second. The problem I'm having is the old time doesn't get erased when the new time gets printed. Here is the function that displays the current time. - (void)drawRect:(CGRect)rect { CGPoint location = CGPointMake(10,...

iPhone shader profiling

I'm using a series of shaders to perform realtime image processing on the iPhone (3GS/4/iPad). The fps isn't what I'd like it to be. Are there any tools that I can use to help me work out what the bottlenecks are? ...

Gyroscope vs Accelerometer?

Now that iOS 4 is no longer NDA, I would like to know what Gyroscope has to offer over the Accelerometer for developers. Is there a difference in APIs? Other things? ...

Core Data save crashes

I have a Table View that fetches data from Core Data using FetchedResultsController and it registers for the data update. On a second thread, I download the data from the server and update the same data (that's used by the Table View). The update is not complicated: it is just updating a BOOL field of the entity. When I call the save o...

Calling a NSTimer method

Hi I'm new to working with timers on the iPhone and would need some support. I have a method as below that takes the time and update a label in my user interface. I also have an NSTimer that calls that method once a second (I only show hours and minutes). This works just fine, except for the first second the App is live (as I understa...

What 3rd party libraries are available for iPhone development?

I'm doing iPhone programming after 10+ years as a Java developer. In the Java world, I'm accustomed to using 3rd party libraries for just about everything, from entire frameworks like Spring to small things like the apache commons utilities. Are there similar things available for iPhone development? Where do I find them? I attended th...