Discussion Forums  >  Uncategorized

Replies: 2    Views: 212

Rohan
Veteran developer
Profile
Posts: 79
Reg: Mar 12, 2011
London
10,040
07/01/11 06:57 AM (14 years ago)

Calling ajax loader

Hi I have a screen with images that are being loaded from the web using some custom javascript. If possible I'd like to use the default loader spinner that is used natively within the Buzztouch 1.5 app? If so how? BTW don't mind digging into the backend code Really appreciate any advice that you can give Rohan
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/01/11 09:29 AM (14 years ago)
Hi in London. Without getting too detailed, I'm thinking this.... You're probably using a Custom HTML screen to do this. This file that renders this screen type is in your project in the BT_screens folder. It's BT_screen_webView.m This file is a sub-class of a parent file, BT_viewController.m. The BT_viewController.m file is in the BT_Layout folder. Because the web-view is a sub-class you can easily call any method in the parent class. You'll see two methods, showProgress and hideProgress in the parent class. Calling these in the BT_screen_webView.m file will show or hide the native progress indicator. Calling these methods from Javascript may get a little tricky. You'll end up having to customize something based on your implementation. You should not have to create or modify any of the code to actually show or hide the indicator. You can already see in a few places in BT_screen_webView.m where it does: [self showProgress] and [self hideProgress] Hope this helps.
 
Rohan
Veteran developer
Profile
Posts: 79
Reg: Mar 12, 2011
London
10,040
like
07/01/11 10:33 AM (14 years ago)
Hi David Excellent! I'll try this out and let you know how it goes Many thanks Rohan
 

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.