If you also need the \Section* version, then the definition has to be extended

\documentclass{article}
\usepackage{mdframed}
\makeatletter
\newcommand\Section[2][]{\begin{mdframed}[linewidth=5pt]%
  \ifx\relax#1\relax\section{#2}\else\section[#1]{#2}\fi
  \end{mdframed}}

\makeatother
\begin{document}
\Section{A section}
\end{document}




Framing section headings
Is there a way to change the volume of the device? I've seen several apps do it. 

I have a desktop version of the iOS app and the device will be able to be controlled to some extent over the network. One of the things I want to allow the user to do is change the device volume and then play a sound. This can help if you loose your iPhone in a crack in your couch again, but can't find it. 

Is there any way that you can do this without Apple getting angry?
