title: Show UIAlertView or UIViewController in a Logos Tweak
body: <p>I am building a tweak for SMS sending on the default MobileSMS app coming with iOS 6.1. Even though I have managed to hook to the "Send" button, I cannot create a popup to inform the user, neither with <code>UIAlertView</code> nor with a <code>UIViewController</code>. I think the problem is that the <code>CTMmsEncoder</code> class I am hooking to does not have a view controller to somehow override.</p>
  
  <p>My question is if there is some way I can make a view appear in a situation like this. I have gone through many source codes for tweaks, but cannot find a similar case. I have even tried to create a dylib and load a a UIViewController from there, but get the (expected) error:</p>
  
  <pre><code>Oct 25 14:37:59 Pudge SpringBoard[950] &lt;Warning&gt;: Warning: Attempt to present &lt;ModalViewController: 0x1dbbe1a0&gt; on &lt;KSMSDylibViewOne: 0x1db7da50&gt; whose view is not in the window hierarchy!
  </code></pre>
  
  <p>When trying to implement a class with a ViewController directly in my tweak (say class ModalViewController), then Theos obviously outputs the error:</p>
  
  <pre><code>Tweak.xm:12:6: error: instance method 'presentViewController:animated:completion:' is being used on 'Class' which is not in the root class
        [-Werror,-Wobjc-method-access]
      [self presentViewController:view animated:YES completion:nil];
      ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p>Is there any way to get past this, or do I have to redesign?</p>
  
  <p>Thank you in advance,</p>
  
  <p>Panagiotis.</p>