Skip to content
Browse files

Adding GUI Goodness

  • Loading branch information...
1 parent 0ca724f commit 93f3e6c6df5d253966e4d151ebf6c95150b19585 @tomgco committed
View
2 Classes/ASIHTTPRequestConfig.h
@@ -18,7 +18,7 @@
// When set to 1, ASIFormDataRequests will print information about the request body to the console
#ifndef DEBUG_FORM_DATA_REQUEST
- #define DEBUG_FORM_DATA_REQUEST 0
+ #define DEBUG_FORM_DATA_REQUEST 1
#endif
// When set to 1, ASIHTTPRequests will print information about bandwidth throttling to the console
View
5 Classes/LoginModel.m
@@ -99,7 +99,7 @@ - (void)registerFinished:(ASIHTTPRequest *)request {
}
} else {
- [self saveMemberData:object];
+ [self saveMemberData:[responseData JSONValue]];
[self onSuccessfulLogin];
}
//[[NSUserDefaults standardUserDefaults] setObject:facebook.accessToken forKey:@"gawk_username"];
@@ -123,6 +123,7 @@ -(void)saveMemberData:(NSDictionary *)jsonResponse {
[[NSUserDefaults standardUserDefaults] setObject:[memberData objectForKey:@"facebookId"] forKey:GAWK_FACEBOOK_USER_ID];
[[NSUserDefaults standardUserDefaults] setObject:[memberData objectForKey:@"token"] forKey:@"gawk_token"];
[[NSUserDefaults standardUserDefaults] setObject:[memberData objectForKey:@"secureId"] forKey:@"gawk_secure_id"];
+ NSLog(@"%@", jsonResponse);
[[NSUserDefaults standardUserDefaults] synchronize];
}
@@ -173,7 +174,7 @@ - (void)loginFinished:(ASIHTTPRequest *)request {
}
} else {
- [self saveMemberData:object];
+ [self saveMemberData:[responseData JSONValue]];
[self onSuccessfulLogin];
}
//[[NSUserDefaults standardUserDefaults] setObject:facebook.accessToken forKey:@"gawk_username"];
View
12 Gawk.xcodeproj/WallCell.h
@@ -12,15 +12,15 @@
@interface WallCell : UITableViewCell {
BOOL useDarkBackground;
- UIImage *icon;
- NSString *wall;
- NSString *date;
+ NSString *name;
+ NSString *creator;
+ NSString *description;
}
@property BOOL useDarkBackground;
-@property(retain) UIImage *icon;
-@property(retain) NSString *wall;
-@property(retain) NSString *date;
+@property(retain) NSString *name;
+@property(retain) NSString *creator;
+@property(retain) NSString *description;
@end
View
6 Gawk.xcodeproj/WallCell.m
@@ -11,7 +11,7 @@
@implementation WallCell
-@synthesize icon, wall, date, useDarkBackground;
+@synthesize useDarkBackground, name, creator, description;
- (void)setUseDarkBackground:(BOOL)flag {
if (flag != useDarkBackground || !self.backgroundView)
@@ -27,9 +27,7 @@ - (void)setUseDarkBackground:(BOOL)flag {
}
- (void)dealloc
-{
- [icon release];
-
+{
[super dealloc];
}
View
265 Gawk.xcodeproj/WallCellSubView.xib
@@ -13,8 +13,9 @@
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>IBUITableViewCell</string>
- <string>IBUIImageView</string>
+ <string>IBUIButton</string>
<string>IBUILabel</string>
+ <string>IBUIImageView</string>
<string>IBProxyObject</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
@@ -48,33 +49,71 @@
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUIImageView" id="849177204">
+ <object class="IBUILabel" id="623154275">
<reference key="NSNextResponder" ref="518366989"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{17, 6}, {60, 60}}</string>
+ <string key="NSFrame">{{198, 2}, {168, 15}}</string>
+ <reference key="NSSuperview" ref="518366989"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="566233814"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Creator</string>
+ <object class="NSFont" key="IBUIFont" id="33455163">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">11</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">2</int>
+ <bytes key="NSRGB">MC4yMjc0NTEgMC4yMjc0NTEgMC4yMjc0NTEAA</bytes>
+ </object>
+ <object class="NSColor" key="IBUIHighlightedColor" id="703093997">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUILineBreakMode">5</int>
+ </object>
+ <object class="IBUILabel" id="588091906">
+ <reference key="NSNextResponder" ref="518366989"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{181, 2}, {168, 15}}</string>
<reference key="NSSuperview" ref="518366989"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="623154275"/>
<bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
- <int key="IBUIContentMode">2</int>
+ <bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">By</string>
+ <reference key="IBUIFont" ref="33455163"/>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">2</int>
+ <bytes key="NSRGB">MC4yMjc0NTEgMC4yMjc0NTEgMC4yMjc0NTEAA</bytes>
+ </object>
+ <reference key="IBUIHighlightedColor" ref="703093997"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUILineBreakMode">5</int>
</object>
- <object class="IBUILabel" id="623154275">
+ <object class="IBUILabel" id="566233814">
<reference key="NSNextResponder" ref="518366989"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{99, 6}, {168, 15}}</string>
+ <string key="NSFrame">{{21, 25}, {259, 46}}</string>
<reference key="NSSuperview" ref="518366989"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="67891854"/>
+ <reference key="NSNextKeyView" ref="900675115"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <string key="IBUIText">Date</string>
+ <string key="IBUIText">Description</string>
<object class="NSFont" key="IBUIFont">
- <string key="NSName">Helvetica-Bold</string>
+ <string key="NSName">Helvetica</string>
<double key="NSSize">11</double>
<int key="NSfFlags">16</int>
</object>
@@ -82,19 +121,19 @@
<int key="NSColorSpace">2</int>
<bytes key="NSRGB">MC4yMjc0NTEgMC4yMjc0NTEgMC4yMjc0NTEAA</bytes>
</object>
- <object class="NSColor" key="IBUIHighlightedColor" id="703093997">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- <int key="IBUIBaselineAdjustment">1</int>
+ <reference key="IBUIHighlightedColor" ref="703093997"/>
+ <int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUINumberOfLines">3</int>
+ <int key="IBUILineBreakMode">5</int>
</object>
<object class="IBUILabel" id="67891854">
<reference key="NSNextResponder" ref="518366989"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{101, 25}, {168, 21}}</string>
+ <string key="NSFrame">{{20, 4}, {168, 21}}</string>
<reference key="NSSuperview" ref="518366989"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="588091906"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
@@ -112,12 +151,99 @@
<reference key="IBUIHighlightedColor" ref="703093997"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUILineBreakMode">5</int>
+ </object>
+ <object class="IBUIButton" id="900675115">
+ <reference key="NSNextResponder" ref="518366989"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 79}, {72, 37}}</string>
+ <reference key="NSSuperview" ref="518366989"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="693601111"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <object class="NSFont" key="IBUIFont" id="1011450158">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">15</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">View</string>
+ <reference key="IBUIHighlightedTitleColor" ref="703093997"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor" id="477333310">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ <object class="IBUIButton" id="693601111">
+ <reference key="NSNextResponder" ref="518366989"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{100, 79}, {72, 37}}</string>
+ <reference key="NSSuperview" ref="518366989"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="493645288"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <reference key="IBUIFont" ref="1011450158"/>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Share</string>
+ <reference key="IBUIHighlightedTitleColor" ref="703093997"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <reference key="IBUINormalTitleShadowColor" ref="477333310"/>
+ </object>
+ <object class="IBUIButton" id="493645288">
+ <reference key="NSNextResponder" ref="518366989"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{180, 79}, {76, 37}}</string>
+ <reference key="NSSuperview" ref="518366989"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <reference key="IBUIFont" ref="1011450158"/>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Record</string>
+ <reference key="IBUIHighlightedTitleColor" ref="703093997"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <reference key="IBUINormalTitleShadowColor" ref="477333310"/>
+ </object>
+ <object class="IBUIImageView" id="260605940">
+ <reference key="NSNextResponder" ref="518366989"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{293, 58}, {18, 18}}</string>
+ <reference key="NSSuperview" ref="518366989"/>
+ <reference key="NSWindow"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">4</int>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">favourites-icon.gif</string>
+ </object>
</object>
</object>
- <string key="NSFrameSize">{300, 73}</string>
+ <string key="NSFrameSize">{320, 133}</string>
<reference key="NSSuperview" ref="363245748"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="849177204"/>
+ <reference key="NSNextKeyView" ref="67891854"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
@@ -129,7 +255,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
- <string key="NSFrameSize">{320, 73}</string>
+ <string key="NSFrameSize">{320, 133}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="518366989"/>
@@ -139,7 +265,6 @@
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIAccessoryType">1</int>
<reference key="IBUIContentView" ref="518366989"/>
<string key="IBUIReuseIdentifier">WallCell</string>
</object>
@@ -149,35 +274,35 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">iconView</string>
- <reference key="source" ref="363245748"/>
- <reference key="destination" ref="849177204"/>
+ <string key="label">tmpCell</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="363245748"/>
</object>
- <int key="connectionID">7</int>
+ <int key="connectionID">10</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">wallLabel</string>
+ <string key="label">nameLabel</string>
<reference key="source" ref="363245748"/>
<reference key="destination" ref="67891854"/>
</object>
- <int key="connectionID">8</int>
+ <int key="connectionID">11</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">dateLabel</string>
+ <string key="label">creatorLabel</string>
<reference key="source" ref="363245748"/>
<reference key="destination" ref="623154275"/>
</object>
- <int key="connectionID">9</int>
+ <int key="connectionID">12</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">tmpCell</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="363245748"/>
+ <string key="label">descriptionLabel</string>
+ <reference key="source" ref="363245748"/>
+ <reference key="destination" ref="566233814"/>
</object>
- <int key="connectionID">10</int>
+ <int key="connectionID">15</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -207,7 +332,12 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="623154275"/>
<reference ref="67891854"/>
- <reference ref="849177204"/>
+ <reference ref="566233814"/>
+ <reference ref="900675115"/>
+ <reference ref="693601111"/>
+ <reference ref="493645288"/>
+ <reference ref="588091906"/>
+ <reference ref="260605940"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">WallCell</string>
@@ -223,8 +353,33 @@
<reference key="parent" ref="363245748"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">6</int>
- <reference key="object" ref="849177204"/>
+ <int key="objectID">14</int>
+ <reference key="object" ref="566233814"/>
+ <reference key="parent" ref="363245748"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">16</int>
+ <reference key="object" ref="900675115"/>
+ <reference key="parent" ref="363245748"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">17</int>
+ <reference key="object" ref="693601111"/>
+ <reference key="parent" ref="363245748"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">18</int>
+ <reference key="object" ref="493645288"/>
+ <reference key="parent" ref="363245748"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">19</int>
+ <reference key="object" ref="588091906"/>
+ <reference key="parent" ref="363245748"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">20</int>
+ <reference key="object" ref="260605940"/>
<reference key="parent" ref="363245748"/>
</object>
</object>
@@ -235,23 +390,31 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
+ <string>14.IBPluginDependency</string>
+ <string>16.IBPluginDependency</string>
+ <string>17.IBPluginDependency</string>
+ <string>18.IBPluginDependency</string>
+ <string>19.IBPluginDependency</string>
<string>3.CustomClassName</string>
<string>3.IBEditorWindowLastContentRect</string>
<string>3.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
<string>5.IBPluginDependency</string>
- <string>6.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>WallViewController</string>
<string>UIResponder</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>WallCellSubview</string>
<string>{{145, 394}, {320, 73}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -266,7 +429,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">10</int>
+ <int key="maxID">20</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -286,14 +449,14 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>dateLabel</string>
- <string>iconView</string>
- <string>wallLabel</string>
+ <string>creatorLabel</string>
+ <string>descriptionLabel</string>
+ <string>nameLabel</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UILabel</string>
- <string>UIImageView</string>
+ <string>UILabel</string>
<string>UILabel</string>
</object>
</object>
@@ -301,22 +464,22 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>dateLabel</string>
- <string>iconView</string>
- <string>wallLabel</string>
+ <string>creatorLabel</string>
+ <string>descriptionLabel</string>
+ <string>nameLabel</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
- <string key="name">dateLabel</string>
+ <string key="name">creatorLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">iconView</string>
- <string key="candidateClassName">UIImageView</string>
+ <string key="name">descriptionLabel</string>
+ <string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">wallLabel</string>
+ <string key="name">nameLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
</object>
@@ -355,6 +518,10 @@
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NS.key.0">favourites-icon.gif</string>
+ <string key="NS.object.0">{18, 18}</string>
+ </object>
<string key="IBCocoaTouchPluginVersion">301</string>
</data>
</archive>
View
6 Gawk.xcodeproj/WallCellSubview.h
@@ -14,9 +14,9 @@
@interface WallCellSubview : WallCell
{
- IBOutlet UIImageView *iconView;
- IBOutlet UILabel *dateLabel;
- IBOutlet UILabel *wallLabel;
+ IBOutlet UILabel *creatorLabel;
+ IBOutlet UILabel *nameLabel;
+ IBOutlet UILabel *descriptionLabel;
}
@end
View
29 Gawk.xcodeproj/WallCellSubview.m
@@ -14,35 +14,32 @@ @implementation WallCellSubview
- (void)setBackgroundColor:(UIColor *)backgroundColor
{
[super setBackgroundColor:backgroundColor];
-
- iconView.backgroundColor = backgroundColor;
- dateLabel.backgroundColor = backgroundColor;
- wallLabel.backgroundColor = backgroundColor;
+ creatorLabel.backgroundColor = backgroundColor;
+ nameLabel.backgroundColor = backgroundColor;
}
-- (void)setIcon:(UIImage *)newIcon
+- (void)setName:(NSString *)newName
{
- [super setIcon:newIcon];
- iconView.image = newIcon;
+ [super setName:newName];
+ nameLabel.text = newName;
}
-- (void)setWall:(NSString *)newWall
+- (void)setCreator:(NSString *)newCreator
{
- [super setWall:newWall];
- wallLabel.text = newWall;
+ [super setCreator:newCreator];
+ creatorLabel.text = newCreator;
}
-- (void)setDate:(NSString *)newDate
+- (void)setDescription:(NSString *)newDescription
{
- [super setDate:newDate];
- dateLabel.text = newDate;
+ [super setDescription:newDescription];
+ descriptionLabel.text = newDescription;
}
- (void)dealloc
{
- [iconView release];
- [dateLabel release];
- [wallLabel release];
+ [creatorLabel release];
+ [nameLabel release];
[super dealloc];
}
View
26 Gawk.xcodeproj/WallViewController.m
@@ -11,6 +11,9 @@
#import "GawkAppDelegate.h"
#import "JSON.h"
+#define DARK_BACKGROUND [UIColor colorWithRed:151.0/255.0 green:152.0/255.0 blue:155.0/255.0 alpha:1.0]
+#define LIGHT_BACKGROUND [UIColor colorWithRed:172.0/255.0 green:173.0/255.0 blue:175.0/255.0 alpha:1.0]
+
@interface WallViewController ()
- (void)getWallFailed:(ASIHTTPRequest *)request;
- (void)getWallFinished:(ASIHTTPRequest *)request;
@@ -39,6 +42,7 @@ - (void)getWallFinished:(ASIHTTPRequest *)request {
id object = [parser objectWithString:responseData];
if (object) {
if (![[object objectForKey:@"success"] boolValue]) {
+ NSLog(@"%@", responseData);
[((GawkAppDelegate *)([UIApplication sharedApplication].delegate)) logout];
} else {
self.wallList = [NSArray arrayWithArray:[[object objectForKey:@"recentActivity"] objectForKey:@"wallsCreatedByMember"]];
@@ -77,7 +81,7 @@ - (void)viewDidLoad
{
[super viewDidLoad];
- NSDictionary *member = [[NSDictionary alloc] initWithDictionary:[self getMember]];
+ NSDictionary *member = [[[((GawkAppDelegate *)([UIApplication sharedApplication].delegate)) loginView] loginModel] member];;
[ASIHTTPRequest setShouldUpdateNetworkActivityIndicator:NO];
httpRequest = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:GAWK_API_LOCAITON]];
@@ -88,13 +92,17 @@ - (void)viewDidLoad
[httpRequest setDidFailSelector:@selector(getWallFailed:)];
[httpRequest setDidFinishSelector:@selector(getWallFinished:)];
[httpRequest startAsynchronous];
- [member release];
+
+ NSLog(@"%@", [member objectForKey:@"token"]);
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
+ self.tableView.rowHeight = 133.0;
+ self.tableView.backgroundColor = DARK_BACKGROUND;
+ self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
- (void)viewDidUnload
@@ -154,7 +162,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
WallCell *cell = (WallCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- [[NSBundle mainBundle] loadNibNamed:@"AlbumViewCell" owner:self options:nil];
+ [[NSBundle mainBundle] loadNibNamed:@"WallCellSubView" owner:self options:nil];
cell = tmpCell;
self.tmpCell = nil;
@@ -164,13 +172,19 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell.useDarkBackground = (indexPath.row % 2 == 0);
NSDictionary *dictionary = [self.wallList objectAtIndex:indexPath.row];
- cell.wall = @"s";
- cell.date = @"s";
+ NSLog(@"%@", dictionary);
+ cell.name = [dictionary objectForKey:@"name"];
+ cell.creator = [dictionary objectForKey:@"memberSecureId"];
+ cell.description = [dictionary objectForKey:@"description"];
//cell.icon = [UIImage imageWithContentsOfFile:[dictionary objectForKey:@"Thumbnail"]];
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+ cell.accessoryType = UITableViewCellAccessoryNone;
return cell;
}
+- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
+ cell.backgroundColor = ((WallCell *)cell).useDarkBackground ? DARK_BACKGROUND : LIGHT_BACKGROUND;
+}
+
/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
View
4 Gawk.xcodeproj/project.pbxproj
@@ -39,6 +39,7 @@
E2603FC113A1786A00177ECD /* WallCellSubview.m in Sources */ = {isa = PBXBuildFile; fileRef = E2603FBF13A1786900177ECD /* WallCellSubview.m */; };
E2603FC813A178BA00177ECD /* WallCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2603FC713A178BA00177ECD /* WallCell.m */; };
E2603FCA13A17D4100177ECD /* WallCellSubView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E2603FC913A17D4000177ECD /* WallCellSubView.xib */; };
+ E2603FCC13A1928200177ECD /* favourites-icon.gif in Resources */ = {isa = PBXBuildFile; fileRef = E2603FCB13A1928200177ECD /* favourites-icon.gif */; };
E261AD301385DC98002031AA /* WallCreateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E261AD2F1385DC98002031AA /* WallCreateModel.m */; };
E26BE88712F8ACEB002B50C2 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = E26BE88612F8ACEB002B50C2 /* CHANGELOG */; };
E26BE88912F8AE2E002B50C2 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = E26BE88812F8AE2E002B50C2 /* README.md */; };
@@ -143,6 +144,7 @@
E2603FC613A178BA00177ECD /* WallCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WallCell.h; path = ../Gawk.xcodeproj/WallCell.h; sourceTree = "<group>"; };
E2603FC713A178BA00177ECD /* WallCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WallCell.m; path = ../Gawk.xcodeproj/WallCell.m; sourceTree = "<group>"; };
E2603FC913A17D4000177ECD /* WallCellSubView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = WallCellSubView.xib; path = Gawk.xcodeproj/WallCellSubView.xib; sourceTree = "<group>"; };
+ E2603FCB13A1928200177ECD /* favourites-icon.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "favourites-icon.gif"; sourceTree = "<group>"; };
E261AD2E1385DC98002031AA /* WallCreateModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WallCreateModel.h; sourceTree = "<group>"; };
E261AD2F1385DC98002031AA /* WallCreateModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WallCreateModel.m; sourceTree = "<group>"; };
E26BE88612F8ACEB002B50C2 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
@@ -347,6 +349,7 @@
E200728F12F9F1FA006CAFBA /* Images */ = {
isa = PBXGroup;
children = (
+ E2603FCB13A1928200177ECD /* favourites-icon.gif */,
E23B0A1A137CABCE00A6FC2C /* Icon@2x.png */,
E2AD492F137B6933008416F0 /* DarkBackground.png */,
E2AD4930137B6933008416F0 /* LightBackground.png */,
@@ -633,6 +636,7 @@
E205718C1395945100016B8B /* stitch.mp4 in Resources */,
E2EFCA9C13970844009D92E5 /* AlbumVideoViewController.xib in Resources */,
E2603FCA13A17D4100177ECD /* WallCellSubView.xib in Resources */,
+ E2603FCC13A1928200177ECD /* favourites-icon.gif in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
BIN favourites-icon.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 93f3e6c

Please sign in to comment.
Something went wrong with that request. Please try again.