Note that there are some explanatory texts on larger screens.

plurals
  1. POSubview shown when loading, hidden when done
    primarykey
    data
    text
    <p><strong>My Setup:</strong></p> <p>In my iPhone app, I have a loading View (which is an UIImageView itself) and two subviews on the loading View, an UIIndicatorView and an UILabel. To view it, I call the <code>[self.view addSubview:loadingView]</code> method, and to hide it i use <code>[loadingView removeFromSuperView]</code>.</p> <p>In my app to refresh my data i have the method <code>-(void)refreshData</code>. in this method, I show the Subview, download some data resulting from an HTTP POST, and start and NSXMLParser with this data.</p> <p>when the NSXMLParser reaches the last element of it's <code>-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName</code> method, it then hide the subview (using the above method).</p> <p>To call the <code>refreshData</code> method i have a refresh button in my Navigation Bar:</p> <p><code>self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refreshData)];</code></p> <hr> <p><strong>My Issue:</strong></p> <p>When I click the refresh button the subview does not show. It calls the methods because in the Log I clearly see:</p> <p>Showing Loading View</p> <p>Bunch of lines shown during the loading process (totalling 15 seconds)</p> <p>Hiding Loading View</p> <p>I also know that my methods work because when I comment out the one that hides the view the Loading View continues to be seen until I close the app</p> <p>Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload