Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

StrAbZ

macrumors newbie
Original poster
Apr 21, 2008
10
0
I've try to search but I didn't find anything about my problem.

I'm trying to do a loading view or anything that can display, a gear, like a buttonBarItem with custom view, or a view with black background and alpha effect (like the "old" UIProgressHud, is there something to replace it?).

So i've my code which look like this :

Code:
// Step1 - Loading View (adding the button, or the view etc...)
UIActivityIndicatorView aiv = [[UIActivityIndicatorView alloc] initWithStyle...]
UIButtonBarItem *bbi = [[UIButtonBarItem alloc] initWithCustomView: aiv];
[[self navigationItem] setRightButtonBarItem: bbi];

// Step2 - Doing some stuff (loading data from url (synchronously),
 having 1min while{} etc...

// Step3 - Removing View (removing the button, or the view etc...)
[[self navigationItem] setRightButtonBarItem: nil];


If I only write step1 and step2, my loading view is displayed, but never disappear, right but not good...
My problem is when I add the third step, my view doesn't show up... (I have the same problem if I create a UIView, which I add and remove from [self view]

So if you have any idea I'll take it !

Thank you
 

StrAbZ

macrumors newbie
Original poster
Apr 21, 2008
10
0
Nobody with a idea?

In short, i cannot create a View, and add it as a subview and remove it.
I just can add it.

If i try to put some code to remove it, the add doesn't work.
 

5et

macrumors newbie
Jul 31, 2008
16
0
maybe you know how I can create small modal dialog with label and UIActivityIndicatorView on current view controller?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.