Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-23-2012, 02:16 PM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 920
spiderguy84 is on a distinguished road
Default Hiding Navigation UIBarButton Item after Load

I have a simple blog app that parses an RSS on launch, and loads the stories into a table view. Sometimes, with slow internet, the articles do not load properly into the table view, and a refresh button is needed. I have the button created, and action linked to do this, but I would like for the button to only be visible if the table view load fails. I have this created so far:
Code:
- (void)viewDidAppear:(BOOL)animated {
    NSUInteger *count2 = [_allEntries count];
    if (count2 > 0) {
        [[myNavigationBar topItem]setLeftBarButtonItem:nil animated:NO];

    }
    [super viewDidAppear:animated];
}
Now, if the table view doesn't load, I can click the Reload button, and it will work great. The problem is that the Reload button is always shown at launch time, because it doesn't start trying to load the RSS until after launch. Is there a way I can set the button to NOT be visible at launch, UNLESS, it fails to load the feed?
__________________
My latest app...i Miss Mommy
spiderguy84 is offline   Reply With Quote
Old 01-24-2012, 02:25 PM   #2 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 920
spiderguy84 is on a distinguished road
Default

Any thoughts?
__________________
My latest app...i Miss Mommy
spiderguy84 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 378
10 members and 368 guests
7twenty7, Atatator, FrankWeller, glenn_sayers, iphonedevshani, MAMN84, mraalex, QuantumDoja, tim0504, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,674
Threads: 94,122
Posts: 402,907
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Atatator
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:48 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0