Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 83

Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
06/27/14 02:36 PM (10 years ago)

Turning off Refresh Button in BT3.0 Apps

Hey guys, I hate to beat a dead horse... http://awesomegifs.com/wp-content/uploads/dead-horse.gif But all info I can find for turning off the refresh button in the nav bar seems to deal with BT 2.19. It looks like it's different in 3.0 I've tried commenting out both sections that deal with the refresh button in BT_ViewUtilities.m (S3 and S4), but it didn't seem to effect anything. I also tried removing my report to cloud URL in my CP. Any ideas? Thanks.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
06/27/14 04:15 PM (10 years ago)
remove the button from BT_viewController.m comment out line 212 and 213 like so // add a back button on all screens that are not the "home" screen for non-child apps. if([self.navigationController.viewControllers count] < 2){ if([appDelegate respondsToSelector:@selector(refreshAppData)]){ if([appDelegate.rootApp.dataURL length] > 3){ //tabbed apps only the first tab will show the refresh button. if([self.screenData isHomeScreen]){ // UIBarButtonItem *theRefreshButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:appDelegate action:@selector(refreshAppData)]; // [self.navigationItem setLeftBarButtonItem:theRefreshButtonItem]; } } }
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
06/27/14 04:15 PM (10 years ago)
I recommend to comment as you can still refresh more easily and remove them when released
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
06/27/14 06:09 PM (10 years ago)
Perfect, thanks Kittsy!
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
06/28/14 03:33 AM (10 years ago)
Kitty's to the rescue, you reply to my same question on the forum a few weeks back.... Miguel
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
07/07/14 02:09 PM (10 years ago)
Hey Kittsy, is there a way to do this but still allow the app to refresh automatically when CP data has changed? The code edit you provided works great, but it doesn't prompt the user to refresh when I make a CP change. Or do we have to pick one or the other?
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
07/08/14 10:32 AM (10 years ago)
This doesn't remove the refresh code only the button, it will not affect auto refresh
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
07/08/14 10:34 AM (10 years ago)
Thats really strange. When I have the two lines commented out, I don't get refresh notifications. uncomment them again, and they show up as they should.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.