iphone

how to hide status bar when splash screen appears in iphone?

is there a way to hide the status bar when showing splash screen in iphone? and show again in application ...

Use autorelease before adding objects to a collection?

I have been looking through the questions asked on StackOverflow, but there are so many about memory management in Objective-C that I couldn't find the answer I was looking for. The question is if it is ok (and recommnded) to call autorelease before adding a newly created object to a collection (like NSMutableArray)? Or should I release...

Statusbar overlaps ViewController

Hi, I in my AppDelegate, I use: ActivitiesViewController *acController = [[ActivitiesViewController alloc] initWithNibName:@"ActivitiesView" bundle:[NSBundle mainBundle]]; UINavigationController *acNavController = [[UINavigationController alloc] initWithRootViewController:acController]; [self.tabBarController setSelectedIndex:0...

How to fix iPhone Simulator trying to launch a Nib that isn't there?

I'm getting this error message when I Build&Go: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "TestappViewController"' I created a blank new project and then started to create a RootViewController which ho...

What are some good iPhone 3D / 2D OpenGL ES game tutorials?

So, we just bought the Iphone Development license, but we are looking for some good 3d/2d opengl es game tutorials. Does anyone know any good tutorials for this? Thank You -Techy ...

Is the iPhone NSOperationQueue implementation bugged?

In MacOS Leopard versions prior to 10.5.7, NSOperationQueue was famously buggy. Does anyone know if this bug applies to the iPhone OS (which also features this API), and if so to which versions? ...

How can I prevent that iPhone OS switches off the screen or goes into standby?

How could I make sure that iPhone doesn't disable the screen or go to sleep for about 20 to 30 minutes? ...

referencing a control in table view cell on viewWillDisappear

When a view will disappear I would like to collect the values of some of the switches in my table view, I have pointers to the index path, cell, and control how do I get a pointer to the table view so I can properly point the cell pointer... if I'm thinking correctly I should be able to then get the value of the control pretty quickly t...

"EXC_BAD_ACCESS" error when cell begins scrolling back in view?

I've got some (I think) pretty basic code for creating cell content from a data source, and everything works fine when the display loads. However, when I start scrolling around to view other text (up or down) the code fails with 'GDB: Program received signal: "EXEC_BAD_ACCESS"'. Here's the code that fills out the display for the various ...

do I have to release IBOutlets in -(void)viewDidUnload?

They say: // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; I've never seen that previously. so I wonder if they talk about nib outlets here? ...

Adding a view with presentModalViewController

I have a UIViewController subclass called TripViewController. This class has the following method: - (void)lockScreen { LockOverlay *lockOverlay = [[LockOverlay alloc] init]; [self presentModalViewController: lockOverlay animated:YES]; } LockOverlay is also a UIViewController subclass, defined as follows (the rest of the code is j...

Why can't I put a constant into an CGRectMake?

I have tried this: CGRectMake(0.0f, kFooBarHeight, 100.0f, 10.0f); I get an error "unexpected ';' before ')'", and "too few arguments for CGRectMake". When I exchange this with: CGFloat foo = kFooBarHeight; CGRectMake(0.0f, foo, 100.0f, 10.0f); then all is fine. Are constants not suitable to pass along as parameters? ...

Loading a Singleton's state from NSKeyedArchiver

I have a class that I've made into a singleton and am able to save it's state using an NSKeyedArchiver, but I can't wrap my head around pulling it's state back out. In the function that does the loading I have Venue *venue = [Venue sharedVenue]; NSData *data = [[NSMutableData alloc] initWithContentsOfFile:[self dataFilePath]]; NSKeyedU...

How to reload a uiviewcontroller on the iPhone

Hi, I'm trying to reload a value I set on UIViewController to update each time I transition with this code (coming and going are both UIViewControllers): coming.phoneNumber = aPhoneNumber; [coming viewWillAppear:YES]; [going viewWillDisappear:YES]; [going.view removeFromSuperview]; [self.window insertSubview: coming.view atIndex...

How can I provide a value in minutes to setAnimationDuration?

I think a value of 1.0 represents one second, but I'm not very sure with that. Is that a hexadecimal system? What would you provide to give exactly one minute for duration? ...

Move a UIImageView with an animation

I have implemented a slider bar type UI control, like the Unlock mechanism on the iPhone. When the touchesEnded method gets called, I return the slider to it's starting position. Instead, I would like to animate its move back to it's starting position. The code should be something like this, but it doesn't work. What am I doing wrong h...

Using system Sound to play sounds

Here is the code: -(void)stop { NSLog(@"Disposing Sounds"); AudioServicesDisposeSystemSoundID (soundID); //AudioServicesRemoveSystemSoundCompletion (soundID); } static void completionCallback (SystemSoundID mySSID, void* myself) { NSLog(@"completion Callback"); } - (void) playall: (id) sender { [self stop]; A...

Multiple UILabels to display decorated XML markup

I have a block of content (stored in XML) that I want to put in a UIScrollView. Certain parts of this text will be formatted with different fonts, sizes, and colors. Altogether, it mostly reads as a paragraph with word wrapping. I've built my NSXMLParser code, and I have separated all the data. I'm ready to apply my decorations and...

iPhone/Cocoa Animation having effect I don't understand

I have created a basic unlock slider like you use to unlock the iPhone. In my touchesEnded function, I use an animation to move the slider back to home. The first time the user moves the slider (and doesn't actually hit the end to unlock), the animation works fine and the slider moves back to home. However, the next time the user trie...

Breaking into the debugger on iPhone

Hi everyone, For assert macros in my iPhone project, I'm looking for a way to programmatically break into the debugger. On Windows (MSVC++), I can use __debugbreak() for this purpose. Invoking this function will stop my program, launch the debugger, and display a callstack of the line that called __debugbreak(). Is there anything simil...