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 02-10-2012, 02:56 AM   #1 (permalink)
Survivor
 
Join Date: Jan 2012
Posts: 41
Sunny46 is on a distinguished road
Default Add observer ActivityIndictor

Hi, I have application which sometimes take time to load contents if i am using 3G , I would like to add an observer if internet is slow or results are taking time then show the ActivityIndicator. I have tried to ask this before in different thread but it ended up in something else. If anyone knows please do share.

Thank
Sunny46 is offline   Reply With Quote
Old 02-10-2012, 03:07 AM   #2 (permalink)
Token farm animal
 
sneaky's Avatar
 
Join Date: Apr 2011
Posts: 321
sneaky is on a distinguished road
Default

Apple's reachability can tell you if you're on 3g but that doesn't necessarily tell if you will get your result back quickly or not.

I suppose you can do something along the lines of - if you don't have data after 0.5 seconds you show the activity indicator. that would just be a performselector afterDelay.
sneaky is offline   Reply With Quote
Old 02-10-2012, 03:29 AM   #3 (permalink)
Survivor
 
Join Date: Jan 2012
Posts: 41
Sunny46 is on a distinguished road
Default

Quote:
Originally Posted by sneaky View Post
Apple's reachability can tell you if you're on 3g but that doesn't necessarily tell if you will get your result back quickly or not.

I suppose you can do something along the lines of - if you don't have data after 0.5 seconds you show the activity indicator. that would just be a performselector afterDelay.
Thanks for response, I have already reachability functionality working in my application and It is working fine but I can not know in this if the internet has gone slow or results taking time to show. I have tabbedBarApplication and when every item shows, it brings data from server and shows on the view, it takes time to load data as well as when switching between tabs, this is where i want to show activity indicator. I don't know how and where i can implement to show indicator? if you know something more in detail please share it. thanks
Sunny46 is offline   Reply With Quote
Old 02-10-2012, 08:34 AM   #4 (permalink)
Token farm animal
 
sneaky's Avatar
 
Join Date: Apr 2011
Posts: 321
sneaky is on a distinguished road
Default

Quote:
Originally Posted by Sunny46 View Post
Thanks for response, I have already reachability functionality working in my application and It is working fine but I can not know in this if the internet has gone slow or results taking time to show. I have tabbedBarApplication and when every item shows, it brings data from server and shows on the view, it takes time to load data as well as when switching between tabs, this is where i want to show activity indicator. I don't know how and where i can implement to show indicator? if you know something more in detail please share it. thanks
Something more in detail... I think you will have to find your own solution to your own problem - or provide more detail yourself.

There is no way of knowing before you initiate the download if the download is going to take long. As I said, you can check how you are connected to the internet but that won't tell you if the data will take long to download or not.

Why don't you just always show the activity indicator? problem solved?

btw, switching between tabs should not be impacted by your internet connection speed - if it is then you're doing it wrong. you want to make an asynchronous call.
sneaky is offline   Reply With Quote
Reply

Bookmarks

Tags
activityindicator, observer, uitabbarcontroller

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: 391
12 members and 379 guests
chiataytuday, chits12345, ChrisYates, fiftysixty, fredidf, gmarro, KennyChong, kilobytedump, Leslie80, Meoz, ryantcb, Yosh_K
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,670
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Yosh_K
Powered by vBadvanced CMPS v3.1.0

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