Skip to content

Commit

Permalink
Added refresh button to People View
Browse files Browse the repository at this point in the history
  • Loading branch information
adamalex committed Feb 10, 2009
1 parent 34fff49 commit c0a3204
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 15 deletions.
1 change: 1 addition & 0 deletions Classes/PeopleViewController.h
Expand Up @@ -16,6 +16,7 @@
}

@property (nonatomic , retain) NSArray* people;
-(IBAction) refreshButtonWasPressed;
-(IBAction) addButtonWasPressed;
@property(nonatomic , retain) UITableView *tableView;

Expand Down
3 changes: 3 additions & 0 deletions Classes/PeopleViewController.m
Expand Up @@ -30,6 +30,9 @@ - (void) loadPeople {
[tableView reloadData];
}

-(IBAction) refreshButtonWasPressed {
[self loadPeople];
}

-(IBAction) addButtonWasPressed {
AddPersonViewController *aController = [[[AddPersonViewController alloc ] initWithNibName:@"AddPersonView" bundle:nil ] autorelease];
Expand Down
75 changes: 60 additions & 15 deletions MainWindow.xib
@@ -1,19 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.02">
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">512</int>
<string key="IBDocument.SystemVersion">9F33</string>
<string key="IBDocument.InterfaceBuilderVersion">672</string>
<string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<string key="IBDocument.SystemVersion">9G55</string>
<string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.43</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="11"/>
<integer value="10"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="841351856">
Expand Down Expand Up @@ -71,6 +80,10 @@
<object class="IBUINavigationItem" key="IBUINavigationItem" id="904380780">
<reference key="IBUINavigationBar"/>
<string key="IBUITitle">List of People</string>
<object class="IBUIBarButtonItem" key="IBUILeftBarButtonItem" id="179245718">
<int key="IBUIStyle">1</int>
<int key="IBUISystemItemIdentifier">13</int>
</object>
<object class="IBUIBarButtonItem" key="IBUIRightBarButtonItem" id="154151195">
<int key="IBUIStyle">1</int>
<int key="IBUISystemItemIdentifier">4</int>
Expand Down Expand Up @@ -148,6 +161,14 @@
</object>
<int key="connectionID">23</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">refreshButtonWasPressed</string>
<reference key="source" ref="179245718"/>
<reference key="destination" ref="116467219"/>
</object>
<int key="connectionID">25</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
Expand Down Expand Up @@ -220,6 +241,7 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="154151195"/>
<reference ref="179245718"/>
</object>
<reference key="parent" ref="116467219"/>
</object>
Expand All @@ -228,6 +250,11 @@
<reference key="object" ref="154151195"/>
<reference key="parent" ref="904380780"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">24</int>
<reference key="object" ref="179245718"/>
<reference key="parent" ref="904380780"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
Expand All @@ -247,14 +274,15 @@
<string>2.IBAttributePlaceholdersKey</string>
<string>2.IBEditorWindowLastContentRect</string>
<string>2.IBPluginDependency</string>
<string>24.IBPluginDependency</string>
<string>3.CustomClassName</string>
<string>3.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>UIResponder</string>
<string>{{487, 124}, {320, 480}}</string>
<string>{{595, 245}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>PeopleViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
Expand All @@ -273,6 +301,7 @@
</object>
<string>{{310, 320}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>objective_resourceAppDelegate</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
Expand All @@ -297,7 +326,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">23</int>
<int key="maxID">25</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
Expand All @@ -306,35 +335,42 @@
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/lib/NSObject+JSONSerializableSupport.h</string>
<string key="minorKey">Classes/lib/NSObject+ObjectiveResource.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/lib/objective_support/Classes/lib/Core/NSObject+PropertySupport.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/lib/NSObject+PropertySupport.h</string>
<string key="minorKey">Classes/lib/objective_support/Classes/lib/Serialization/JSON/NSObject+JSONSerializableSupport.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/lib/NSObject+Serialize.h</string>
<string key="minorKey">Classes/lib/objective_support/Classes/lib/Serialization/NSObject+Serialize.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/lib/NSObject+XMLSerializableSupport.h</string>
<string key="minorKey">Classes/lib/objective_support/Classes/lib/Serialization/XML/NSObject+XMLSerializableSupport.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/lib/json-framework/NSObject+SBJSON.h</string>
<string key="minorKey">Classes/lib/objective_support/Classes/lib/json-framework/NSObject+SBJSON.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
Expand All @@ -348,8 +384,17 @@
<string key="className">PeopleViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">addButtonWasPressed</string>
<string key="NS.object.0">id</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addButtonWasPressed</string>
<string>refreshButtonWasPressed</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down

0 comments on commit c0a3204

Please sign in to comment.