Permalink
Browse files

Updating/reducing code syntax for Xcode 4.5. Reorganizing demo projec…

…t. Changing documentation url.
  • Loading branch information...
1 parent 72c847f commit 2f32803a7810e2800cae3683388d5c57dd34cd75 @devinross committed Dec 26, 2012
Showing with 587 additions and 1,518 deletions.
  1. +2 −2 README.mdown
  2. +4 −4 Tapku.podspec
  3. BIN demo/{Shared → Assets}/Images/Back.png
  4. BIN demo/{Shared → Assets}/Images/Back@2x.png
  5. BIN demo/{Shared → Assets}/Images/beer.png
  6. BIN demo/{Shared → Assets}/Images/beer@2x.png
  7. BIN demo/{Shared → Assets}/Images/coverflow_ipad/ipadcover_1.jpg
  8. BIN demo/{Shared → Assets}/Images/coverflow_ipad/ipadcover_2.jpg
  9. BIN demo/{Shared → Assets}/Images/coverflow_ipad/ipadcover_3.jpg
  10. BIN demo/{Shared → Assets}/Images/coverflow_ipad/ipadcover_4.jpg
  11. BIN demo/{Shared → Assets}/Images/coverflow_ipad/ipadcover_5.jpg
  12. BIN demo/{Shared → Assets}/Images/coverflow_ipad/ipadcover_6.jpg
  13. BIN demo/{Shared → Assets}/Images/coverflow_ipad/ipadcover_7.jpg
  14. BIN demo/{Shared → Assets}/Images/coverflow_ipad/ipadcover_8.jpg
  15. BIN demo/{Shared → Assets}/Images/coverflow_ipad/ipadcover_9.jpg
  16. BIN demo/{Shared → Assets}/Images/coverflow_iphone/cover_1.jpg
  17. BIN demo/{Shared → Assets}/Images/coverflow_iphone/cover_2.jpg
  18. BIN demo/{Shared → Assets}/Images/coverflow_iphone/cover_3.jpg
  19. BIN demo/{Shared → Assets}/Images/coverflow_iphone/cover_4.jpg
  20. BIN demo/{Shared → Assets}/Images/coverflow_iphone/cover_5.jpg
  21. BIN demo/{Shared → Assets}/Images/coverflow_iphone/cover_6.jpg
  22. BIN demo/{Shared → Assets}/Images/coverflow_iphone/cover_7.jpg
  23. BIN demo/{Shared → Assets}/Images/coverflow_iphone/cover_8.jpg
  24. BIN demo/{Shared → Assets}/Images/coverflow_iphone/cover_9.jpeg
  25. BIN demo/{Shared → Assets}/Images/icon_114.png
  26. BIN demo/{Shared → Assets}/Images/icon_57.png
  27. BIN demo/{Shared → Assets}/Images/icon_74.png
  28. BIN demo/{ → Assets/Images}/launch_iphone-568h@2x.png
  29. BIN demo/Assets/Images/launch_iphone.png
  30. 0 demo/{iPhone → Classes}/AlertsViewController.h
  31. +11 −5 demo/{iPhone → Classes}/AlertsViewController.m
  32. +8 −3 demo/{iPhone/AppDelegate_iPhone.h → Classes/AppDelegate.h}
  33. +30 −21 demo/{iPhone/AppDelegate_iPhone.m → Classes/AppDelegate.m}
  34. +3 −6 demo/{iPhone/DemoCalendarMonth.h → Classes/CalendarMonthViewController.h}
  35. +10 −20 demo/{iPhone/DemoCalendarMonth.m → Classes/CalendarMonthViewController.m}
  36. +2 −6 demo/{iPhone → Classes}/CoverflowViewController.h
  37. +34 −47 demo/{iPhone → Classes}/CoverflowViewController.m
  38. +4 −9 demo/{iPad → Classes}/DetailViewController.h
  39. +19 −41 demo/{iPad → Classes}/DetailViewController.m
  40. +2 −4 demo/{iPhone → Classes}/EmptyViewController.h
  41. +6 −12 demo/{iPhone → Classes}/EmptyViewController.m
  42. +9 −10 demo/{iPhone/MapViewController.h → Classes/HUDViewController.h}
  43. +14 −20 demo/{iPhone → Classes}/HUDViewController.m
  44. +4 −4 demo/{iPhone → Classes}/ImageCenterViewController.h
  45. +34 −46 demo/{iPhone → Classes}/ImageCenterViewController.m
  46. +3 −3 demo/{iPhone → Classes}/LabelViewController.h
  47. +7 −21 demo/{iPhone → Classes}/LabelViewController.m
  48. 0 demo/{iPhone → Classes}/MoreCellsViewController.h
  49. +7 −12 demo/{iPhone → Classes}/MoreCellsViewController.m
  50. +4 −6 demo/{iPhone → Classes}/NetworkRequestViewController.h
  51. +29 −25 demo/{iPhone → Classes}/NetworkRequestViewController.m
  52. +7 −3 demo/{iPhone → Classes}/RootViewController.h
  53. +40 −72 demo/{iPhone → Classes}/RootViewController.m
  54. +235 −320 demo/Demo.xcodeproj/project.pbxproj
  55. BIN demo/Shared/Images/launch_iphone.png
  56. +0 −50 demo/iPad/AppDelegate_iPad.h
  57. +0 −85 demo/iPad/AppDelegate_iPad.m
  58. +0 −44 demo/iPad/LeftTableViewController.h
  59. +0 −123 demo/iPad/LeftTableViewController.m
  60. +0 −50 demo/iPhone/HUDViewController.h
  61. +0 −86 demo/iPhone/MapViewController.m
  62. +4 −6 demo/{Shared → }/main.m
  63. +2 −32 src/TapkuLibrary.xcodeproj/project.pbxproj
  64. +7 −5 src/TapkuLibrary/TKAlertCenter.m
  65. +8 −0 src/TapkuLibrary/TKAppDelegate.h
  66. +1 −1 src/TapkuLibrary/TKButtonCell.m
  67. +5 −4 src/TapkuLibrary/TKCalendarDayEventView.m
  68. +7 −7 src/TapkuLibrary/TKCalendarDayTimelineView.m
  69. +2 −4 src/TapkuLibrary/TKCalendarDayViewController.h
  70. +0 −1 src/TapkuLibrary/TKCalendarDayViewController.m
  71. +0 −6 src/TapkuLibrary/TKCalendarMonthTableViewController.m
  72. +0 −1 src/TapkuLibrary/TKCalendarMonthViewController.m
  73. +13 −13 src/TapkuLibrary/TKEmptyView.m
  74. +1 −3 src/TapkuLibrary/TKImageCache.m
  75. +1 −1 src/TapkuLibrary/TKLabelCell.m
  76. +0 −42 src/TapkuLibrary/TKMapPlace.h
  77. +0 −36 src/TapkuLibrary/TKMapPlace.m
  78. +0 −57 src/TapkuLibrary/TKMapView.h
  79. +0 −125 src/TapkuLibrary/TKMapView.m
  80. +1 −1 src/TapkuLibrary/TKProgressAlertView.m
  81. +1 −2 src/TapkuLibrary/TapDetectingView.h
  82. +6 −7 src/TapkuLibrary/TapDetectingView.m
  83. +0 −4 src/TapkuLibrary/TapkuLibrary.h
View
@@ -4,9 +4,9 @@ TapkuLibrary is an iOS library built on Cocoa and UIKit intended for broad use i
## Documentation
-Browse the documentation at [tapku.com/documentation](http://tapku.com/documentation/) or download it directly in Xcode. Open up the Xcode preferences, navigate to the Downloads tab and Documentation tab. Add the following URL:
+Browse the documentation at [devinsheaven.com/tapku/documentation](http://devinsheaven.com/tapku/documentation/) or download it directly in Xcode. Open up the Xcode preferences, navigate to the Downloads tab and Documentation tab. Add the following URL:
- http://tapku.com/documentation/com.devinross.tapku.atom
+ http://devinsheaven.com/tapku/documentation/com.devinross.tapku.atom
## Adding Tapku To Your Project
View
@@ -1,18 +1,18 @@
Pod::Spec.new do |s|
s.name = 'TapkuLibrary'
- s.version = '2.1'
+ s.version = '2.2'
s.platform = :ios
s.author = { 'Devin Ross' => 'devin@devinsheaven.com' }
s.license = { :type => 'MIT', :file => 'License.txt' }
- s.homepage = 'http://tapku.com/'
+ s.homepage = 'https://github.com/devinross/tapkulibrary'
s.summary = 'tap + haiku = tapku, a well crafted open source iOS framework'
s.description = 'TapkuLibrary is an iOS library built on Cocoa and UIKit intended for broad ' \
'use in applications. If you\'re looking to see what the library can do, check ' \
'out the demo project included. Some major components include coverflow, calendar ' \
'grid, network requests and progress indicators.'
- s.source = { :git => 'https://github.com/devinross/tapkulibrary.git', :tag => 'v2.1' }
+ s.source = { :git => 'https://github.com/devinross/tapkulibrary.git', :tag => 'v2.2' }
s.requires_arc = true
s.source_files = 'src/TapkuLibrary/*.{h,m}'
s.resources = 'src/TapkuLibrary.bundle'
- s.frameworks = 'MapKit', 'QuartzCore'
+ s.frameworks = 'QuartzCore'
end
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Diff not rendered.
@@ -37,28 +37,34 @@ @implementation AlertsViewController
- (id) init{
if(!(self=[super init])) return nil;
self.title = NSLocalizedString(@"Alerts",@"Alerts");
- self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Tap Me" style:UIBarButtonItemStyleBordered target:self action:@selector(beer)] autorelease];
return self;
}
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
+#pragma mark - View Lifecycle
- (void) loadView{
[super loadView];
self.view.backgroundColor = [UIColor whiteColor];
+
+
+
+ UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Tap Me" style:UIBarButtonItemStyleBordered target:self action:@selector(beer)];
+ if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
+ self.navigationItem.rightBarButtonItem = item;
+ }else{
+ self.toolbarItems = @[item];
+ }
+
}
- (void) viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
-
-
-
[[TKAlertCenter defaultCenter] postAlertWithMessage:@"Hi!"];
[[TKAlertCenter defaultCenter] postAlertWithMessage:@"This is the alert system"];
[[TKAlertCenter defaultCenter] postAlertWithMessage:@"Use images too!" image:[UIImage imageNamed:@"beer"]];
-
}
- (void) beer{
@@ -32,13 +32,18 @@
#import <UIKit/UIKit.h>
#import <TapkuLibrary/TapkuLibrary.h>
+@class LeftTableViewController, DetailViewController;
@class RootViewController;
-@interface AppDelegate_iPhone : TKAppDelegate
+@interface AppDelegate : TKAppDelegate
-@property (nonatomic, retain) RootViewController *root;
-@property (nonatomic, retain) UINavigationController *navigationController;
+@property (nonatomic, strong) RootViewController *root;
+@property (nonatomic, strong) UINavigationController *navigationController;
+
+#pragma mark - iPad
+@property (nonatomic, strong) UISplitViewController *splitViewController;
+@property (nonatomic, strong) DetailViewController *detail;
@end
@@ -29,25 +29,43 @@
*/
-#import "AppDelegate_iPhone.h"
+#import "AppDelegate.h"
#import "RootViewController.h"
+#import "DetailViewController.h"
-@implementation AppDelegate_iPhone
-@synthesize root=_root,navigationController=_navigationController;
-
-
-#pragma mark -
-#pragma mark Application lifecycle
+@implementation AppDelegate
+#pragma mark - Application lifecycle
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[super application:application didFinishLaunchingWithOptions:launchOptions];
-
- _root = [[RootViewController alloc] initWithStyle:UITableViewStyleGrouped];
- _navigationController = [[UINavigationController alloc] initWithRootViewController:_root];
+ self.root = [[RootViewController alloc] initWithStyle:UITableViewStyleGrouped];
+ self.navigationController = [[UINavigationController alloc] initWithRootViewController:self.root];
+
+ if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad){
+
+ self.splitViewController = [[UISplitViewController alloc] init];
+
+ self.detail = [[DetailViewController alloc] init];
+ self.splitViewController.delegate = self.detail;
+ self.root.detailViewController = self.detail;
+
+
+
+ self.splitViewController.viewControllers = @[self.navigationController,self.detail];
+ self.window.rootViewController = self.splitViewController;
+ }else{
+ self.window.rootViewController = self.navigationController;
+ }
+
+
+
+
+
+
+
- [self.window addSubview:_navigationController.view];
return YES;
@@ -61,32 +79,23 @@ - (void) applicationDidStartup:(UIApplication *)application{
}
-
- (void) applicationDidEnterBackground:(UIApplication *)application {
}
- (void) applicationWillTerminate:(UIApplication *)application {
}
-
- (void) applicationWillResignActive:(UIApplication *)application {
}
- (void) applicationDidBecomeActive:(UIApplication *)application {
}
-#pragma mark -
-#pragma mark Memory management
-
+#pragma mark - Memory management
- (void) applicationDidReceiveMemoryWarning:(UIApplication *)application {
}
-- (void) dealloc {
- [_root release];
- [_navigationController release];
- [super dealloc];
-}
@end
@@ -33,13 +33,10 @@
#import <UIKit/UIKit.h>
-@interface DemoCalendarMonth : TKCalendarMonthTableViewController {
- NSMutableArray *dataArray;
- NSMutableDictionary *dataDictionary;
-}
+@interface CalendarMonthViewController : TKCalendarMonthTableViewController
-@property (retain,nonatomic) NSMutableArray *dataArray;
-@property (retain,nonatomic) NSMutableDictionary *dataDictionary;
+@property (strong,nonatomic) NSMutableArray *dataArray;
+@property (strong,nonatomic) NSMutableDictionary *dataDictionary;
- (void) generateRandomDataForStartDate:(NSDate*)start endDate:(NSDate*)end;
@@ -29,35 +29,24 @@
*/
-#import "DemoCalendarMonth.h"
+#import "CalendarMonthViewController.h"
-@implementation DemoCalendarMonth
-@synthesize dataArray, dataDictionary;
-
+@implementation CalendarMonthViewController
+#pragma mark - View Lifecycle
- (void) viewDidLoad{
[super viewDidLoad];
[self.monthView selectDate:[NSDate month]];
}
-- (void) viewDidAppear:(BOOL)animated{
- [super viewDidAppear:animated];
-
-
- //NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
- //[dateFormatter setDateFormat:@"dd.MM.yy"];
- //NSDate *d = [dateFormatter dateFromString:@"02.05.11"];
- //[dateFormatter release];
- //[self.monthView selectDate:d];
-
-
-}
+
+#pragma mark - MonthView Delegate & DataSource
- (NSArray*) calendarMonthView:(TKCalendarMonthView*)monthView marksFromDate:(NSDate*)startDate toDate:(NSDate*)lastDate{
[self generateRandomDataForStartDate:startDate endDate:lastDate];
- return dataArray;
+ return self.dataArray;
}
- (void) calendarMonthView:(TKCalendarMonthView*)monthView didSelectDate:(NSDate*)date{
@@ -75,24 +64,25 @@ - (void) calendarMonthView:(TKCalendarMonthView*)mv monthDidChange:(NSDate*)d an
}
+#pragma mark - UITableView Delegate & DataSource
- (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- NSArray *ar = [dataDictionary objectForKey:[self.monthView dateSelected]];
+ NSArray *ar = [self.dataDictionary objectForKey:[self.monthView dateSelected]];
if(ar == nil) return 0;
return [ar count];
}
- (UITableViewCell *) tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tv dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ if (cell == nil) cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
- NSArray *ar = [dataDictionary objectForKey:[self.monthView dateSelected]];
+ NSArray *ar = [self.dataDictionary objectForKey:[self.monthView dateSelected]];
cell.textLabel.text = [ar objectAtIndex:indexPath.row];
return cell;
@@ -35,15 +35,11 @@
@interface CoverflowViewController : UIViewController <TKCoverflowViewDelegate,TKCoverflowViewDataSource,UIScrollViewDelegate> {
-
- TKCoverflowView *coverflow;
- NSMutableArray *covers; // album covers images
BOOL collapsed;
-
}
-@property (retain,nonatomic) TKCoverflowView *coverflow;
-@property (retain,nonatomic) NSMutableArray *covers;
+@property (strong,nonatomic) TKCoverflowView *coverflow;
+@property (strong,nonatomic) NSMutableArray *covers;
@end
Oops, something went wrong.

0 comments on commit 2f32803

Please sign in to comment.