Magento: Change Theme Using Controller

We can change the theme using magento controller by adding below code before $this->loadLayout(); , $this->renderLayout(); . Theme update reflects only on the specific controller.

public function indexAction()
{
  /* Begin - Design Package */
   Mage::getSingleton('core/design_package')
                    ->setPackageName($package) // $package = base, default, {{custom_package}}, ...
                    ->setTheme($theme); //  $theme = iphone, default, {{custom_theme}}, ...
  /* End */ 
  $this->loadLayout(); 
  $this->renderLayout();
}