summaryrefslogtreecommitdiffstats
path: root/Classes
diff options
context:
space:
mode:
Diffstat (limited to 'Classes')
-rw-r--r--Classes/PicCastAppDelegate.m20
-rw-r--r--Classes/SourcesEditViewController.m24
-rw-r--r--Classes/SourcesEditViewController.xib42
-rw-r--r--Classes/TopicTableViewCell.m2
-rw-r--r--Classes/TopicsViewController.m17
5 files changed, 79 insertions, 26 deletions
diff --git a/Classes/PicCastAppDelegate.m b/Classes/PicCastAppDelegate.m
index 3091f4a..f028035 100644
--- a/Classes/PicCastAppDelegate.m
+++ b/Classes/PicCastAppDelegate.m
@@ -27,13 +27,31 @@
// Add the tab bar controller's view to the window and display.
[self.window addSubview:tabBarController.view];
[self.window makeKeyAndVisible];
+
+ [self doDefaultPngFade];
//navigationController = [[UINavigationController alloc] initWithRootViewController:(UIViewController *)tabBarController];
// this was put in because i errored out on some gif files that i guess were really large?
[[TTURLRequestQueue mainQueue] setMaxContentLength:0];
-
+
return YES;
}
+- (void)doDefaultPngFade {
+ // add the new image to fade out
+ UIImageView * defaultFadeImage;
+ defaultFadeImage = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Default.png"]] autorelease];
+ [self.tabBarController.view addSubview:defaultFadeImage];
+
+
+ // and start the default fadeout
+ [UIView beginAnimations:@"InitialFadeIn" context:nil];
+ [UIView setAnimationDelegate:defaultFadeImage];
+ [UIView setAnimationDidStopSelector:@selector( removeFromSuperview )];
+ [UIView setAnimationDelay:0.0]; // stay on this long extra
+ [UIView setAnimationDuration:1.00]; // transition speed
+ [defaultFadeImage setAlpha:0.0];
+ [UIView commitAnimations];
+}
- (void)applicationWillResignActive:(UIApplication *)application {
/*
diff --git a/Classes/SourcesEditViewController.m b/Classes/SourcesEditViewController.m
index 7c04808..d0ca382 100644
--- a/Classes/SourcesEditViewController.m
+++ b/Classes/SourcesEditViewController.m
@@ -7,6 +7,7 @@
//
#import "SourcesEditViewController.h"
+#import "SourcesEditViewCell.h"
@implementation SourcesEditViewController
@@ -19,6 +20,8 @@
- (void)viewDidLoad {
[super viewDidLoad];
+
+ self.tableView.rowHeight = 100;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
@@ -84,11 +87,26 @@
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString *CellIdentifier = @"Cell";
+ static NSString *CellIdentifier = @"SourcesEditCell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ SourcesEditViewCell *cell = (SourcesEditViewCell *)[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ NSArray *tmpCell = [[NSBundle mainBundle] loadNibNamed:@"TopicTableViewCell" owner:self options:nil];
+
+ for (id currentObj in tmpCell) {
+ if ([currentObj isKindOfClass:[TopicTableViewCell class]]) {
+ cell = (SourcesEditViewCell *)currentObj;
+ [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
+
+ UISwitch *mySwitch = [[[UISwitch alloc] initWithFrame:CGRectZero] autorelease];
+ [cell addSubview:mySwitch];
+ cell.accessoryView = mySwitch;
+
+ //cell.accessoryView = cell.switcher;
+ break;
+ }
+ }
+ //cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell...
diff --git a/Classes/SourcesEditViewController.xib b/Classes/SourcesEditViewController.xib
index 5c21a8d..47dd98b 100644
--- a/Classes/SourcesEditViewController.xib
+++ b/Classes/SourcesEditViewController.xib
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="8"/>
+ <integer value="14"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -47,7 +47,7 @@
<int key="NSvFlags">274</int>
<string key="NSFrame">{{0, 44}, {320, 416}}</string>
<reference key="NSSuperview" ref="628665035"/>
- <object class="NSColor" key="IBUIBackgroundColor" id="1071351714">
+ <object class="NSColor" key="IBUIBackgroundColor" id="242684625">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
@@ -64,7 +64,7 @@
<float key="IBUISectionHeaderHeight">22</float>
<float key="IBUISectionFooterHeight">22</float>
</object>
- <object class="IBUINavigationBar" id="893372906">
+ <object class="IBUINavigationBar" id="755609719">
<reference key="NSNextResponder" ref="628665035"/>
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{320, 44}</string>
@@ -76,14 +76,14 @@
</object>
<object class="NSMutableArray" key="IBUIItems">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUINavigationItem" id="768342525">
- <reference key="IBUINavigationBar" ref="893372906"/>
- <string key="IBUITitle">Title</string>
- <object class="IBUIBarButtonItem" key="IBUILeftBarButtonItem" id="719485559">
+ <object class="IBUINavigationItem" id="478129613">
+ <reference key="IBUINavigationBar" ref="755609719"/>
+ <string key="IBUITitle">Edit PicCast Sources</string>
+ <object class="IBUIBarButtonItem" key="IBUIRightBarButtonItem" id="591147835">
<string key="IBUITitle">Done</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <int key="IBUIStyle">1</int>
- <reference key="IBUINavigationItem" ref="768342525"/>
+ <int key="IBUIStyle">2</int>
+ <reference key="IBUINavigationItem" ref="478129613"/>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
@@ -92,7 +92,7 @@
</object>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview"/>
- <reference key="IBUIBackgroundColor" ref="1071351714"/>
+ <reference key="IBUIBackgroundColor" ref="242684625"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
@@ -134,7 +134,7 @@
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">done:</string>
- <reference key="source" ref="719485559"/>
+ <reference key="source" ref="591147835"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">20</int>
@@ -165,7 +165,7 @@
<reference key="object" ref="628665035"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="893372906"/>
+ <reference ref="755609719"/>
<reference ref="873029372"/>
</object>
<reference key="parent" ref="0"/>
@@ -177,26 +177,26 @@
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
- <reference key="object" ref="893372906"/>
+ <reference key="object" ref="755609719"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="768342525"/>
+ <reference ref="478129613"/>
</object>
<reference key="parent" ref="628665035"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">14</int>
- <reference key="object" ref="768342525"/>
+ <reference key="object" ref="478129613"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="719485559"/>
+ <reference ref="591147835"/>
</object>
- <reference key="parent" ref="893372906"/>
+ <reference key="parent" ref="755609719"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">15</int>
- <reference key="object" ref="719485559"/>
- <reference key="parent" ref="768342525"/>
+ <reference key="object" ref="591147835"/>
+ <reference key="parent" ref="478129613"/>
</object>
</object>
</object>
@@ -430,7 +430,7 @@
<object class="IBPartialClassDescription">
<string key="className">UINavigationBar</string>
<string key="superclassName">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="168141194">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="553148539">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationBar.h</string>
</object>
@@ -438,7 +438,7 @@
<object class="IBPartialClassDescription">
<string key="className">UINavigationItem</string>
<string key="superclassName">NSObject</string>
- <reference key="sourceIdentifier" ref="168141194"/>
+ <reference key="sourceIdentifier" ref="553148539"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
diff --git a/Classes/TopicTableViewCell.m b/Classes/TopicTableViewCell.m
index a933c7d..4893ff4 100644
--- a/Classes/TopicTableViewCell.m
+++ b/Classes/TopicTableViewCell.m
@@ -11,7 +11,7 @@
@implementation TopicTableViewCell
-@synthesize useDarkBackground, title, iconUrl, picCount, gradient; // titleLabel, icon
+@synthesize useDarkBackground, title, iconUrl, picCount, picCountLabel, gradient; // titleLabel, icon
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
diff --git a/Classes/TopicsViewController.m b/Classes/TopicsViewController.m
index 4c855d6..9969962 100644
--- a/Classes/TopicsViewController.m
+++ b/Classes/TopicsViewController.m
@@ -18,6 +18,18 @@
#import "SourcesEditViewController.h"
+@implementation UINavigationBar (CustomImage)
+- (void)drawRect:(CGRect)rect {
+// NSLog(@"titlebar");
+// if (self.barStyle == UIBarStyleDefault) {
+ UIImage *image = [UIImage imageNamed: @"titleBarBackground.png"];
+ [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
+// }
+// else
+ //[super drawRect:rect];
+}
+@end
+
@implementation TopicsViewController
@synthesize topics, parser;
@@ -46,6 +58,11 @@
fileCache.fileCountLimit = 100;
fileCache.fileAgeLimit = 60*60*24*7; //1 week
[fileCache trimCacheUsingBackgroundThread];
+
+// UIWindow *window = [appDelegate window];
+// UIImageView *bgView = [[UIImageView alloc] init];
+// [bgView setImage:[UIImage imageNamed: @"Default.png"]];
+// [window addSubView:bgView];
[self startParsing];
}