To my knowledge, this requires use of private APIs. Unless you wan't to reinvent the wheel, I recommend jailbreaking your phone. I have sucessfully done this using GreenPois0n. When done, you get access to Cydia - an alternative App Store for all things Apple won't approve.
Download SBSettings from Cydia. Now you can just swipe the status bar to quickly enable/disable bluetooth, 3g, airplane mode, wifi and more:
Some other tips and reasons you should jailbreak your phone:
- By downloading the plugins "Push" and "Push" mail to SBSettings, and by purchasing SBSchedule from Cydia, you can have profiles on your phone. I created two sets. "Push on" and "Push off". These can be selected by holding the on/off button. I have also set SBSettings to automatically switch to "Push off" at 23:00 and "Push on" at 07:00 to avoid getting disturbed by push notifications at night.
- Purchase LockInfo from Cydia. See more information and screenshots here. This gives you "widget" support on your lock screen.
- As a developer, I have also purchased "Display Out" which enables you to use the iPads VGA adapter on your iPhone (or iPad) to mirror the screens onto a projector (Steve Jobs mode). "Display Recorder" is a screen recorder enabling you to record instruction videos for your apps.