From CCRMA Wiki
Jump to: navigation, search

Music 256b De-Gotcha-Fier

This page is intended to host solutions to those annoying little things that pop up while we're programming, especially those that take hours to solve and end up being very simple solutions. It is often difficult to find that "silver bullet" solution to a problem, but this wiki is dedicated to just that.

weblink provided solutions

  • If you are using a UITabBarController and the auto-rotate functions do not work, follow this simple tutorial.

student provided solutions

  • certain objects, such as UIAlertView's, do not switch to landscape mode even when your plist is set to display landscape.

To make certain that everything starts in landscape, drop in: [application setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO]; in your didFInishLaunching. If you would like your home button to the left, use: [application setStatusBarOrientation:UIInterfaceOrientationLandscapeLeft animated:NO];

  • Using multiple nib files results in a SIGABRT "unrecognized selector" when you run IBActions off of your NavController or TabBar.

You must set the class of BOTH the new nib file's "File's Owner" and the NavController or TabBar's individual tab (accessed by clicking the tab itself, not the tab picture) which leads to the nib file, to the same ViewController class.

  • PHP debugging - One way to do this is with printouts on the server side. The PHP function error_log can be used, e.g.:
error_log("Testing the error log.", 0);
This prints to the PHP log file. When running the server on our personal machines using MAMP, the error log file is at:
A convenient way to monitor this file is:
tail -F /Applications/MAMP/logs/php_error.log