Permalink
Browse files

Added the ActivityIndicator

  • Loading branch information...
1 parent 1bb1a24 commit 5cdcb014c02c9fada13f5e06f5494cf814cf5761 @cpetersen committed Feb 13, 2009
@@ -11,7 +11,10 @@
#import "Milestone.h"
#import "TicketsViewController.h"
-@interface MilestonesViewController : UITableViewController<UITableViewDelegate> {
+@interface MilestonesViewController : UIViewController<UITableViewDelegate> {
+ IBOutlet UITableView *tableView;
+ IBOutlet UIActivityIndicatorView *activityIndicator;
+
Project *project;
}
@@ -35,13 +35,16 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
[NSThread detachNewThreadSelector:@selector(loadMilestones) toTarget:self withObject:nil];
+ [activityIndicator setHidesWhenStopped:YES];
}
-(void)loadMilestones {
+ [activityIndicator startAnimating];
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
[project loadMilestones];
- [[self tableView] reloadData];
+ [tableView reloadData];
[pool release];
+ [activityIndicator stopAnimating];
}
@@ -13,7 +13,10 @@
#import "lighthouseAppDelegate.h"
#import "ApiKeyViewController.h"
-@interface RootViewController : UITableViewController {
+@interface RootViewController : UIViewController<UITableViewDelegate> {
+ IBOutlet UITableView *tableView;
+ IBOutlet UIActivityIndicatorView *activityIndicator;
+
lighthouseAppDelegate *appDelegate;
ProjectAdminViewController *pavController;
UINavigationController *addNavigationController;
@@ -13,6 +13,7 @@ @implementation RootViewController
- (void)viewDidLoad {
[super viewDidLoad];
+ [activityIndicator setHidesWhenStopped:YES];
appDelegate = (lighthouseAppDelegate *)[[UIApplication sharedApplication] delegate];
@@ -30,13 +31,17 @@ - (void)viewDidLoad {
}
-(void)loadProjects:(Project *)project {
+ [activityIndicator startAnimating];
+
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
for(int i=0; i < [[appDelegate projectArray] count]; i++) {
Project *project = [[appDelegate projectArray] objectAtIndex:i];
[project loadSubProjects];
}
- [[self tableView] reloadData];
+ [tableView reloadData];
[pool release];
+
+ [activityIndicator stopAnimating];
}
-(void)adminClicked:(id)sender {
@@ -238,7 +243,7 @@ - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
- [self.tableView reloadData];
+ [tableView reloadData];
}
- (void)dealloc {
@@ -13,6 +13,7 @@
@interface TicketsViewController : UIViewController<UITableViewDelegate> {
IBOutlet UISearchBar *searchBar;
IBOutlet UITableView *tableView;
+ IBOutlet UIActivityIndicatorView *activityIndicator;
NSMutableArray *ticketArray;
Project *project;
@@ -26,7 +27,6 @@
@property (nonatomic, retain) Project *project;
@property (nonatomic, retain) NSString *query;
-
- (void) notTabbedView;
- (void) searchTableView;
- (void) doneSearching_Clicked:(id)sender;
@@ -42,9 +42,13 @@ - (void)viewDidLoad {
searchBar.text = self.query;
searching = NO;
letUserSelectRow = YES;
+
+ [activityIndicator setHidesWhenStopped:YES];
}
-(void)loadTickets {
+ [activityIndicator startAnimating];
+
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString *new_query = [query stringByReplacingOccurrencesOfString:@" " withString:@"+"];
NSString *new_query2 = [new_query stringByReplacingOccurrencesOfString:@"\"" withString:@"%22"];
@@ -73,6 +77,8 @@ -(void)loadTickets {
[tableView reloadData];
[pool release];
+
+ [activityIndicator stopAnimating];
}
- (void) searchTableView {
View
@@ -8,6 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="7"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -30,24 +31,53 @@
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
</object>
- <object class="IBUITableView" id="1031020301">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">274</int>
- <string key="NSFrameSize">{320, 247}</string>
+ <object class="IBUIView" id="614395535">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUITableView" id="1031020301">
+ <reference key="NSNextResponder" ref="614395535"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview" ref="614395535"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <bool key="IBUIBouncesZoom">NO</bool>
+ <int key="IBUISeparatorStyle">1</int>
+ <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
+ <bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
+ <float key="IBUIRowHeight">4.400000e+01</float>
+ <float key="IBUISectionHeaderHeight">2.200000e+01</float>
+ <float key="IBUISectionFooterHeight">2.200000e+01</float>
+ </object>
+ <object class="IBUIActivityIndicatorView" id="240897263">
+ <reference key="NSNextResponder" ref="614395535"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{150, 220}, {20, 20}}</string>
+ <reference key="NSSuperview" ref="614395535"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <bool key="IBUIHidesWhenStopped">NO</bool>
+ <int key="IBUIStyle">2</int>
+ </object>
+ </object>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
</object>
- <bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
- <bool key="IBUIBouncesZoom">NO</bool>
- <int key="IBUISeparatorStyle">1</int>
- <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
- <bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
- <float key="IBUIRowHeight">4.400000e+01</float>
- <float key="IBUISectionHeaderHeight">2.200000e+01</float>
- <float key="IBUISectionFooterHeight">2.200000e+01</float>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -73,9 +103,25 @@
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
+ <reference key="destination" ref="614395535"/>
+ </object>
+ <int key="connectionID">8</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">activityIndicator</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="240897263"/>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">tableView</string>
+ <reference key="source" ref="372490531"/>
<reference key="destination" ref="1031020301"/>
</object>
- <int key="connectionID">6</int>
+ <int key="connectionID">12</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -100,10 +146,25 @@
<reference key="object" ref="975951072"/>
<reference key="parent" ref="360949347"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7</int>
+ <reference key="object" ref="614395535"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1031020301"/>
+ <reference ref="240897263"/>
+ </object>
+ <reference key="parent" ref="360949347"/>
+ </object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="1031020301"/>
- <reference key="parent" ref="360949347"/>
+ <reference key="parent" ref="614395535"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="240897263"/>
+ <reference key="parent" ref="614395535"/>
</object>
</object>
</object>
@@ -113,13 +174,21 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
+ <string>10.IBPluginDependency</string>
+ <string>3.IBEditorWindowLastContentRect</string>
<string>3.IBPluginDependency</string>
+ <string>7.IBEditorWindowLastContentRect</string>
+ <string>7.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>MilestonesViewController</string>
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{0, 487}, {320, 247}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{42, 228}, {320, 460}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -142,14 +211,27 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">6</int>
+ <int key="maxID">12</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">MilestonesViewController</string>
- <string key="superclassName">UITableViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>activityIndicator</string>
+ <string>tableView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIActivityIndicatorView</string>
+ <string>UITableView</string>
+ </object>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/MilestonesViewController.h</string>
Oops, something went wrong.

0 comments on commit 5cdcb01

Please sign in to comment.