From: <D.D...@ak...> - 2011-04-05 13:20:37
|
<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><div>Hi, <br><br>Thank you for your help. The example I used is the following ()<br><br><h1 class="objc" style="font-family: monospace; font-weight: normal; font-style: italic;"><font size="3">UIAlertView <font color="#002200">*</font>alert;<br> <br>...<br> <br>alert <font color="#002200">=</font> <font color="#002200">[</font><font color="#002200">[</font><font color="#002200">[</font>UIAlertView alloc<font color="#002200">]</font> initWithTitle<font color="#002200">:</font><font color="#bf1d1a">@</font><font color="#bf1d1a">"Configuring Preferences<font color="#2400d9">\n</font>Please Wait..."</font><font color="#002200">:</font><font color="#a61390">nil</font> delegate<font color="#002200">:</font>self cancelButtonTitle<font color="#002200">:</font><font color="#a61390">nil</font> otherButtonTitles<font color="#002200">:</font> <font color="#a61390">nil</font><font color="#002200">]</font> autorelease<font color="#002200">]</font>;<br><font color="#002200">[</font>alert show<font color="#002200">]</font>;<br> <br>UIActivityIndicatorView <font color="#002200">*</font>indicator <font color="#002200">=</font> <font color="#002200">[</font><font color="#002200">[</font>UIActivityIndicatorView alloc<font color="#002200">]</font><font color="#002200">:</font>UIActivityIndicatorViewStyleWhiteLarge<font color="#002200">]</font>;<br> <br><font color="#11740a">// Adjust the indicator so it is up a few pixels from the bottom of the alert</font><br>indicator.center <font color="#002200">=</font> CGPointMake<font color="#002200">(</font>alert.bounds.size.width <font color="#002200">/</font> <font color="#2400d9">2</font>, alert.bounds.size.height <font color="#002200">-</font><font color="#2400d9">50</font><font color="#002200">)</font>;<br><font color="#002200">[</font>indicator startAnimating<font color="#002200">]</font>;<br><font color="#002200">[</font>alert addSubview<font color="#002200">:</font>indicator<font color="#002200">]</font>;<br><font color="#002200">[</font>indicator release<font color="#002200">]</font>; message initWithActivityIndicatorStyle</font></h1><br>which, in Java, I used as<br><br><font style="font-style: italic; font-family: Default Monospace,Courier New,Courier,monospace;" size="2">UIAlertView alert = new UIAlertView(message, null, null, null);<br>UIActivityIndicatorView indicator = new UIActivityIndicatorView(0);<br>CGPoint center = new CGPoint(</font><font style="font-style: italic; font-family: Default Monospace,Courier New,Courier,monospace;" size="2">alert.getbounds().size.width <font color="#002200">/</font> <font color="#2400d9">2</font>, alert.getbounds().size.height <font color="#002200">-</font><font color="#2400d9">50</font><font color="#002200">)</font>;<br>indicator.setCenter(center);</font><br>indicator.startAnimating();<br>alert.addSubview(indicator);<br><br><br>I really can't figure out what's wrong. Maybe I should try to use a UIProgressView instead, but still I'm interested in this to add some modifications to the dialog.<br><br><br>Thank you,<br><br>Domenico<br><br></div><font color="#990099">-----Panayotis Katsaloulis <a class="moz-txt-link-rfc2396E" href="mailto:pan...@pa..."><pan...@pa...></a> a écrit : -----<br><br></font><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid #000000; margin-right: 0px;">A : <a class="moz-txt-link-abbreviated" href="mailto:xml...@li...">xml...@li...</a><br>De : Panayotis Katsaloulis <a class="moz-txt-link-rfc2396E" href="mailto:pan...@pa..."><pan...@pa...></a><br>Date : 04/04/2011 10:07<br>Objet : Re: [xmlvm-dev] UIAlertViewDelegate<br><br><font face="Courier New,Courier,monospace" size="3"><br>On Apr 3, 2011, at 12:35 AM, Domenico De Fano wrote:<br><br>> Hi,<br>> <br>> I found an Objective-C example that worked and wanted to replicate it. In fact I think that's not the best way of doing it, but I couldn't find any other. I wonder if there is an official way of customizing dialogs.<br>> Still it seems strange that the getCenter() method doesn't work on the dialog while the getBounds() does.<br>> <br>> Domenico De Fano<br><br><br>I think the documentation says that you are not clearly allowed to do so. I think I've read (but I am not sure) that this behavior trigged also the application reject mechanism, although it is true that you can now find applications that are using it more or less.<br><br>In any case, xmlvm does not interfere with the procedure. The most common reason for his problem though is that he is not using the examples he found the way he should. My guess is, sInce this is a fragile feature by definition, probably the steps you are following are not exactly the correct ones.<br>------------------------------------------------------------------------------<br>Create and publish websites with WebMatrix<br>Use the most popular FREE web apps or write code yourself; <br>WebMatrix provides all the features you need to develop and <br>publish your website. <a href="http://p.sf.net/sfu/ms-webmatrix-sf">http://p.sf.net/sfu/ms-webmatrix-sf</a><br>_______________________________________________<br>Xmlvm-developers mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Xml...@li...">Xml...@li...</a><br><a href="https://lists.sourceforge.net/lists/listinfo/xmlvm-developers">https://lists.sourceforge.net/lists/listinfo/xmlvm-developers</a><br></font> </blockquote><br></font> |