Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional iPhone and iPad Database Application Programming
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional iPhone and iPad Database Application Programming
This is the forum to discuss the Wrox book Professional iPhone and iPad Database Application Programming by Patrick Alessi; ISBN: 978-0-470-63617-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional iPhone and iPad Database Application Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 15th, 2012, 09:29 AM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 8
Thanks: 6
Thanked 0 Times in 0 Posts
Default Chapter 3 - long proces by 500 entries - alertView

Dear Bob, I need your help again. I press a button and then get the table view to see. Now I have over 200 entries with different graphics. This takes on an iPhone 3G for about 3 seconds. I would like to distribute the user with a showAlertx and UIActivityIndicatorView time. Unfortunately this is impossible. Can you help me please?

Thank you very much, Michael

Here is my code:

[self showAlert];

-(void)showAlert{

alert = [[[UIAlertView alloc] initWithTitle:@"Please Wait..." message:nil delegate:self cancelButtonTitle:nil otherButtonTitles: nil] autorelease];
[alert show];

UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicator ViewStyleWhiteLarge];

indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 50);

[indicator startAnimating];

[alert addSubview:indicator];

[indicator release];

}

-(void)dismissAlert{

[alert dismissWithClickedButtonIndex:0 animated:YES];
[alert release];

}
  #2 (permalink)  
Old March 16th, 2012, 08:33 AM
Friend of Wrox
Points: 1,671, Level: 16
Points: 1,671, Level: 16 Points: 1,671, Level: 16 Points: 1,671, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

I don't think using an alertView is the right way to display the activity indicator, and with the way you have it set up there is no way to manually dismiss the alertView since it has no buttons. I assume that you intend to dismiss it programmatically when the tableView has finished loading. I would create a view to overlay on the tableView with the text and activity indicator and add it when the tableView is loading, dismissing it when the loading is complete.

Second, since your alertView is autoreleased, it should not be released again in your -dismissAlert method.

Checkout
http://fromideatoapp.com/blueprint-homepage/
Download the Part 4: Custom Animations Demo and see how the "Countdown" tab approaches the situation. Is this similar to what you are trying to achieve?

Bob
The Following User Says Thank You to thepianoguy For This Useful Post:
IandiPhone (March 19th, 2012)
  #3 (permalink)  
Old March 17th, 2012, 12:25 PM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 8
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Hi Bob,
many thanks for your expert answer.
The reference to "Custom Animation Demo" is very interesting. My problem is I think that (synchronous?) Simultaneous display of the activity indicators and the loading of tableView. The view will remain for about 3 seconds to stand around the tableView is displayed, and this time I would like to display an activity indicator.
Unfortunately I do not get us anywhere.

Thank you very much, Michael
  #4 (permalink)  
Old March 18th, 2012, 08:07 AM
Friend of Wrox
Points: 1,671, Level: 16
Points: 1,671, Level: 16 Points: 1,671, Level: 16 Points: 1,671, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

The project I referred you to is more about creating a "look" for an overlay to your tableView when presenting your activity indicator, since I think the UIAlertView is not what should be used.
Concerning the calling and dismissing of the activity indicator, is your tableView already on the screen and reloading, or is it making its initial appearance? We will need to determine what delegate methods or notifications can be used to summon and then dismiss the overlay.

Bob
The Following User Says Thank You to thepianoguy For This Useful Post:
IandiPhone (March 19th, 2012)
  #5 (permalink)  
Old March 18th, 2012, 08:26 AM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 8
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Hi Bob,

tableView is the first time charged from a subView and is it making its initial appearance.

- (TestTableViewController *)testTableViewController {

// [self showAlert];

// Instantiate the view controller if necessary.
if (rednerTableViewController == nil) {
testTableViewController = [[TestTableViewController alloc] initWithNibName:@"TestThemaListeView" bundle:nil];
}
return testTableViewController;
}

Have a nice sunday, Michaael.
  #6 (permalink)  
Old March 19th, 2012, 12:22 PM
Friend of Wrox
Points: 1,671, Level: 16
Points: 1,671, Level: 16 Points: 1,671, Level: 16 Points: 1,671, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

I have done an example project that I believe accomplishes what you want. One version with an overlay and one with an alertView.
Send an email to
ipadhelper@me.com
and I will reply with the project.

Bob
The Following User Says Thank You to thepianoguy For This Useful Post:
IandiPhone (March 19th, 2012)
  #7 (permalink)  
Old March 19th, 2012, 12:43 PM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 8
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Dear Bob,

I've sent you an e-mail.

Thank you.
Best regards, Michael
  #8 (permalink)  
Old March 21st, 2012, 12:37 PM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 8
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Dear Bob,

that was exactly what I needed.

Thank you for that.

Michael
 


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to generate a user instance of SQL Server due to a failure starting the proces prisma BOOK: Professional ASP.NET Design Patterns 0 February 6th, 2012 07:56 AM
Chapter 14 - Long Press ggrngg BOOK: Beginning iOS 4 Application Development 0 November 14th, 2011 09:18 PM
Chapter 14, page 500, Deleted event Antonius Block BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 August 28th, 2011 10:02 AM
chapter 3 page 89: HTTP 500 internal server error igtoroy BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 7 February 23rd, 2010 10:08 AM
Modifying long text in a long field sajsal Classic ASP Databases 1 February 20th, 2004 11:36 AM



All times are GMT -4. The time now is 01:34 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.