iphone

How to handle views?

Hi How can I handle different views in XCode? Let's say I want to show a different view when the user press a button. UIViewController *viewSettings; [viewSettings initWithNibName:(NSString *)@"SettingsViewController" bundle:(NSBundle *)nil]; This code don't work. The app crashes. I have updated my XCode to the new version. How can I ...

Conceptual iPhone 2d game dev question. Quartz? Cocos2d? Chipmunk? Box2d?

Hello, I am new to iPhone dev and would like to write a game that involves 2d collisions. Would somebody give me a conceptual overview on how the various frameworks interact in a typical 2d collision game? The candidates I see mentioned so far are 2d packages such as quartz and cocos2d and physics engines such as chipmunk and box2d. Wh...

The best way to remove a sprite from a batch in Cocos2D

Hello, I'm using Cocos2D in my project and I'm quite new to this library. And I don't understand one thing. I have many sprites on the scene which are added and removed constantly. So at certain moment a sprite becomes useless and I have to remove it form a batch node. In the comments of the removeChild method of CCSpriteBatchNode clas...

Webkit iphone/ipad issue with mutl-touch

Hi, In a UIWebView (multi-touch enabled) I got a page with two divs (div1 and div2), each of them having registered for the touchstart and touchend events. Everytime they are receiving touch events, I am dumping the content of: event.touches: contains all current touches event.targetTouches: contains touches relevant to the given tar...

How easy is it to develop an iPhone application using MonoTouch in Visual Studio?

I know about Monotouch and I have virtual MacOS and Monodevelop/Monotouch installed. However, is it better to build an iPhone application in Monotouch on Mac OS X or it's as easy as to build iPhone app in Visual Studio and port it to iPhone via Monotouch? Is there anyone who tried porting c# project to iPhone? How different was it fr...

iPhone App - background disappears after memory warning

Hello all When I receive a memory warning in my navigation based iPhone App the background image disappears in the previously allocated navigation controllers. The background image is set as the background property of a UIView. This view is then added to the main window of the App delegate: UIView *backgroundView = [[UIView alloc] ini...

Custom UINavigationbar for different views - iPhone SDK

Hi all, I have implemented a custom UINavigationbar using this code (placed in the top of my AppDelegate.m file): @implementation UINavigationBar (CustomImage) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"NavigationBar.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.he...

iPhone Application with a password

I want to start my iPhone application with a password. How I do that ? Regards Akram Hamed ...

Developing client app for proprietary server

Hi, I was thinking about developing an app that enables the user to remotely check the progress of a longrunning task. The server application running the task is an existing commercial tool and comes with a proprietary client to connect to the server to manage it. However, the client is available only for windows computers and not for m...

iPhone SDK: Modal Table View List Picker

Hi, here is a strange one: I created an overlay view to mimic a list picker like the Bluetooth device picker from Apple. It looks and works exactly like that one now, so no issues here. It contains a title, table view and cancel button and everything works fine. Now comes the part I can't resolve. As soon as I want to make it a modal di...

Why does a check for UIGestureRecognizer find it on iPhone OS 3.0, when it was introduced in 3.2?

I'm using UIGestureRecognizer for the first time and I want my app to run on iOS 3.0 onwards. Since Apple clearly states that the library is available in iOS 3.2 and later I used the following code: // Make sure that Gesture recognition technology is supportted by the device SDK version if ([UIGestureRecognizer instancesRespondToSelecto...

Cydia App quits right after launch, signing with ldid did not work.

Here's the deal, I had this app working since iPhone OS 3.0 came out, now I made some changes to take advantage of iOS4.x, and compiled against 4.0 with xcode 3.2.3, I have 4 jailbroken devices: 2 iPod touch 2G iOS 3.0 1 iPad iOS 3.2 1 iPhone 4G iOS 4.0 When I run & debug from xcode (with an Apple provisioning certificate) the app w...

Trying to identify problem with core audio vs iPhone background execution

I have an audio app in the store. It works fine with versions of the iPhone OS before iOS 4.0. I am working on a new version, starting by bringing the app into compliance with the new iOS multitasking capabilities. (I have iOS 4.0 on my iPhone, and have upgraded to the latest xCode and SDK.) The result has been a show-stopper. o When ...

Sharing Audio over bluetooth

Hi, I want to write a function in my iPad App, which allows me to stream the music choosen on iPad to the connected Game-Interfaces (iPod, iPhone...) via bluetooth. Does anyone knows a simple solution or maybe wants to share some sample code? Thanks for help! ...

Dynamically load VewController from TableView Row Selection

Hello UIViewController *viewVC = nil; NSString *TcodeNib = [selectedObject valueForKey:@"ViewControllerName"]; // Create the next-level view controller if ([TcodeNib isEqualToString:@"FirstViewController"]) { viewVC = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil]; } else if ([TcodeNib isEqualToStri...

Newbie IPhone developer using Instruments panel: Where is my leak?

Update I have update the planets.m/h files to reflect the suggestions made by the commentors (thank you bbum and DarkDust. my factory methods now all call autorelease and look like this: - (Planet *) initWithName: (NSString *)name; + (Planet *) planetWithNameAndMoons:(NSString *)name moons:(id)firstObj, ... NS_REQUIRES_NIL_TERMINATI...

iPhone: transfer objects between NSManagedObjectContext objects?

I currently have an NSManagedObjectContext containing 5 Video Objects displayed in a table view. When a user selects a row, I'm going to push in a new view controller to display object details, and give the user the option to 'add Video to favorites'. To do this, I want to create a new NSManagedObjectContext, assign the selected Video ...

What Objective C preprocessor / Compiler / Iphone SDK do behind the scene ?

I do see tutorials like this one http://www.youtube.com/watch?v=8X-vDtEwpeo They're good but they just describe the recipe so I still don't understand the logics what's happening behind the scene: What Objective C preprocessor / Compiler / Iphone SDK do when one drag from Interface Builder to Fileowner. Why this name "file owner" ? ...

Including files inside the iPhone Bundle Library Path

I'm having trouble with my update logic. I need to include a file in the app bundle which contains specific update data. When the app discovers this file, it checks to see if it's a first install (no update needed) or a previous install (apply update). Whatever the outcome, the update file needs to be deleted, so it's not found again,...

Is it possible to build an iphone view WITHOUT using Interface Builder ?

So Interface Builder does things to save time but what if I want to do without it ? In C# all code generated is clear and understandable, in interface builder this is hidden so I'd like at least during learning phase do things from scratch: any sample code to do so ? ...