├── .gitignore ├── .gitmodules ├── Examples ├── Assets │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── ipad.png │ │ │ ├── ipad@2x.png │ │ │ ├── iphone@2x.png │ │ │ └── iphone@3x.png │ │ ├── Back.imageset │ │ │ ├── Back.png │ │ │ ├── Back@2x.png │ │ │ └── Contents.json │ │ ├── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── iOS Simulator Screen Shot Dec 17, 2014, 1.59.40 PM.png │ │ │ ├── iOS Simulator Screen Shot Dec 17, 2014, 1.59.54 PM.png │ │ │ ├── iOS Simulator Screen Shot Dec 22, 2014, 4.22.24 PM.png │ │ │ ├── launch_iphone-568h@2x.png │ │ │ ├── launch_iphone.png │ │ │ └── launch_iphone@2x.png │ │ ├── beer.imageset │ │ │ ├── Contents.json │ │ │ ├── beer.png │ │ │ └── beer@2x.png │ │ ├── happy.imageset │ │ │ ├── Contents.json │ │ │ ├── happy.png │ │ │ └── happy@2x.png │ │ ├── sad.imageset │ │ │ ├── Contents.json │ │ │ ├── sad.png │ │ │ └── sad@2x.png │ │ └── wallpaper.imageset │ │ │ ├── Contents.json │ │ │ └── wallpaper@2x.png │ └── Images │ │ ├── coverflow_ipad │ │ ├── ipadcover_1.jpg │ │ ├── ipadcover_2.jpg │ │ ├── ipadcover_3.jpg │ │ ├── ipadcover_4.jpg │ │ ├── ipadcover_5.jpg │ │ ├── ipadcover_6.jpg │ │ ├── ipadcover_7.jpg │ │ ├── ipadcover_8.jpg │ │ └── ipadcover_9.jpg │ │ └── coverflow_iphone │ │ ├── cover_1.jpg │ │ ├── cover_2.jpg │ │ ├── cover_3.jpg │ │ ├── cover_4.jpg │ │ ├── cover_5.jpg │ │ ├── cover_6.jpg │ │ ├── cover_7.jpg │ │ ├── cover_8.jpg │ │ └── cover_9.jpeg ├── Classes │ ├── AlertsViewController.h │ ├── AlertsViewController.m │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── ButtonViewController.h │ ├── ButtonViewController.m │ ├── CalendarDayViewController.h │ ├── CalendarDayViewController.m │ ├── CalendarMonthViewController.h │ ├── CalendarMonthViewController.m │ ├── CoverflowViewController.h │ ├── CoverflowViewController.m │ ├── DetailViewController.h │ ├── DetailViewController.m │ ├── EmptyViewController.h │ ├── EmptyViewController.m │ ├── ImageCenterViewController.h │ ├── ImageCenterViewController.m │ ├── IndicatorsViewController.h │ ├── IndicatorsViewController.m │ ├── LabelViewController.h │ ├── LabelViewController.m │ ├── MoreCellsViewController.h │ ├── MoreCellsViewController.m │ ├── NetworkRequestProgressViewController.h │ ├── NetworkRequestProgressViewController.m │ ├── RootViewController.h │ └── RootViewController.m ├── Examples-Info.plist ├── Examples.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── Demo.xccheckout │ │ ├── Examples.xccheckout │ │ └── Examples.xcscmblueprint ├── Examples_Prefix.pch └── main.m ├── License.txt ├── LogicTests-Info.plist ├── README.mdown ├── TapkuLibrary.bundle └── Images │ ├── calendar │ ├── Month Calendar Date Tile Selected.png │ ├── Month Calendar Date Tile Selected@2x.png │ ├── Month Calendar Date Tile.png │ ├── Month Calendar Today Selected Tile.png │ ├── Month Calendar Today Tile.png │ ├── calendar_left_arrow.png │ ├── calendar_left_arrow@2x.png │ ├── calendar_right_arrow.png │ ├── calendar_right_arrow@2x.png │ ├── color_gradient.png │ └── color_gradient_gray.png │ ├── empty │ ├── chatbubble.png │ ├── chatbubble@2x.png │ ├── clock.png │ ├── clock@2x.png │ ├── compass.png │ ├── compass@2x.png │ ├── eye.png │ ├── eye@2x.png │ ├── heart.png │ ├── heart@2x.png │ ├── key.png │ ├── key@2x.png │ ├── malePerson.png │ ├── malePerson@2x.png │ ├── movieclip.png │ ├── movieclip@2x.png │ ├── note.png │ ├── note@2x.png │ ├── photos.png │ ├── photos@2x.png │ ├── pictureframe.png │ ├── pictureframe@2x.png │ ├── search.png │ ├── search@2x.png │ ├── sign.png │ ├── sign@2x.png │ ├── star.png │ ├── star@2x.png │ ├── stopwatch.png │ ├── stopwatch@2x.png │ ├── television.png │ └── television@2x.png │ ├── keyboard │ ├── backspace-key.png │ ├── backspace-key@2x.png │ ├── down-keyboard.png │ ├── down-keyboard@2x.png │ ├── move-keyboard-dots.png │ ├── move-keyboard-dots@2x.png │ ├── next-key.png │ └── next-key@2x.png │ └── unlockslider │ ├── arrow.png │ └── arrow@2x.png ├── TapkuLibrary ├── NSDate+CalendarGrid.h ├── NSDate+CalendarGrid.m ├── TKAlertCenter.h ├── TKAlertCenter.m ├── TKAlertViewController.h ├── TKAlertViewController.m ├── TKAppDelegate.h ├── TKAppDelegate.m ├── TKButtonCell.h ├── TKButtonCell.m ├── TKCalendarDayEventView.h ├── TKCalendarDayEventView.m ├── TKCalendarDayView.h ├── TKCalendarDayView.m ├── TKCalendarDayViewController.h ├── TKCalendarDayViewController.m ├── TKCalendarMonthTableViewController.h ├── TKCalendarMonthTableViewController.m ├── TKCalendarMonthView.h ├── TKCalendarMonthView.m ├── TKCalendarMonthViewController.h ├── TKCalendarMonthViewController.m ├── TKCoverflowView.h ├── TKCoverflowView.m ├── TKEmptyView.h ├── TKEmptyView.m ├── TKGlobal.h ├── TKGlobal.m ├── TKHTTPRequest.h ├── TKHTTPRequest.m ├── TKImageCache.h ├── TKImageCache.m ├── TKLabelCell.h ├── TKLabelCell.m ├── TKLabelFieldCell.h ├── TKLabelFieldCell.m ├── TKLabelSwitchCell.h ├── TKLabelSwitchCell.m ├── TKLabelTextFieldCell.h ├── TKLabelTextFieldCell.m ├── TKLabelTextViewCell.h ├── TKLabelTextViewCell.m ├── TKNetworkQueue.h ├── TKNetworkQueue.m ├── TKProgressAlertView.h ├── TKProgressAlertView.m ├── TKProgressBarView.h ├── TKProgressBarView.m ├── TKProgressCircleView.h ├── TKProgressCircleView.m ├── TKReorderTableView.h ├── TKReorderTableView.m ├── TKRetroButton.h ├── TKRetroButton.m ├── TKTableViewCell.h ├── TKTableViewCell.m ├── TKTextViewCell.h ├── TKTextViewCell.m ├── TKViewController.h ├── TKViewController.m ├── TapkuLibrary.h ├── UIImage+TKCategory.h └── UIImage+TKCategory.m ├── Tests ├── FoundationTests.h └── FoundationTests.m ├── tapku.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── tapku.xccheckout ├── tapku ├── Info.plist └── tapku.h └── tapku_Prefix.pch /.gitignore: -------------------------------------------------------------------------------- 1 | # xcode noise 2 | build 3 | TapkuLibrary/build/** 4 | TapkuLibraryDemo/build/** 5 | *.pbxuser 6 | *.perspectivev3 7 | *.mode1v3 8 | *.xcuserstate 9 | xcuserdata 10 | 11 | # old skool 12 | .svn 13 | .cvs 14 | 15 | # osx noise 16 | .DS_Store 17 | demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/Demo.xccheckout 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Vendor/curry"] 2 | path = Vendor/curry 3 | url = git@github.com:devinross/curry.git 4 | -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/AppIcon.appiconset/ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/AppIcon.appiconset/ipad.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/AppIcon.appiconset/ipad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/AppIcon.appiconset/ipad@2x.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/AppIcon.appiconset/iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/AppIcon.appiconset/iphone@2x.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/AppIcon.appiconset/iphone@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/AppIcon.appiconset/iphone@3x.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/Back.imageset/Back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/Back.imageset/Back.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/Back.imageset/Back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/Back.imageset/Back@2x.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/Back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "Back.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "Back@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "iOS Simulator Screen Shot Dec 17, 2014, 1.59.54 PM.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "orientation" : "landscape", 14 | "idiom" : "iphone", 15 | "extent" : "full-screen", 16 | "minimum-system-version" : "8.0", 17 | "subtype" : "736h", 18 | "scale" : "3x" 19 | }, 20 | { 21 | "extent" : "full-screen", 22 | "idiom" : "iphone", 23 | "subtype" : "667h", 24 | "filename" : "iOS Simulator Screen Shot Dec 17, 2014, 1.59.40 PM.png", 25 | "minimum-system-version" : "8.0", 26 | "orientation" : "portrait", 27 | "scale" : "2x" 28 | }, 29 | { 30 | "orientation" : "portrait", 31 | "idiom" : "iphone", 32 | "extent" : "full-screen", 33 | "minimum-system-version" : "7.0", 34 | "filename" : "iOS Simulator Screen Shot Dec 22, 2014, 4.22.24 PM.png", 35 | "scale" : "2x" 36 | }, 37 | { 38 | "extent" : "full-screen", 39 | "idiom" : "iphone", 40 | "subtype" : "retina4", 41 | "filename" : "launch_iphone-568h@2x.png", 42 | "minimum-system-version" : "7.0", 43 | "orientation" : "portrait", 44 | "scale" : "2x" 45 | }, 46 | { 47 | "orientation" : "portrait", 48 | "idiom" : "ipad", 49 | "extent" : "full-screen", 50 | "minimum-system-version" : "7.0", 51 | "scale" : "1x" 52 | }, 53 | { 54 | "orientation" : "landscape", 55 | "idiom" : "ipad", 56 | "extent" : "full-screen", 57 | "minimum-system-version" : "7.0", 58 | "scale" : "1x" 59 | }, 60 | { 61 | "orientation" : "portrait", 62 | "idiom" : "ipad", 63 | "extent" : "full-screen", 64 | "minimum-system-version" : "7.0", 65 | "scale" : "2x" 66 | }, 67 | { 68 | "orientation" : "landscape", 69 | "idiom" : "ipad", 70 | "extent" : "full-screen", 71 | "minimum-system-version" : "7.0", 72 | "scale" : "2x" 73 | }, 74 | { 75 | "orientation" : "portrait", 76 | "idiom" : "iphone", 77 | "extent" : "full-screen", 78 | "filename" : "launch_iphone.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "orientation" : "portrait", 83 | "idiom" : "iphone", 84 | "extent" : "full-screen", 85 | "filename" : "launch_iphone@2x.png", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "orientation" : "portrait", 90 | "idiom" : "iphone", 91 | "extent" : "full-screen", 92 | "subtype" : "retina4", 93 | "scale" : "2x" 94 | }, 95 | { 96 | "orientation" : "portrait", 97 | "idiom" : "ipad", 98 | "extent" : "to-status-bar", 99 | "scale" : "1x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "extent" : "full-screen", 105 | "scale" : "1x" 106 | }, 107 | { 108 | "orientation" : "landscape", 109 | "idiom" : "ipad", 110 | "extent" : "to-status-bar", 111 | "scale" : "1x" 112 | }, 113 | { 114 | "orientation" : "landscape", 115 | "idiom" : "ipad", 116 | "extent" : "full-screen", 117 | "scale" : "1x" 118 | }, 119 | { 120 | "orientation" : "portrait", 121 | "idiom" : "ipad", 122 | "extent" : "to-status-bar", 123 | "scale" : "2x" 124 | }, 125 | { 126 | "orientation" : "portrait", 127 | "idiom" : "ipad", 128 | "extent" : "full-screen", 129 | "scale" : "2x" 130 | }, 131 | { 132 | "orientation" : "landscape", 133 | "idiom" : "ipad", 134 | "extent" : "to-status-bar", 135 | "scale" : "2x" 136 | }, 137 | { 138 | "orientation" : "landscape", 139 | "idiom" : "ipad", 140 | "extent" : "full-screen", 141 | "scale" : "2x" 142 | } 143 | ], 144 | "info" : { 145 | "version" : 1, 146 | "author" : "xcode" 147 | } 148 | } -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/LaunchImage.launchimage/iOS Simulator Screen Shot Dec 17, 2014, 1.59.40 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/LaunchImage.launchimage/iOS Simulator Screen Shot Dec 17, 2014, 1.59.40 PM.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/LaunchImage.launchimage/iOS Simulator Screen Shot Dec 17, 2014, 1.59.54 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/LaunchImage.launchimage/iOS Simulator Screen Shot Dec 17, 2014, 1.59.54 PM.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/LaunchImage.launchimage/iOS Simulator Screen Shot Dec 22, 2014, 4.22.24 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/LaunchImage.launchimage/iOS Simulator Screen Shot Dec 22, 2014, 4.22.24 PM.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/LaunchImage.launchimage/launch_iphone-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/LaunchImage.launchimage/launch_iphone-568h@2x.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/LaunchImage.launchimage/launch_iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/LaunchImage.launchimage/launch_iphone.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/LaunchImage.launchimage/launch_iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/LaunchImage.launchimage/launch_iphone@2x.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/beer.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "beer.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "beer@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/beer.imageset/beer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/beer.imageset/beer.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/beer.imageset/beer@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/beer.imageset/beer@2x.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/happy.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "happy.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "happy@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/happy.imageset/happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/happy.imageset/happy.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/happy.imageset/happy@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/happy.imageset/happy@2x.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/sad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "sad.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "sad@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/sad.imageset/sad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/sad.imageset/sad.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/sad.imageset/sad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/sad.imageset/sad@2x.png -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/wallpaper.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "wallpaper@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Assets/Images.xcassets/wallpaper.imageset/wallpaper@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images.xcassets/wallpaper.imageset/wallpaper@2x.png -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_ipad/ipadcover_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_ipad/ipadcover_1.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_ipad/ipadcover_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_ipad/ipadcover_2.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_ipad/ipadcover_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_ipad/ipadcover_3.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_ipad/ipadcover_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_ipad/ipadcover_4.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_ipad/ipadcover_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_ipad/ipadcover_5.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_ipad/ipadcover_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_ipad/ipadcover_6.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_ipad/ipadcover_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_ipad/ipadcover_7.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_ipad/ipadcover_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_ipad/ipadcover_8.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_ipad/ipadcover_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_ipad/ipadcover_9.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_iphone/cover_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_iphone/cover_1.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_iphone/cover_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_iphone/cover_2.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_iphone/cover_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_iphone/cover_3.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_iphone/cover_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_iphone/cover_4.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_iphone/cover_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_iphone/cover_5.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_iphone/cover_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_iphone/cover_6.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_iphone/cover_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_iphone/cover_7.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_iphone/cover_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_iphone/cover_8.jpg -------------------------------------------------------------------------------- /Examples/Assets/Images/coverflow_iphone/cover_9.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/Examples/Assets/Images/coverflow_iphone/cover_9.jpeg -------------------------------------------------------------------------------- /Examples/Classes/AlertsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlertsViewController.h 3 | // Created by Devin Ross on 10/6/10. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | @import tapku; 34 | 35 | //@import tapku; 36 | 37 | @interface AlertsViewController : UIViewController 38 | 39 | @property (nonatomic,strong) UIBarButtonItem *tapMeItem; 40 | @property (nonatomic,strong) UITextField *hiddenTextField; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Examples/Classes/AlertsViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AlertsViewController.m 3 | // Created by Devin Ross on 10/6/10. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "AlertsViewController.h" 33 | 34 | #pragma mark - AlertsViewController 35 | @implementation AlertsViewController 36 | 37 | - (instancetype) init{ 38 | if(!(self=[super init])) return nil; 39 | self.title = NSLocalizedString(@"Alerts",@"Alerts"); 40 | return self; 41 | } 42 | - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 43 | return YES; 44 | } 45 | 46 | #pragma mark View Lifecycle 47 | - (void) loadView{ 48 | [super loadView]; 49 | self.view.backgroundColor = [UIColor whiteColor]; 50 | 51 | UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Tap Me" style:UIBarButtonItemStylePlain target:self action:@selector(beer)]; 52 | self.navigationItem.rightBarButtonItem = item; 53 | 54 | 55 | 56 | self.tapMeItem = item; 57 | item.enabled = NO; 58 | 59 | } 60 | - (void) viewDidAppear:(BOOL)animated{ 61 | [super viewDidAppear:animated]; 62 | 63 | 64 | [self performSelector:@selector(showKeyboardAlerts) withObject:nil afterDelay:4.3]; 65 | [[TKAlertCenter defaultCenter] postAlertWithMessage:@"Hi! This is the alert system."]; 66 | [[TKAlertCenter defaultCenter] postAlertWithMessage:@"Text alerts..."]; 67 | [[TKAlertCenter defaultCenter] postAlertWithMessage:@"with images!" image:[UIImage imageNamed:@"beer"]]; 68 | 69 | } 70 | 71 | - (void) showKeyboardAlerts{ 72 | 73 | self.hiddenTextField = [[UITextField alloc] initWithFrame:CGRectZero]; 74 | [self.view addSubview:self.hiddenTextField]; 75 | 76 | [self.hiddenTextField becomeFirstResponder]; 77 | 78 | [[TKAlertCenter defaultCenter] postAlertWithMessage:@"and it will avoid keyboards too"]; 79 | [self performSelector:@selector(completedKeyboard) withObject:nil afterDelay:3.0]; 80 | 81 | } 82 | 83 | - (void) completedKeyboard{ 84 | 85 | [self.hiddenTextField resignFirstResponder]; 86 | self.tapMeItem.enabled = YES; 87 | } 88 | 89 | 90 | - (void) beer{ 91 | [[TKAlertCenter defaultCenter] postAlertWithMessage:@"Beer!" image:[UIImage imageNamed:@"beer"]]; 92 | } 93 | 94 | 95 | @end -------------------------------------------------------------------------------- /Examples/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate_iPhone.h 3 | // Created by Devin Ross on 7/7/10. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | @import UIKit; 34 | @import tapku; 35 | @class LeftTableViewController, DetailViewController; 36 | 37 | @class RootViewController; 38 | 39 | #pragma mark - AppDelegate 40 | @interface AppDelegate : TKAppDelegate 41 | 42 | + (AppDelegate*) instance; 43 | 44 | @property (nonatomic,strong) RootViewController *root; 45 | @property (nonatomic,strong) UINavigationController *navigationController; 46 | 47 | #pragma mark iPad 48 | @property (nonatomic,strong) UISplitViewController *splitViewController; 49 | @property (nonatomic,strong) DetailViewController *detail; 50 | 51 | @end 52 | 53 | -------------------------------------------------------------------------------- /Examples/Classes/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate_iPhone.m 3 | // Created by Devin Ross on 7/7/10. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "AppDelegate.h" 33 | #import "RootViewController.h" 34 | #import "DetailViewController.h" 35 | 36 | #pragma mark - AppDelegate 37 | @implementation AppDelegate 38 | 39 | 40 | #pragma mark Application lifecycle 41 | - (void) application:(UIApplication *)application commonInitializationLaunching:(NSDictionary *)launchOptions{ 42 | [super application:application commonInitializationLaunching:launchOptions]; 43 | 44 | self.root = [[RootViewController alloc] initWithStyle:UITableViewStyleGrouped]; 45 | self.navigationController = [[UINavigationController alloc] initWithRootViewController:self.root]; 46 | self.navigationController.view.backgroundColor = [UIColor whiteColor]; 47 | self.window.backgroundColor = [UIColor whiteColor]; 48 | 49 | 50 | if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad){ 51 | 52 | self.splitViewController = [[UISplitViewController alloc] init]; 53 | 54 | self.detail = [[DetailViewController alloc] init]; 55 | self.splitViewController.delegate = self.detail; 56 | self.root.detailViewController = self.detail; 57 | 58 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:self.detail]; 59 | 60 | 61 | 62 | self.splitViewController.viewControllers = @[self.navigationController,nav]; 63 | self.window.rootViewController = self.splitViewController; 64 | }else{ 65 | self.window.rootViewController = self.navigationController; 66 | } 67 | 68 | 69 | } 70 | - (void) applicationWillEnterForeground:(UIApplication *)application { 71 | [super applicationWillEnterForeground:application]; 72 | // don't forget to call the super to call applicationDidStartup: 73 | } 74 | - (void) applicationDidStartup:(UIApplication *)application{ 75 | // called by didFinishLaunching.. & willEnterForeground 76 | 77 | } 78 | 79 | + (AppDelegate*) instance{ 80 | return (AppDelegate*)[[UIApplication sharedApplication] delegate]; 81 | } 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /Examples/Classes/ButtonViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonViewController.h 3 | // Created by Devin Ross on 10/20/13. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | 34 | @interface ButtonViewController : UIViewController 35 | 36 | @property (nonatomic,strong) TKRetroButton *retroButton; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Examples/Classes/ButtonViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonViewController.m 3 | // Created by Devin Ross on 10/20/13. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "ButtonViewController.h" 33 | 34 | @implementation ButtonViewController 35 | 36 | - (void) loadView{ 37 | [super loadView]; 38 | self.view.backgroundColor = [UIColor whiteColor]; 39 | 40 | CGFloat w = CGRectGetWidth(self.view.frame); 41 | 42 | 43 | 44 | self.retroButton = [TKRetroButton buttonWithFrame:CGRectMake(50, 200, w - 100, 40)]; 45 | self.retroButton.autoresizingMask = UIViewAutoresizingFlexibleWidth; 46 | self.retroButton.borderWidth = 2; 47 | [self.retroButton setTitleColor:self.view.tintColor forState:UIControlStateNormal]; 48 | [self.retroButton setTitle:@"Retro" forState:UIControlStateNormal]; 49 | [self.view addSubview:self.retroButton]; 50 | 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Examples/Classes/CalendarDayViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CalendarDayViewController.h 3 | // Created by Devin Ross on 3/16/13. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import tapku; 33 | @import UIKit; 34 | 35 | @interface CalendarDayViewController : TKCalendarDayViewController 36 | 37 | @property (nonatomic,strong) NSArray *data; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Examples/Classes/CalendarDayViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CalendarDayViewController.m 3 | // Created by Devin Ross on 3/16/13. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "CalendarDayViewController.h" 33 | 34 | @implementation CalendarDayViewController 35 | 36 | - (UIInterfaceOrientationMask) supportedInterfaceOrientations{ 37 | return UIInterfaceOrientationMaskPortrait; 38 | } 39 | - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 40 | return UIInterfaceOrientationIsPortrait(interfaceOrientation); 41 | } 42 | 43 | 44 | 45 | - (void) viewDidLoad{ 46 | [super viewDidLoad]; 47 | self.title = NSLocalizedString(@"Day View", @""); 48 | 49 | 50 | self.data = @[ 51 | @[@"Meeting with five random dudes", @"Five Guys", @5, @0, @5, @30], 52 | @[@"Unlimited bread rolls got me sprung", @"Olive Garden", @7, @0, @12, @0], 53 | @[@"Appointment", @"Dennys", @15, @0, @18, @0], 54 | @[@"Hamburger Bliss", @"Wendys", @15, @0, @18, @0], 55 | @[@"Fishy Fishy Fishfelayyyyyyyy", @"McDonalds", @5, @30, @6, @0], 56 | @[@"Turkey Time...... oh wait", @"Chick-fela", @14, @0, @19, @0], 57 | @[@"Greet the king at the castle", @"Burger King", @19, @30, @30, @0]]; 58 | 59 | } 60 | - (void) viewWillAppear:(BOOL)animated{ 61 | [super viewWillAppear:animated]; 62 | 63 | self.navigationController.navigationBar.hairlineDividerView.hidden = YES; 64 | self.dayView.daysBackgroundView.backgroundColor = [UIColor colorWithHex:0xf8f8f8]; 65 | } 66 | - (void) viewWillDisappear:(BOOL)animated{ 67 | [super viewWillDisappear:animated]; 68 | self.navigationController.navigationBar.hairlineDividerView.hidden = NO; 69 | 70 | } 71 | 72 | #pragma mark TKCalendarDayViewDelegate 73 | - (NSArray *) calendarDayTimelineView:(TKCalendarDayView*)calendarDayTimeline eventsForDate:(NSDate *)eventDate{ 74 | 75 | if([eventDate compare:[NSDate dateWithTimeIntervalSinceNow:-24*60*60]] == NSOrderedAscending) return @[]; 76 | if([eventDate compare:[NSDate dateWithTimeIntervalSinceNow:24*60*60]] == NSOrderedDescending) return @[]; 77 | 78 | NSDateComponents *info = [[NSDate date] dateComponentsWithTimeZone:calendarDayTimeline.calendar.timeZone]; 79 | info.second = 0; 80 | NSMutableArray *ret = [NSMutableArray array]; 81 | 82 | for(NSArray *ar in self.data){ 83 | 84 | TKCalendarDayEventView *event = [calendarDayTimeline dequeueReusableEventView]; 85 | if(event == nil) event = [TKCalendarDayEventView eventView]; 86 | 87 | event.identifier = nil; 88 | event.titleLabel.text = ar[0]; 89 | event.locationLabel.text = ar[1]; 90 | 91 | info.hour = [ar[2] intValue]; 92 | info.minute = [ar[3] intValue]; 93 | event.startDate = [NSDate dateWithDateComponents:info]; 94 | 95 | info.hour = [ar[4] intValue]; 96 | info.minute = [ar[5] intValue]; 97 | event.endDate = [NSDate dateWithDateComponents:info]; 98 | 99 | [ret addObject:event]; 100 | 101 | } 102 | return ret; 103 | 104 | 105 | } 106 | - (void) calendarDayTimelineView:(TKCalendarDayView*)calendarDayTimeline eventViewWasSelected:(TKCalendarDayEventView *)eventView{ 107 | TKLog(@"%@",eventView.titleLabel.text); 108 | } 109 | 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /Examples/Classes/CalendarMonthViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoCalendarMonth.h 3 | // Created by Devin Ross on 10/31/09. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import tapku; 33 | @import UIKit; 34 | 35 | #pragma mark - CalendarMonthViewController 36 | @interface CalendarMonthViewController : TKCalendarMonthTableViewController 37 | 38 | @property (nonatomic,strong) NSMutableArray *dataArray; 39 | @property (nonatomic,strong) NSMutableDictionary *dataDictionary; 40 | 41 | - (void) generateRandomDataForStartDate:(NSDate*)start endDate:(NSDate*)end; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Examples/Classes/CoverflowViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoverflowViewController.h 3 | // Created by Devin Ross on 1/3/10. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | @import UIKit; 32 | @import tapku; 33 | 34 | #pragma mark - CoverflowViewController 35 | @interface CoverflowViewController : UIViewController 36 | 37 | @property (nonatomic,strong) TKCoverflowView *coverflow; 38 | @property (nonatomic,strong) NSArray *covers; 39 | 40 | @end 41 | 42 | -------------------------------------------------------------------------------- /Examples/Classes/DetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.h 3 | // Created by Devin Ross on 7/7/10. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | @import UIKit; 34 | @import tapku; 35 | 36 | @interface DetailViewController : UIViewController 37 | 38 | @property (nonatomic,strong) UIViewController *mainController; 39 | @property (nonatomic,strong) UIPopoverController *currentPopoverController; 40 | 41 | - (void) setupWithMainController:(UIViewController*)controller; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Examples/Classes/DetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.m 3 | // Created by Devin Ross on 7/7/10. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "DetailViewController.h" 33 | #import "AppDelegate.h" 34 | 35 | #pragma mark - DetailViewController 36 | @implementation DetailViewController 37 | 38 | - (void) viewDidLoad { 39 | [super viewDidLoad]; 40 | self.view.backgroundColor = [UIColor whiteColor]; 41 | } 42 | 43 | - (void) setupWithMainController:(UIViewController*)controller{ 44 | 45 | UINavigationController *nav = [AppDelegate instance].splitViewController.viewControllers.lastObject; 46 | nav.viewControllers = @[controller]; 47 | self.mainController = controller; 48 | nav.navigationItem.leftBarButtonItem = self.navigationItem.leftBarButtonItem; 49 | 50 | 51 | } 52 | - (void) splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController: (UIPopoverController*)pc { 53 | 54 | self.navigationItem.leftBarButtonItem = barButtonItem; 55 | self.currentPopoverController = pc; 56 | } 57 | - (void) splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem { 58 | self.navigationItem.leftBarButtonItem = nil; 59 | } 60 | 61 | #pragma mark TableView Delegate & Data Source 62 | - (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { 63 | return 0; 64 | } 65 | - (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 66 | return 0; 67 | } 68 | - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 69 | 70 | static NSString *CellIdentifier = @"Cell"; 71 | 72 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 73 | if (cell == nil) { 74 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; 75 | } 76 | 77 | // Configure the cell... 78 | 79 | return cell; 80 | } 81 | - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 82 | // Navigation logic may go here. Create and push another view controller. 83 | /* 84 | <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; 85 | // ... 86 | // Pass the selected object to the new view controller. 87 | [self.navigationController pushViewController:detailViewController animated:YES]; 88 | [detailViewController release]; 89 | */ 90 | } 91 | 92 | - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 93 | return YES; 94 | } 95 | 96 | @end -------------------------------------------------------------------------------- /Examples/Classes/EmptyViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // EmptyViewController.h 3 | // Created by Devin Ross on 7/24/09. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | @import tapku; 34 | 35 | @interface EmptyViewController : UIViewController 36 | 37 | @property (nonatomic,strong) TKEmptyView *emptyView; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Examples/Classes/EmptyViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // EmptyViewController.m 3 | // Created by Devin Ross on 7/24/09. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "EmptyViewController.h" 33 | 34 | @implementation EmptyViewController 35 | 36 | #pragma mark View Lifecycle 37 | - (void) loadView{ 38 | [super loadView]; 39 | self.title = @"Empty"; 40 | 41 | self.emptyView = [[TKEmptyView alloc] initWithFrame:self.view.bounds 42 | emptyViewImage:TKEmptyViewImageMale 43 | title:@"Empty Page" 44 | subtitle:@"All you need is a transparent image"]; 45 | 46 | self.emptyView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; 47 | [self.view addSubview:self.emptyView]; 48 | 49 | 50 | } 51 | 52 | 53 | @end -------------------------------------------------------------------------------- /Examples/Classes/ImageCenterViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ImageCenterViewController.h 3 | // Created by Devin Ross on 4/16/10. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | @import tapku; 34 | 35 | @interface ImageCenterViewController : TKTableViewController 36 | 37 | @property (nonatomic,strong) TKImageCache *imageCache; 38 | @property (nonatomic,strong) NSArray *urlArray; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Examples/Classes/IndicatorsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HUDViewController.h 3 | // Created by Devin Ross on 7/4/09. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | @import tapku; 34 | 35 | @interface IndicatorsViewController : UIViewController 36 | 37 | @property (nonatomic,strong) TKProgressBarView *progressBar; 38 | @property (nonatomic,strong) TKProgressBarView *progressBarAlternative; 39 | @property (nonatomic,strong) TKProgressCircleView *progressCircle; 40 | 41 | @end -------------------------------------------------------------------------------- /Examples/Classes/IndicatorsViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HUDViewController.m 3 | // Created by Devin Ross on 7/4/09. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "IndicatorsViewController.h" 33 | 34 | @implementation IndicatorsViewController 35 | 36 | - (instancetype) init{ 37 | if(!(self=[super init])) return nil; 38 | self.title = @"HUD"; 39 | return self; 40 | } 41 | 42 | #pragma mark View Lifecycle 43 | - (void) loadView{ 44 | [super loadView]; 45 | self.view.backgroundColor = [UIColor colorWithWhite:1 alpha:1]; 46 | 47 | [self.view addSubview:self.progressBar]; 48 | [self.view addSubview:self.progressCircle]; 49 | [self.view addSubview:self.progressBarAlternative]; 50 | 51 | UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Tap Me" style:UIBarButtonItemStylePlain target:self action:@selector(tapme)]; 52 | self.navigationItem.rightBarButtonItem = item; 53 | 54 | } 55 | - (void) viewDidAppear:(BOOL)animated{ 56 | [super viewDidAppear:animated]; 57 | [self stepTwo:nil]; 58 | } 59 | 60 | #pragma mark Actions 61 | - (void) tapme{ 62 | 63 | [self.progressCircle setTwirlMode:!self.progressCircle.isTwirling]; 64 | 65 | if(!self.progressCircle.isTwirling){ 66 | [self.progressCircle setProgress:0 animated:NO]; 67 | [self.progressBar setProgress:0]; 68 | [self.progressBarAlternative setProgress:0 animated:NO]; 69 | 70 | 71 | TKProgressAlertView *alert = [[TKProgressAlertView alloc] initWithProgressTitle:@"Loading important stuff!"]; 72 | alert.progressBar.progress = 0; 73 | [alert show]; 74 | 75 | [self performSelector:@selector(stepTwo:) withObject:alert afterDelay:2]; 76 | [self performSelector:@selector(stepThree:) withObject:alert afterDelay:4]; 77 | 78 | } 79 | 80 | 81 | } 82 | - (void) stepTwo:(TKProgressAlertView*)alert{ 83 | 84 | [self.progressCircle setProgress:1 animated:YES]; 85 | [self.progressBar setProgress:1 animated:YES]; 86 | [self.progressBarAlternative setProgress:1 animated:YES]; 87 | 88 | [alert.progressBar setProgress:1 animated:YES]; 89 | 90 | } 91 | - (void) stepThree:(TKProgressAlertView*)alert{ 92 | 93 | [alert hide]; 94 | 95 | } 96 | 97 | #pragma mark Properties 98 | - (TKProgressBarView *) progressBar{ 99 | if(_progressBar) return _progressBar; 100 | 101 | _progressBar = [[TKProgressBarView alloc] initWithStyle:TKProgressBarViewStyleShort]; 102 | _progressBar.center = CGPointMake(CGRectGetWidth(self.view.bounds)/2, 220); 103 | return _progressBar; 104 | } 105 | - (TKProgressBarView *) progressBarAlternative{ 106 | if(_progressBarAlternative) return _progressBarAlternative; 107 | 108 | _progressBarAlternative = [[TKProgressBarView alloc] initWithStyle:TKProgressBarViewStyleLong]; 109 | _progressBarAlternative.center = CGPointMake(CGRectGetWidth(self.view.bounds)/2, 320); 110 | return _progressBarAlternative; 111 | } 112 | - (TKProgressCircleView *) progressCircle{ 113 | if(_progressCircle) return _progressCircle; 114 | 115 | _progressCircle = [[TKProgressCircleView alloc] init]; 116 | _progressCircle.center = CGPointMake(CGRectGetWidth(self.view.bounds)/2, 120); 117 | return _progressCircle; 118 | } 119 | 120 | @end -------------------------------------------------------------------------------- /Examples/Classes/LabelViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LabelViewController.h 3 | // Created by Devin Ross on 7/4/09. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | @import tapku; 34 | 35 | @interface LabelViewController : UITableViewController 36 | 37 | @property (nonatomic,strong) NSArray *cells; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Examples/Classes/LabelViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LabelViewController.m 3 | // Created by Devin Ross on 7/4/09. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "LabelViewController.h" 33 | @implementation LabelViewController 34 | 35 | - (instancetype) init{ 36 | if(!(self=[super initWithStyle:UITableViewStyleGrouped])) return nil; 37 | self.title = @"Label Cells"; 38 | return self; 39 | } 40 | 41 | #pragma mark View Lifecycle 42 | - (void) loadView{ 43 | [super loadView]; 44 | self.navigationItem.rightBarButtonItem = self.editButtonItem; 45 | 46 | 47 | TKLabelFieldCell *cell1 = [[TKLabelFieldCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; 48 | cell1.label.text = @"Field"; 49 | cell1.field.text = @"Non Editable Text"; 50 | 51 | TKLabelTextViewCell *cell2 = [[TKLabelTextViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; 52 | cell2.label.text = @"Text View"; 53 | cell2.textView.text = @"List of cells:\nTKLabelFieldCell\nTKLabelTextViewCell\nTKLabelTextFieldCell\nTKLabelSwitchCell\n"; 54 | 55 | TKLabelTextFieldCell *cell3 = [[TKLabelTextFieldCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; 56 | cell3.label.text = @"Text Field"; 57 | cell3.field.text = @"Press to edit"; 58 | 59 | TKLabelSwitchCell *cell4 = [[TKLabelSwitchCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; 60 | cell4.label.text = @"Switch"; 61 | 62 | 63 | self.cells = @[cell1,cell2,cell3,cell4]; 64 | 65 | } 66 | 67 | #pragma mark UITableView Delegate & DataSource 68 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 69 | return 1; 70 | } 71 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 72 | return [self.cells count]; 73 | } 74 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 75 | return self.cells[indexPath.row]; 76 | } 77 | - (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 78 | return indexPath.row == 1 ? 120 : 44; 79 | } 80 | 81 | @end -------------------------------------------------------------------------------- /Examples/Classes/MoreCellsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MoreCellsViewController.h 3 | // Created by Devin Ross on 4/15/10. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | @import tapku; 34 | 35 | #pragma mark - MoreCellsViewController 36 | @interface MoreCellsViewController : UITableViewController 37 | 38 | @property (nonatomic,strong) TKButtonCell *buttonCell; 39 | @property (nonatomic,strong) TKTextViewCell *textViewCell; 40 | @property (nonatomic,strong) TKTextFieldCell *textFieldCell; 41 | 42 | @end -------------------------------------------------------------------------------- /Examples/Classes/MoreCellsViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MoreCellsViewController.m 3 | // Created by Devin Ross on 4/15/10. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "MoreCellsViewController.h" 33 | 34 | @implementation MoreCellsViewController 35 | 36 | - (instancetype) init{ 37 | if(!(self=[super initWithStyle:UITableViewStyleGrouped])) return nil; 38 | return self; 39 | } 40 | 41 | 42 | #pragma mark View Lifecycle 43 | - (void) loadView{ 44 | [super loadView]; 45 | 46 | self.buttonCell = [[TKButtonCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"button"]; 47 | self.buttonCell.textLabel.text = @"This is a Button Cell"; 48 | 49 | 50 | self.textFieldCell = [[TKTextFieldCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; 51 | self.textFieldCell.textField.text = @"Text field label"; 52 | 53 | 54 | self.textViewCell = [[TKTextViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; 55 | self.textViewCell.textView.font = self.textFieldCell.textField.font; 56 | //self.textViewCell.textView.text = @"TextView Cell - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent blandit malesuada turpis quis egestas. Curabitur varius nunc nec leo tincidunt mattis. Cras malesuada euismod lobortis. Praesent ultrices malesuada lorem et convallis. Pellentesque hendrerit lectus eget felis rutrum vel volutpat nisl semper. Suspendisse consectetur sem eu arcu ullamcorper ut cursus est fringilla. Suspendisse blandit rhoncus nisi ac lacinia. Curabitur vestibulum mattis eros a accumsan. Morbi pulvinar consequat hendrerit. In hac habitasse platea dictumst. Mauris euismod convallis faucibus. Morbi faucibus ultricies elit, ac ullamcorper ipsum accumsan et."; 57 | self.textViewCell.textView.placeholder = @"Placeholder"; 58 | 59 | 60 | 61 | } 62 | 63 | #pragma mark UITableView Delegate & DataSource 64 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 65 | return 5; 66 | } 67 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 68 | return 1; 69 | } 70 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 71 | 72 | UITableViewCell *cell; 73 | 74 | switch (indexPath.section) { 75 | case 0: 76 | cell = self.buttonCell; 77 | break; 78 | case 1: 79 | cell = self.textFieldCell; 80 | break; 81 | default: 82 | cell = self.textViewCell; 83 | break; 84 | } 85 | 86 | 87 | return cell; 88 | 89 | } 90 | - (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 91 | return indexPath.section == 4 ? 140 : 44; 92 | } 93 | 94 | 95 | 96 | 97 | @end -------------------------------------------------------------------------------- /Examples/Classes/NetworkRequestProgressViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkRequestViewController.h 3 | // Created by Devin Ross on 9/24/11. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | @import tapku; 34 | 35 | @interface NetworkRequestProgressViewController : TKViewController 36 | 37 | @property (nonatomic,strong) TKProgressCircleView *circle; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Examples/Classes/NetworkRequestProgressViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkRequestViewController.m 3 | // Created by Devin Ross on 9/24/11. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "NetworkRequestProgressViewController.h" 33 | 34 | @implementation NetworkRequestProgressViewController 35 | 36 | - (instancetype) init{ 37 | if(!(self=[super init])) return nil; 38 | return self; 39 | } 40 | 41 | - (void) loadView{ 42 | [super loadView]; 43 | self.view.backgroundColor = [UIColor colorWithWhite:0.8 alpha:1]; 44 | 45 | 46 | CGFloat y = CGRectGetHeight(self.view.bounds)/2.0; 47 | CGFloat x = CGRectGetWidth(self.view.bounds)/2.0; 48 | self.circle = [[TKProgressCircleView alloc] init]; 49 | self.circle.center = CGPointMake(x,y); 50 | self.circle.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; 51 | [self.view addSubview:self.circle]; 52 | 53 | 54 | UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Start" style:UIBarButtonItemStylePlain target:self action:@selector(start)]; 55 | self.navigationItem.rightBarButtonItem = item; 56 | 57 | 58 | } 59 | 60 | - (void) start{ 61 | 62 | __weak TKHTTPRequest *req = [TKHTTPRequest requestWithURL:[NSURL URLWithString:@"http://devinsheaven.com/tapkulibrary.zip"]]; 63 | 64 | req.delegate = self; 65 | req.didFinishSelector = @selector(networkRequestDidFinish:); 66 | req.progressDelegate = self; 67 | 68 | 69 | [req setStartedBlock:^{ NSLog(@"Started... %@",req); }]; 70 | [req setFailedBlock:^{ NSLog(@"Failed... %@ %@",req,req.error); }]; 71 | [req startAsynchronous]; 72 | 73 | } 74 | 75 | - (void) request:(TKHTTPRequest*)request didReceiveTotalBytes:(NSInteger)received ofExpectedBytes:(NSInteger)total{ 76 | 77 | CGFloat percentage = (CGFloat)received / (CGFloat)total; 78 | NSLog(@"Received... %@ of %@ (%@%%)",@(received),@(total),@(percentage*100)); 79 | [self.circle setProgress:percentage animated:YES]; 80 | } 81 | - (void) networkRequestDidFinish:(TKHTTPRequest*)request{ 82 | NSData *data = [request responseData]; 83 | 84 | NSLog(@"Finished... %@ (length %lu)",request,(unsigned long)data.length); 85 | 86 | } 87 | 88 | 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /Examples/Classes/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // Created by Devin Ross on 12/2/09. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | @import tapku; 34 | @class DetailViewController; 35 | 36 | @interface RootViewController : TKTableViewController 37 | 38 | @property (nonatomic,strong) NSArray *data; 39 | @property (nonatomic,strong) DetailViewController *detailViewController; 40 | 41 | @end -------------------------------------------------------------------------------- /Examples/Examples-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | Tapku 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchImageFile~iphone 26 | launch_iphone.png 27 | UIPrerenderedIcon 28 | 29 | UIStatusBarTintParameters 30 | 31 | UINavigationBar 32 | 33 | Style 34 | UIBarStyleDefault 35 | Translucent 36 | 37 | 38 | 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | UISupportedInterfaceOrientations~ipad 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | UIInterfaceOrientationPortraitUpsideDown 51 | 52 | UISupportedInterfaceOrientations~iphone 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationLandscapeLeft 56 | UIInterfaceOrientationPortraitUpsideDown 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Examples/Examples.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/Demo.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 8BD676BE-2736-47E1-BDB5-4E9554015590 9 | IDESourceControlProjectName 10 | Demo 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | EE5017F42780957232AFF14DD75D9A51833942BE 14 | github.com:devinross/tapkulibrary.git 15 | 16 | IDESourceControlProjectPath 17 | demo/Demo.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | EE5017F42780957232AFF14DD75D9A51833942BE 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:devinross/tapkulibrary.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | EE5017F42780957232AFF14DD75D9A51833942BE 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | EE5017F42780957232AFF14DD75D9A51833942BE 36 | IDESourceControlWCCName 37 | tapkulibrary 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/Examples.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 422A1A24-BF3B-41EA-AA02-E37C392352B8 9 | IDESourceControlProjectName 10 | Examples 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 771CDDC8828BA5C85B70BAEAFD5C3B58BF9E0AE2 14 | github.com:devinross/curry.git 15 | EE5017F42780957232AFF14DD75D9A51833942BE 16 | github.com:devinross/tapkulibrary.git 17 | 18 | IDESourceControlProjectPath 19 | Examples/Examples.xcodeproj 20 | IDESourceControlProjectRelativeInstallPathDictionary 21 | 22 | 771CDDC8828BA5C85B70BAEAFD5C3B58BF9E0AE2 23 | ../../../Vendor/curry/ 24 | EE5017F42780957232AFF14DD75D9A51833942BE 25 | ../../.. 26 | 27 | IDESourceControlProjectURL 28 | github.com:devinross/tapkulibrary.git 29 | IDESourceControlProjectVersion 30 | 111 31 | IDESourceControlProjectWCCIdentifier 32 | EE5017F42780957232AFF14DD75D9A51833942BE 33 | IDESourceControlProjectWCConfigurations 34 | 35 | 36 | IDESourceControlRepositoryExtensionIdentifierKey 37 | public.vcs.git 38 | IDESourceControlWCCIdentifierKey 39 | 771CDDC8828BA5C85B70BAEAFD5C3B58BF9E0AE2 40 | IDESourceControlWCCName 41 | curry 42 | 43 | 44 | IDESourceControlRepositoryExtensionIdentifierKey 45 | public.vcs.git 46 | IDESourceControlWCCIdentifierKey 47 | EE5017F42780957232AFF14DD75D9A51833942BE 48 | IDESourceControlWCCName 49 | tapkulibrary 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/Examples.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "EE5017F42780957232AFF14DD75D9A51833942BE", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "EE5017F42780957232AFF14DD75D9A51833942BE" : 0, 8 | "771CDDC8828BA5C85B70BAEAFD5C3B58BF9E0AE2" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "422A1A24-BF3B-41EA-AA02-E37C392352B8", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "EE5017F42780957232AFF14DD75D9A51833942BE" : "tapkulibrary", 13 | "771CDDC8828BA5C85B70BAEAFD5C3B58BF9E0AE2" : "tapkulibrary\/Vendor\/curry" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "Examples", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Examples\/Examples.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:devinross\/curry.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "771CDDC8828BA5C85B70BAEAFD5C3B58BF9E0AE2" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:devinross\/tapkulibrary.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "EE5017F42780957232AFF14DD75D9A51833942BE" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Examples/Examples_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'universaldemo' target in the 'universal demo' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | @import Foundation; 7 | @import UIKit; 8 | @import tapku; 9 | //#import 10 | #endif 11 | -------------------------------------------------------------------------------- /Examples/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Created by Devin Ross on 7/7/10. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | #import 34 | #import 35 | 36 | 37 | // FOR SWIZZLING METHODS.. HACKERS ONLY PLEASE 38 | void Swizzle(Class c, SEL orig, SEL new){ 39 | Method origMethod = class_getInstanceMethod(c, orig); 40 | Method newMethod = class_getInstanceMethod(c, new); 41 | if(class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))) 42 | class_replaceMethod(c, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)); 43 | else 44 | method_exchangeImplementations(origMethod, newMethod); 45 | 46 | } 47 | 48 | int main(int argc, char *argv[]) { 49 | @autoreleasepool { 50 | int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); 51 | return retVal; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2014 Devin Ross 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /LogicTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /README.mdown: -------------------------------------------------------------------------------- 1 | tapku 2 | ============ 3 | 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. 4 | 5 | 6 | Much of the foundation (besides UIKit) is built off of [curry](https://github.com/devinross/curry). [curry](https://github.com/devinross/curry) is a submodule you'll need to pull down with tapku to run. 7 | 8 | ## Documentation 9 | Browse the documentation at [devinsheaven.com/tapku/documentation](http://devinsheaven.com/tapku/documentation/). To add the documentation directly to XCode, [download the docset](http://devinsheaven.com/tapku/documentation/docset.zip) and place the docset into the `~/Library/Developer/Shared/Documentation/DocSets/` folder. 10 | 11 | ## Adding Tapku To Your Project 12 | Instructions on adding tapku library can be [found here](https://github.com/devinross/tapkulibrary/wiki/Adding-Tapku-to-Your-Project-in-XCode-4). For additional help, check out the demo project. 13 | 14 | 15 | Follow me on twitter [@devin_ross](http://twitter.com/devin_ross). 16 | 17 | 18 | ## History 19 | 20 | Tapku is an open source project I started back in the early days of the iOS SDK. Summer of 2009 to be exact (shout out to my peeps that [juggle and recite pi](https://www.youtube.com/watch?v=uF7n3P6Umv4)). It featured elements that made it popular like the calendar grid UI. (The kid got emails from the archdiocese of New Orleans, no lie.) Over time, any thing that I'd use often for different projects would wind up in tapku after I felt it was A. something that would be helpful to share between projects and B. up to standard of sharing with the community. 21 | 22 | tapku and iOS has changed a lot over the course of serveral years. I've updated the project and added and subtracted things. For the most part, I used tapku as my tool belt. But after years of much addition it became clear that some things could be divided up into different projects to better organize. So as of 2015, I've moved much of everyday utilities that are the underlying foundation to what I do to another github repo called [curry](https://github.com/devinross/curry). Any of the crazy UI stuff I've worked on lately will call [curryfire](https://github.com/devinross/curry-fire) a home (bring your apron and chef hat if you click that link). 23 | 24 | Tapku will remain home to the things like the calendar UIs, coverflow, and any legacy classes, ect. -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile Selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile Selected.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile Selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile Selected@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/Month Calendar Today Selected Tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/Month Calendar Today Selected Tile.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/Month Calendar Today Tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/Month Calendar Today Tile.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/calendar_left_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/calendar_left_arrow.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/calendar_left_arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/calendar_left_arrow@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/calendar_right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/calendar_right_arrow.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/calendar_right_arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/calendar_right_arrow@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/color_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/color_gradient.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/calendar/color_gradient_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/calendar/color_gradient_gray.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/chatbubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/chatbubble.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/chatbubble@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/chatbubble@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/clock.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/clock@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/clock@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/compass.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/compass@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/compass@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/eye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/eye.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/eye@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/eye@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/heart.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/heart@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/heart@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/key.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/key@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/key@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/malePerson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/malePerson.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/malePerson@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/malePerson@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/movieclip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/movieclip.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/movieclip@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/movieclip@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/note.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/note@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/note@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/photos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/photos.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/photos@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/photos@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/pictureframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/pictureframe.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/pictureframe@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/pictureframe@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/search.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/search@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/search@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/sign.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/sign@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/sign@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/star.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/star@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/star@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/stopwatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/stopwatch.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/stopwatch@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/stopwatch@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/television.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/television.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/empty/television@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/empty/television@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/keyboard/backspace-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/keyboard/backspace-key.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/keyboard/backspace-key@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/keyboard/backspace-key@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/keyboard/down-keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/keyboard/down-keyboard.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/keyboard/down-keyboard@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/keyboard/down-keyboard@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/keyboard/move-keyboard-dots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/keyboard/move-keyboard-dots.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/keyboard/move-keyboard-dots@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/keyboard/move-keyboard-dots@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/keyboard/next-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/keyboard/next-key.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/keyboard/next-key@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/keyboard/next-key@2x.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/unlockslider/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/unlockslider/arrow.png -------------------------------------------------------------------------------- /TapkuLibrary.bundle/Images/unlockslider/arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devinross/tapkulibrary/2a267d13552a3242c69ee8d384ea24116a73aca0/TapkuLibrary.bundle/Images/unlockslider/arrow@2x.png -------------------------------------------------------------------------------- /TapkuLibrary/NSDate+CalendarGrid.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+CalendarGrid.h 3 | // Created by Devin Ross on 8/19/12. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import Foundation; 33 | 34 | @interface NSDate (CalendarGrid) 35 | 36 | - (NSDate*) firstOfMonthWithTimeZone:(NSTimeZone*)timeZone; 37 | - (NSDate*) nextMonthWithTimeZone:(NSTimeZone*)timeZone; 38 | - (NSDate*) previousMonthWithTimeZone:(NSTimeZone*)timeZone; 39 | 40 | - (NSDate*) lastOfMonthDateWithTimeZone:(NSTimeZone*)timeZone; 41 | + (NSDate*) lastofMonthDateWithTimeZone:(NSTimeZone*)timeZone; 42 | + (NSDate*) lastOfCurrentMonthWithTimeZone:(NSTimeZone*)timeZone; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /TapkuLibrary/NSDate+CalendarGrid.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+CalendarGrid.m 3 | // Created by Devin Ross on 8/19/12. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "NSDate+CalendarGrid.h" 33 | 34 | @implementation NSDate (CalendarGrid) 35 | 36 | 37 | - (NSDate*) firstOfMonthWithTimeZone:(NSTimeZone*)timeZone{ 38 | 39 | NSDateComponents *info = [self dateComponentsWithTimeZone:timeZone]; 40 | 41 | info.day = 1; 42 | info.minute = 0; 43 | info.second = 0; 44 | info.hour = 0; 45 | 46 | info.timeZone = timeZone; 47 | 48 | return [NSDate dateWithDateComponents:info]; 49 | } 50 | - (NSDate*) nextMonthWithTimeZone:(NSTimeZone*)timeZone{ 51 | 52 | 53 | NSDateComponents *info = [self dateComponentsWithTimeZone:timeZone]; 54 | info.month++; 55 | if(info.month>12){ 56 | info.month = 1; 57 | info.year++; 58 | } 59 | info.minute = info.second = info.hour = 0; 60 | 61 | return [NSDate dateWithDateComponents:info]; 62 | 63 | } 64 | - (NSDate*) previousMonthWithTimeZone:(NSTimeZone*)timeZone{ 65 | 66 | NSDateComponents *components = [self dateComponentsWithTimeZone:timeZone]; 67 | 68 | components.month--; 69 | if(components.month<1){ 70 | components.month = 12; 71 | components.year--; 72 | } 73 | 74 | components.second = components.minute = components.hour = 0; 75 | 76 | 77 | return [NSDate dateWithDateComponents:components]; 78 | 79 | 80 | } 81 | 82 | - (NSDate*) lastOfMonthDateWithTimeZone:(NSTimeZone*)timeZone{ 83 | NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; 84 | gregorian.timeZone = timeZone; 85 | NSDateComponents *comp = [gregorian components:(NSCalendarUnitYear | NSCalendarUnitMonth) fromDate:self]; 86 | comp.timeZone = timeZone; 87 | [comp setDay:0]; 88 | [comp setMonth:comp.month+1]; 89 | NSDate *date = [gregorian dateFromComponents:comp]; 90 | return date; 91 | } 92 | 93 | + (NSDate*) lastofMonthDateWithTimeZone:(NSTimeZone*)timeZone{ 94 | NSDate *day = [NSDate date]; 95 | NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; 96 | NSDateComponents *comp = [gregorian components:(NSCalendarUnitYear | NSCalendarUnitMonth) fromDate:day]; 97 | [comp setDay:0]; 98 | [comp setMonth:comp.month+1]; 99 | return [gregorian dateFromComponents:comp]; 100 | } 101 | + (NSDate*) lastOfCurrentMonthWithTimeZone:(NSTimeZone*)timeZone{ 102 | NSDate *day = [NSDate date]; 103 | NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; 104 | NSDateComponents *comp = [gregorian components:(NSCalendarUnitYear | NSCalendarUnitMonth) fromDate:day]; 105 | [comp setDay:0]; 106 | [comp setMonth:comp.month+1]; 107 | return [gregorian dateFromComponents:comp]; 108 | } 109 | 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /TapkuLibrary/TKAlertCenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKAlertCenter.h 3 | // Created by Devin Ross on 9/29/10. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import Foundation; 33 | @import UIKit; 34 | 35 | @class TKAlertView; 36 | 37 | /** A notification center for displaying quick bursts of alert information to the user. */ 38 | @interface TKAlertCenter : NSObject { 39 | NSMutableArray *_alerts; 40 | BOOL _active; 41 | TKAlertView *_alertView; 42 | CGRect _alertFrame; 43 | } 44 | 45 | /** Returns the process’s default notification center. 46 | @return The current process’s default notification center, which is used for alert notifications. 47 | */ 48 | + (TKAlertCenter*) defaultCenter; 49 | 50 | 51 | /** Posts a given alert message to the user. 52 | @param message The message shown under an image. 53 | @param image The image displayed to the user. If image is nil, the message will only be shown. 54 | */ 55 | - (void) postAlertWithMessage:(NSString*)message image:(UIImage*)image; 56 | 57 | /** Posts a given alert message to the user. 58 | @param message The message shown under an image. 59 | */ 60 | - (void) postAlertWithMessage:(NSString *)message; 61 | 62 | @end -------------------------------------------------------------------------------- /TapkuLibrary/TKAlertViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKAlertViewController.h 3 | // Created by Devin Ross on 10/21/13. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | 34 | /** 35 | This class is a cool little alert view like view controller to subclass. 36 | You can add you message to the alertView and you call the show and hide methods just like `UIAlertView`. 37 | */ 38 | @interface TKAlertViewController : UIViewController 39 | 40 | 41 | ///---------------------------- 42 | /// @name Properties 43 | ///---------------------------- 44 | /** The main view to display content on. */ 45 | @property (nonatomic,strong) UIView *alertView; 46 | 47 | @property (nonatomic,strong) UIColor *backgroundShadeColor; 48 | 49 | 50 | ///---------------------------- 51 | /// @name Displaying and hiding alert 52 | ///---------------------------- 53 | 54 | /** Show the alert */ 55 | - (void) show; 56 | 57 | /** Hide the alert */ 58 | - (void) hide; 59 | 60 | /** 61 | Overwrite this function to implement your own presentation animation. 62 | @param transitionContext The transition context. 63 | */ 64 | - (void) showAlertView:(id)transitionContext; 65 | 66 | /** 67 | Overwrite this function to implement your own dismissal animation. 68 | @param transitionContext The transition context. 69 | */ 70 | - (void) hideAlertView:(id)transitionContext; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /TapkuLibrary/TKAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKAppDelegate.h 3 | // Created by Devin Ross on 1/31/11. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import Foundation; 33 | @import UIKit; 34 | 35 | @class TKWindow; 36 | 37 | /** This class allocates a `TKWindow` instance and provides a convience method for application launching. */ 38 | @interface TKAppDelegate : NSObject 39 | 40 | 41 | /** This is a convience method for setup of the initial app state. 42 | Apple recommends placing initialization of 43 | application:willFinishLaunchingWithOptions (instead of didFinish) 44 | for iOS 6 despite its absence in previous versions of iOS. 45 | Subclassing the method will take care of that recommendation 46 | automatically. The UIWindow for the application is allocated and 47 | setup just before this method is called. The default implementation 48 | does nothing. 49 | @param application The application instance. 50 | @param launchOptions The launch options. 51 | */ 52 | - (void) application:(UIApplication *)application commonInitializationLaunching:(NSDictionary *)launchOptions; 53 | 54 | 55 | 56 | /** This is a convience method for placing any functionality that might be called upon initial launch of the application and any subsequent relaunch from a background state. Default implementation does nothing. 57 | @param application The application instance. 58 | */ 59 | - (void) applicationDidStartup:(UIApplication *)application; 60 | 61 | 62 | ///---------------------------- 63 | /// @name Properties 64 | ///---------------------------- 65 | 66 | /** Returns the application main window. */ 67 | @property (nonatomic,strong) UIWindow *window; 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /TapkuLibrary/TKAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKAppDelegate.m 3 | // Created by Devin Ross on 1/31/11. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKAppDelegate.h" 33 | 34 | @implementation TKAppDelegate 35 | 36 | 37 | 38 | 39 | - (void) application:(UIApplication *)application commonInitializationLaunching:(NSDictionary *)launchOptions{ 40 | 41 | } 42 | - (void) _application:(UIApplication *)application commonInitializationLaunching:(NSDictionary *)launchOptions{ 43 | static dispatch_once_t onceToken; 44 | dispatch_once(&onceToken, ^{ 45 | 46 | if(self.window==nil){ 47 | self.window = [[TKWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 48 | self.window.backgroundColor = [UIColor blackColor]; 49 | [self.window makeKeyAndVisible]; 50 | } 51 | [self application:application commonInitializationLaunching:launchOptions]; 52 | 53 | }); 54 | } 55 | 56 | 57 | - (BOOL) application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ 58 | [self _application:application commonInitializationLaunching:launchOptions]; 59 | return YES; 60 | } 61 | - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ 62 | [self _application:application commonInitializationLaunching:launchOptions]; 63 | [self applicationDidStartup:application]; 64 | return YES; 65 | } 66 | 67 | - (void) applicationWillEnterForeground:(UIApplication *)application { 68 | [self applicationDidStartup:application]; 69 | } 70 | - (void) applicationDidStartup:(UIApplication *)application{ 71 | // Default Implementaion Does Nothing 72 | } 73 | 74 | 75 | 76 | 77 | - (void) applicationDidEnterBackground:(UIApplication *)application { 78 | 79 | } 80 | - (void) applicationWillTerminate:(UIApplication *)application { 81 | 82 | } 83 | 84 | - (void) applicationWillResignActive:(UIApplication *)application { 85 | 86 | } 87 | - (void) applicationDidBecomeActive:(UIApplication *)application { 88 | 89 | } 90 | 91 | #pragma mark Memory management 92 | - (void) applicationDidReceiveMemoryWarning:(UIApplication *)application { 93 | 94 | } 95 | 96 | 97 | 98 | 99 | 100 | @end 101 | -------------------------------------------------------------------------------- /TapkuLibrary/TKButtonCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKButtonCell.h 3 | // Created by Devin Ross on 7/2/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | 34 | /** A `UITableViewCell` with a centered text label. */ 35 | @interface TKButtonCell : UITableViewCell 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /TapkuLibrary/TKButtonCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKButtonCell.m 3 | // Created by Devin Ross on 7/2/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKButtonCell.h" 33 | 34 | 35 | @implementation TKButtonCell 36 | 37 | - (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 38 | if(!(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil; 39 | 40 | self.textLabel.textAlignment = NSTextAlignmentCenter; 41 | self.textLabel.font = [UIFont boldSystemFontOfSize:14.0]; 42 | 43 | self.textLabel.textColor = [UIColor colorWithRed:74/255.0 green:110/255.0 blue:165/255.0 alpha:1.0]; 44 | self.textLabel.highlightedTextColor = [UIColor whiteColor]; 45 | 46 | 47 | 48 | return self; 49 | } 50 | 51 | - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { 52 | return [self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; 53 | } 54 | 55 | 56 | - (void) layoutSubviews { 57 | [super layoutSubviews]; 58 | CGRect r = CGRectInset(self.contentView.bounds , 20, 8); 59 | self.textLabel.frame = r; 60 | } 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /TapkuLibrary/TKCalendarDayEventView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKCalendarDayEventView.h 3 | // Created by Devin Ross on 7/28/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | @import QuartzCore; 34 | 35 | #pragma mark - TKCalendarDayEventView 36 | /** `TKCalendarDayEventView` is displayed by `TKCalendarDayView`. */ 37 | @interface TKCalendarDayEventView : UIView 38 | 39 | /** Returns an event view. 40 | @return Returns `TKCalendarDayEventView` object. 41 | */ 42 | + (TKCalendarDayEventView*) eventView; 43 | 44 | + (TKCalendarDayEventView*) eventViewWithIdentifier:(NSNumber *)identifier startDate:(NSDate *)startDate endDate:(NSDate *)endDate title:(NSString *)title location:(NSString *)location; 45 | 46 | /** The identifier for the event. */ 47 | @property (nonatomic,strong) NSNumber *identifier; 48 | 49 | /** The start date for the event. */ 50 | @property (nonatomic,strong) NSDate *startDate; 51 | 52 | /** The end date for the event. */ 53 | @property (nonatomic,strong) NSDate *endDate; 54 | 55 | /** The title label for the event. */ 56 | @property (nonatomic,strong) UILabel *titleLabel; 57 | 58 | /** The location label for the event. */ 59 | @property (nonatomic,strong) UILabel *locationLabel; 60 | 61 | @property (nonatomic,strong) UIView *edgeView; 62 | 63 | @property (nonatomic, readonly) CGFloat contentHeight; 64 | 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /TapkuLibrary/TKCalendarDayViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKCalendarDayViewController.h 3 | // Created by Devin Ross on 7/28/09. 4 | /* 5 | 6 | tapku || http://github.com/devinross/tapkulibrary 7 | 8 | Permission is hereby granted, free of charge, to any person 9 | obtaining a copy of this software and associated documentation 10 | files (the "Software"), to deal in the Software without 11 | restriction, including without limitation the rights to use, 12 | copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the 14 | Software is furnished to do so, subject to the following 15 | conditions: 16 | 17 | The above copyright notice and this permission notice shall be 18 | included in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | OTHER DEALINGS IN THE SOFTWARE. 28 | 29 | */ 30 | 31 | 32 | @import UIKit; 33 | #import "TKCalendarDayView.h" 34 | 35 | #pragma mark - TKCalendarDayViewController 36 | /** The `TKCalendarDayViewController` class creates a controller object that manages a calendar day view. */ 37 | @interface TKCalendarDayViewController : UIViewController 38 | 39 | /** Returns the day view managed by the controller object. */ 40 | @property (nonatomic,strong) TKCalendarDayView *dayView; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /TapkuLibrary/TKCalendarDayViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKCalendarDayViewController.m 3 | // Created by Devin Ross on 7/28/09. 4 | /* 5 | 6 | tapku || http://github.com/devinross/tapkulibrary 7 | 8 | Permission is hereby granted, free of charge, to any person 9 | obtaining a copy of this software and associated documentation 10 | files (the "Software"), to deal in the Software without 11 | restriction, including without limitation the rights to use, 12 | copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the 14 | Software is furnished to do so, subject to the following 15 | conditions: 16 | 17 | The above copyright notice and this permission notice shall be 18 | included in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 27 | OTHER DEALINGS IN THE SOFTWARE. 28 | 29 | */ 30 | 31 | #import "TKCalendarDayViewController.h" 32 | #import "TKCalendarDayEventView.h" 33 | #import "TKCalendarDayView.h" 34 | 35 | #pragma mark - TKCalendarDayViewController 36 | @implementation TKCalendarDayViewController 37 | 38 | #pragma mark View Lifecycle 39 | - (void) loadView{ 40 | [super loadView]; 41 | 42 | CGRect frame = self.view.frame; 43 | frame.size.width = [UIDevice currentDevice].phoneIdiom ? CGRectGetWidth(self.view.frame) : 320; 44 | self.view.frame = frame; 45 | 46 | if([self respondsToSelector:@selector(edgesForExtendedLayout)]) 47 | self.edgesForExtendedLayout = UIRectEdgeNone; 48 | self.dayView = [[TKCalendarDayView alloc] initWithFrame:self.view.bounds]; 49 | self.dayView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 50 | self.dayView.delegate = self; 51 | self.dayView.dataSource = self; 52 | [self.view addSubview:self.dayView]; 53 | } 54 | 55 | 56 | #pragma mark TKCalendarDayViewDelegate 57 | - (NSArray *) calendarDayTimelineView:(TKCalendarDayView*)calendarDayTimeline eventsForDate:(NSDate *)eventDate{ 58 | return @[]; 59 | } 60 | - (void) calendarDayTimelineView:(TKCalendarDayView*)calendarDayTimeline eventViewWasSelected:(TKCalendarDayEventView *)eventView{ 61 | 62 | } 63 | 64 | - (void) calendarDayTimelineView:(TKCalendarDayView*)calendarDayTimeline didMoveToDate:(NSDate*)eventDate{ 65 | 66 | } 67 | 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /TapkuLibrary/TKCalendarMonthTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKCalendarMonthTableViewController.h 3 | // Created by Devin Ross on 10/31/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | #import "TKCalendarMonthViewController.h" 34 | 35 | /** The `TKCalendarMonthTableViewController` class creates a controller object that manages a calendar month grid with a table view below it. */ 36 | @interface TKCalendarMonthTableViewController : TKCalendarMonthViewController 37 | 38 | /** Returns the table view managed by the controller object. */ 39 | @property (nonatomic,strong) UITableView *tableView; 40 | 41 | /** Will adjust the table view to the changing month view height 42 | @param animated Animation flag. 43 | */ 44 | - (void) updateTableOffset:(BOOL)animated; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /TapkuLibrary/TKCalendarMonthTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKCalendarMonthTableViewController.m 3 | // Created by Devin Ross on 10/31/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | #import "TKCalendarMonthTableViewController.h" 32 | 33 | @implementation TKCalendarMonthTableViewController 34 | 35 | 36 | - (void) loadView{ 37 | [super loadView]; 38 | self.tableView.backgroundColor = [UIColor whiteColor]; 39 | 40 | float y,height; 41 | y = CGRectGetMaxY(self.monthView.frame); 42 | height = CGRectGetHeight(self.view.frame) - y; 43 | 44 | 45 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, y, CGRectGetWidth(self.view.bounds), height) style:UITableViewStylePlain]; 46 | _tableView.delegate = self; 47 | _tableView.dataSource = self; 48 | _tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 49 | [self.view addSubview:_tableView]; 50 | [self.view sendSubviewToBack:_tableView]; 51 | } 52 | 53 | 54 | 55 | #pragma mark TableView Delegate & Data Source 56 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 57 | return 0; 58 | } 59 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 60 | return 0; 61 | } 62 | - (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath { 63 | 64 | static NSString *CellIdentifier = @"Cell"; 65 | 66 | UITableViewCell *cell = [tv dequeueReusableCellWithIdentifier:CellIdentifier]; 67 | if (cell == nil) { 68 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; 69 | } 70 | 71 | 72 | return cell; 73 | } 74 | 75 | #pragma mark Month View Delegate & Data Source 76 | - (void) calendarMonthView:(TKCalendarMonthView*)monthView didSelectDate:(NSDate*)d{ 77 | } 78 | - (void) calendarMonthView:(TKCalendarMonthView*)monthView monthDidChange:(NSDate*)month animated:(BOOL)animated{ 79 | [self updateTableOffset:animated]; 80 | } 81 | 82 | - (void) updateTableOffset:(BOOL)animated{ 83 | 84 | 85 | if(animated){ 86 | [UIView beginAnimations:nil context:nil]; 87 | [UIView setAnimationDuration:0.4]; 88 | [UIView setAnimationDelay:0.1]; 89 | } 90 | 91 | 92 | CGFloat y = CGRectGetMaxY(self.monthView.frame); 93 | self.tableView.frame = CGRectMake(CGRectGetMinX(self.tableView.frame), y, CGRectGetWidth(self.tableView.frame), CGRectGetHeight(self.view.frame) - y); 94 | 95 | if(animated) [UIView commitAnimations]; 96 | } 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /TapkuLibrary/TKCalendarMonthViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKCalendarMonthViewController.h 3 | // Created by Devin Ross on 7/28/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | #import "TKCalendarMonthView.h" 34 | 35 | @class TKCalendarMonthView; 36 | @protocol TKCalendarMonthViewDelegate,TKCalendarMonthViewDataSource; 37 | 38 | 39 | /** The `TKCalendarMonthViewController` class creates a controller object that manages a calendar month grid. */ 40 | @interface TKCalendarMonthViewController : UIViewController 41 | 42 | /** Initializes a month view controller to manage a month grid. Sunday will be the left-most day. 43 | @return A newly create month view controller. 44 | */ 45 | - (instancetype) init; 46 | 47 | /** Initializes a month view controller to manage a month grid. 48 | @param sundayFirst If YES, Sunday will be the left most day in the month grid, otherwise Monday. 49 | @return A newly create month view controller. 50 | */ 51 | - (instancetype) initWithSunday:(BOOL)sundayFirst; 52 | 53 | /** Initializes a month view controller to manage a month grid. Sunday will be the left-most day. 54 | @param timeZone The time zone for the calendar grid. 55 | @param sundayFirst If YES, Sunday will be the left most day in the month grid, otherwise Monday. 56 | @return A newly create month view controller. 57 | */ 58 | - (instancetype) initWithSunday:(BOOL)sundayFirst timeZone:(NSTimeZone*)timeZone; 59 | 60 | /** Initializes a month view controller to manage a month grid. Sunday will be the left-most day. 61 | @param timeZone The time zone for the calendar grid. 62 | @return A newly create month view controller. 63 | */ 64 | - (instancetype) initWithTimeZone:(NSTimeZone *)timeZone; 65 | 66 | 67 | /** Returns the month view managed by the controller object. */ 68 | @property (nonatomic,strong) TKCalendarMonthView *monthView; 69 | 70 | 71 | @end 72 | 73 | -------------------------------------------------------------------------------- /TapkuLibrary/TKCalendarMonthViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKCalendarMonthViewController.m 3 | // Created by Devin Ross on 7/28/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | #import "TKCalendarMonthViewController.h" 32 | #import "TKCalendarMonthView.h" 33 | 34 | 35 | @interface TKCalendarMonthViewController () 36 | @property (nonatomic,strong) NSTimeZone *timeZone; 37 | @property (nonatomic,assign) BOOL sundayFirst; 38 | @end 39 | 40 | @implementation TKCalendarMonthViewController 41 | 42 | - (instancetype) init{ 43 | self = [self initWithSunday:YES]; 44 | return self; 45 | } 46 | - (instancetype) initWithSunday:(BOOL)sundayFirst{ 47 | self = [self initWithSunday:sundayFirst timeZone:[NSTimeZone defaultTimeZone]]; 48 | return self; 49 | } 50 | - (instancetype) initWithTimeZone:(NSTimeZone *)timeZone{ 51 | self = [self initWithSunday:YES timeZone:self.timeZone]; 52 | return self; 53 | } 54 | - (instancetype) initWithSunday:(BOOL)sundayFirst timeZone:(NSTimeZone *)timeZone{ 55 | if(!(self = [super init])) return nil; 56 | self.timeZone = timeZone; 57 | self.sundayFirst = sundayFirst; 58 | return self; 59 | } 60 | - (instancetype) initWithCoder:(NSCoder *)decoder { 61 | if(!(self=[self initWithCoder:decoder])) return nil; 62 | self.timeZone = [NSTimeZone defaultTimeZone]; 63 | self.sundayFirst = YES; 64 | return self; 65 | } 66 | 67 | 68 | - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 69 | return NO; 70 | } 71 | 72 | - (void) loadView{ 73 | [super loadView]; 74 | self.view.backgroundColor = [UIColor whiteColor]; 75 | 76 | if([self respondsToSelector:@selector(edgesForExtendedLayout)]) 77 | self.edgesForExtendedLayout = UIRectEdgeNone; 78 | 79 | self.monthView = [[TKCalendarMonthView alloc] initWithSundayAsFirst:self.sundayFirst timeZone:self.timeZone]; 80 | self.monthView.dataSource = self; 81 | self.monthView.delegate = self; 82 | [self.view addSubview:self.monthView]; 83 | } 84 | 85 | - (NSArray*) calendarMonthView:(TKCalendarMonthView*)monthView marksFromDate:(NSDate*)startDate toDate:(NSDate*)lastDate{ 86 | return nil; 87 | } 88 | 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /TapkuLibrary/TKGlobal.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKGlobal.h 3 | // Created by Devin Ross on 7/25/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import Foundation; 33 | @import UIKit; 34 | @import QuartzCore; 35 | 36 | 37 | #define TKLog(s, ...) NSLog( @"[%@ %@] %@",NSStringFromClass([self class]), NSStringFromSelector(_cmd),[NSString stringWithFormat:(s), ##__VA_ARGS__] ) 38 | 39 | #define TKBUNDLE(_URL) [TKGlobal fullBundlePath:[@"TapkuLibrary.bundle/Images" stringByAppendingPathComponent:_URL]] 40 | 41 | 42 | 43 | 44 | 45 | 46 | @interface TKGlobal : NSObject 47 | 48 | + (NSString*) fullBundlePath:(NSString*)bundlePath; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /TapkuLibrary/TKGlobal.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKGlobal.m 3 | // Created by Devin Ross on 7/25/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | #import "TKGlobal.h" 32 | 33 | @implementation TKGlobal 34 | 35 | 36 | + (NSString*) fullBundlePath:(NSString*)bundlePath{ 37 | return [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:bundlePath]; 38 | } 39 | 40 | 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelCell.h 3 | // Created by Devin Ross on 7/1/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | 34 | 35 | /** 36 | This class is the base class for displaying a `UITableViewCell` with a label to the left of a main view element. Good for forms and entering lots of data. 37 | */ 38 | @interface TKLabelCell : UITableViewCell 39 | 40 | 41 | ///---------------------------- 42 | /// @name Properties 43 | ///---------------------------- 44 | 45 | /** A `UILabel` that will be a title for the core view. */ 46 | @property (nonatomic,strong) UILabel *label; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelCell.m 3 | // Created by Devin Ross on 7/1/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKLabelCell.h" 33 | 34 | @implementation TKLabelCell 35 | 36 | 37 | - (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 38 | if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil; 39 | 40 | _label = [[UILabel alloc] initWithFrame:CGRectZero]; 41 | _label.backgroundColor = [UIColor clearColor]; 42 | _label.textAlignment = NSTextAlignmentRight; 43 | _label.textColor = [UIColor grayColor]; 44 | _label.highlightedTextColor = [UIColor whiteColor]; 45 | _label.font = [UIFont boldSystemFontOfSize:12.0]; 46 | _label.adjustsFontSizeToFitWidth = YES; 47 | _label.baselineAdjustment = UIBaselineAdjustmentNone; 48 | _label.numberOfLines = 20; 49 | 50 | [self.contentView addSubview:_label]; 51 | 52 | 53 | return self; 54 | } 55 | - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { 56 | self = [self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; 57 | return self; 58 | } 59 | 60 | 61 | - (void) layoutSubviews { 62 | [super layoutSubviews]; 63 | 64 | CGRect r = CGRectInset(self.contentView.bounds, 8, 8); 65 | r.size = CGSizeMake(72,27); 66 | _label.frame = r; 67 | 68 | 69 | } 70 | 71 | 72 | 73 | @end -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelFieldCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelFieldCell.h 3 | // Created by Devin Ross on 7/2/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKLabelCell.h" 33 | 34 | /** A `TKLabelCell` with a `UILabel` field. */ 35 | @interface TKLabelFieldCell : TKLabelCell 36 | 37 | /** A `UILabel` field. */ 38 | @property (nonatomic,strong) UILabel *field; 39 | 40 | @end 41 | 42 | -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelFieldCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelFieldCell.m 3 | // Created by Devin Ross on 7/2/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKLabelFieldCell.h" 33 | 34 | 35 | @implementation TKLabelFieldCell 36 | 37 | - (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 38 | if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil; 39 | 40 | _field = [[UILabel alloc] initWithFrame:CGRectZero]; 41 | _field.font = [UIFont boldSystemFontOfSize:16.0]; 42 | _field.backgroundColor = [UIColor clearColor]; 43 | _field.highlightedTextColor = [UIColor whiteColor]; 44 | [self.contentView addSubview:_field]; 45 | 46 | return self; 47 | } 48 | - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { 49 | self=[self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; 50 | return self; 51 | } 52 | 53 | - (void) layoutSubviews { 54 | [super layoutSubviews]; 55 | 56 | CGRect r = CGRectInset(self.contentView.bounds, 8, 8); 57 | CGFloat wid = CGRectGetWidth(self.label.frame); 58 | r.origin.x += wid + 6; 59 | r.size.width -= wid + 6; 60 | _field.frame = r; 61 | 62 | } 63 | 64 | 65 | 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelSwitchCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelSlider.h 3 | // Created by Devin Ross on 7/2/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | #import "TKLabelCell.h" 34 | 35 | /** A `TKLabelCell` with a `UISwitch` field. */ 36 | @interface TKLabelSwitchCell : TKLabelCell 37 | 38 | /** A `UISwitch` field. */ 39 | @property (nonatomic,strong) UISwitch *switcher; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelSwitchCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelSlider.m 3 | // Created by Devin Ross on 7/2/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKLabelSwitchCell.h" 33 | 34 | 35 | @implementation TKLabelSwitchCell 36 | 37 | 38 | - (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 39 | if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil; 40 | 41 | _switcher = [[UISwitch alloc] initWithFrame:CGRectZero]; 42 | [self.contentView addSubview:_switcher]; 43 | 44 | return self; 45 | } 46 | - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { 47 | self=[self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; 48 | return self; 49 | } 50 | 51 | - (void) layoutSubviews { 52 | [super layoutSubviews]; 53 | 54 | CGRect r = CGRectInset(self.bounds, 8, 8); 55 | CGFloat wid = CGRectGetWidth(self.label.frame); 56 | r.origin.x += wid + 6; 57 | r.size.width -= wid + 6; 58 | _switcher.frame = r; 59 | 60 | } 61 | 62 | 63 | @end -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelTextFieldCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelTextfieldCell.h 3 | // Created by Devin Ross on 7/1/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | #import "TKLabelCell.h" 34 | 35 | /** A `TKLabelCell` with a `UITextField` field. */ 36 | @interface TKLabelTextFieldCell : TKLabelCell 37 | 38 | /** A `UITextField` field. */ 39 | @property (nonatomic,strong) UITextField *field; 40 | 41 | @end -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelTextFieldCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelTextfieldCell.m 3 | // Created by Devin Ross on 7/1/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKLabelTextFieldCell.h" 33 | 34 | 35 | @implementation TKLabelTextFieldCell 36 | 37 | 38 | - (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ 39 | if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil; 40 | 41 | _field = [[UITextField alloc] initWithFrame:CGRectZero]; 42 | _field.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; 43 | _field.backgroundColor = [UIColor clearColor]; 44 | _field.font = [UIFont boldSystemFontOfSize:16.0]; 45 | _field.delegate = self; 46 | [self.contentView addSubview:_field]; 47 | 48 | 49 | return self; 50 | } 51 | - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { 52 | self = [self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; 53 | return self; 54 | } 55 | 56 | 57 | 58 | - (void) layoutSubviews { 59 | [super layoutSubviews]; 60 | 61 | CGRect r = CGRectInset(self.contentView.bounds, 8, 8); 62 | CGFloat wid = CGRectGetWidth(self.label.frame); 63 | r.origin.x += wid + 6; 64 | r.size.width -= wid + 6; 65 | _field.frame = r; 66 | 67 | 68 | } 69 | 70 | - (BOOL) textFieldShouldReturn:(UITextField *)textField{ 71 | [_field resignFirstResponder]; 72 | return NO; 73 | } 74 | 75 | 76 | - (void) setSelected:(BOOL)selected animated:(BOOL)animated { 77 | [super setSelected:selected animated:animated]; 78 | if(animated) 79 | [UIView beginAnimations:nil context:nil]; 80 | _field.textColor = selected ? [UIColor whiteColor] : [UIColor blackColor]; 81 | if(animated) 82 | [UIView commitAnimations]; 83 | } 84 | - (void) setHighlighted:(BOOL)highlighted animated:(BOOL)animated{ 85 | [super setHighlighted:highlighted animated:animated]; 86 | 87 | if(animated) 88 | [UIView beginAnimations:nil context:nil]; 89 | _field.textColor = highlighted ? [UIColor whiteColor] : [UIColor blackColor]; 90 | if(animated) 91 | [UIView commitAnimations]; 92 | } 93 | 94 | 95 | @end 96 | -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelTextViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelTextView.h 3 | // Created by Devin Ross on 7/1/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | 34 | #import "TKLabelCell.h" 35 | 36 | /** A `TKLabelCell` with a `UITextView` field. */ 37 | @interface TKLabelTextViewCell : TKLabelCell 38 | 39 | 40 | /** A `UITextView` field. */ 41 | @property (nonatomic,strong) UITextView *textView; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /TapkuLibrary/TKLabelTextViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKLabelTextView.m 3 | // Created by Devin Ross on 7/1/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKLabelTextViewCell.h" 33 | 34 | @implementation TKLabelTextViewCell 35 | 36 | - (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ 37 | if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil; 38 | 39 | _textView = [[UITextView alloc] initWithFrame:CGRectZero]; 40 | _textView.contentInset = UIEdgeInsetsZero; 41 | _textView.backgroundColor = [UIColor clearColor]; 42 | 43 | [self.contentView addSubview:_textView]; 44 | 45 | 46 | return self; 47 | } 48 | - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { 49 | self = [self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; 50 | return self; 51 | } 52 | 53 | - (void) layoutSubviews { 54 | [super layoutSubviews]; 55 | 56 | 57 | CGRect r = CGRectInset(self.contentView.bounds, 8, 8); 58 | CGFloat wid = CGRectGetWidth(self.label.frame); 59 | r.origin.x += wid; 60 | r.size.width -= wid; 61 | _textView.frame = r; 62 | 63 | } 64 | 65 | - (void) _colorText:(BOOL)active animated:(BOOL)animated{ 66 | if(animated) 67 | [UIView beginAnimations:nil context:nil]; 68 | _textView.textColor = active ? [UIColor whiteColor] : [UIColor grayColor]; 69 | if(animated) 70 | [UIView commitAnimations]; 71 | } 72 | - (void) setSelected:(BOOL)selected animated:(BOOL)animated { 73 | [super setSelected:selected animated:animated]; 74 | [self _colorText:selected animated:animated]; 75 | } 76 | - (void) setHighlighted:(BOOL)highlighted animated:(BOOL)animated{ 77 | [super setHighlighted:highlighted animated:animated]; 78 | [self _colorText:highlighted animated:animated]; 79 | } 80 | 81 | 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /TapkuLibrary/TKNetworkQueue.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKNetworkQueue.h 3 | // Created by Devin Ross on 9/24/11. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import Foundation; 33 | 34 | @class TKHTTPRequest; 35 | 36 | 37 | /** A network queue to manage `TKHTTPReuest` objects. */ 38 | @interface TKNetworkQueue : NSOperationQueue 39 | 40 | /** A shared network queue object. 41 | @return The shared `TKNetworkQueue` object. 42 | */ 43 | + (TKNetworkQueue*) sharedNetworkQueue; 44 | 45 | 46 | /** Initialize a network queue. 47 | @return A freshly initialized `TKNetworkQueue` object. 48 | */ 49 | + (TKNetworkQueue*) networkQueue; 50 | 51 | 52 | /** Cancels all network requests */ 53 | - (void) reset; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /TapkuLibrary/TKNetworkQueue.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKNetworkQueue.m 3 | // Created by Devin Ross on 9/24/11. 4 | // 5 | /* 6 | 7 | tapku || https://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKNetworkQueue.h" 33 | #import "TKHTTPRequest.h" 34 | 35 | @implementation TKNetworkQueue 36 | 37 | 38 | + (TKNetworkQueue*) sharedNetworkQueue{ 39 | __strong static TKNetworkQueue *sharedInstance = nil; 40 | if (!sharedInstance) { 41 | sharedInstance = [[TKNetworkQueue alloc] init]; 42 | [sharedInstance setMaxConcurrentOperationCount:4]; 43 | } 44 | return sharedInstance; 45 | } 46 | + (TKNetworkQueue*) networkQueue{ 47 | return [[self alloc] init]; 48 | } 49 | 50 | 51 | - (void) reset{ 52 | 53 | for(TKHTTPRequest *op in [self operations]) [op cancel]; 54 | [self cancelAllOperations]; 55 | 56 | } 57 | 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /TapkuLibrary/TKProgressAlertView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKProgressWindow.h 3 | // Created by Devin Ross on 4/29/10. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | @import UIKit; 34 | #import "TKProgressBarView.h" 35 | #import "TKAlertViewController.h" 36 | 37 | /** A simple alert view with a progress view. */ 38 | @interface TKProgressAlertView : TKAlertViewController 39 | 40 | /** Initializes a progress alert view with a title. 41 | @param title The title of the progress alert. 42 | @return A newly create progress alert view. 43 | */ 44 | - (instancetype) initWithProgressTitle:(NSString*)title; 45 | 46 | ///---------------------------- 47 | /// @name Properties 48 | ///---------------------------- 49 | 50 | /** The progress bar view */ 51 | @property (nonatomic,strong) TKProgressBarView *progressBar; 52 | 53 | /** The title label for the alert. */ 54 | @property (nonatomic,strong) UILabel *label; 55 | 56 | 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /TapkuLibrary/TKProgressAlertView.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKProgressWindow.m 3 | // Created by Devin Ross on 4/29/10. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKProgressAlertView.h" 33 | #import "TKGlobal.h" 34 | 35 | @implementation TKProgressAlertView 36 | 37 | 38 | - (instancetype) initWithProgressTitle:(NSString*)txt{ 39 | if(!(self=[super init])) return nil; 40 | self.label.text = txt; 41 | return self; 42 | } 43 | 44 | - (void) loadView{ 45 | [super loadView]; 46 | [self.alertView addSubview:self.progressBar]; 47 | [self.alertView addSubview:self.label]; 48 | self.alertView.frame = CGRectMake(0, 0, CGRectGetWidth(self.alertView.frame), CGRectGetMaxY(self.progressBar.frame) + 14); 49 | } 50 | 51 | 52 | 53 | #pragma mark Properties 54 | - (TKProgressBarView *) progressBar{ 55 | if(_progressBar) return _progressBar; 56 | 57 | _progressBar = [[TKProgressBarView alloc] initWithStyle:TKProgressBarViewStyleLong]; 58 | _progressBar.frame = CGRectMakeWithSize(37, 42, _progressBar.frame.size); 59 | return _progressBar; 60 | } 61 | - (UILabel*) label{ 62 | if(_label) return _label; 63 | 64 | _label = [[UILabel alloc] initWithFrame:CGRectMake(20, 10, 245, 25)]; 65 | _label.textAlignment = NSTextAlignmentCenter; 66 | _label.backgroundColor = [UIColor clearColor]; 67 | _label.textColor = [UIColor blackColor]; 68 | _label.font = [UIFont boldSystemFontOfSize:16]; 69 | return _label; 70 | } 71 | 72 | @end -------------------------------------------------------------------------------- /TapkuLibrary/TKProgressBarView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKProgressBar.h 3 | // Created by Devin Ross on 4/29/10. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | 34 | typedef NS_ENUM(NSInteger, TKProgressBarViewStyle) { 35 | TKProgressBarViewStyleLong, 36 | TKProgressBarViewStyleShort 37 | } ; 38 | 39 | 40 | /** A progress bar view. */ 41 | @interface TKProgressBarView : UIView { 42 | TKProgressBarViewStyle _style; 43 | float _progress,_displayProgress; 44 | } 45 | 46 | /** 47 | Initialize a progress bar. 48 | @param style The style of the progress bar. 49 | @return A progress bar or nil. 50 | */ 51 | - (instancetype) initWithStyle:(TKProgressBarViewStyle)style; 52 | 53 | /** The progress. */ 54 | @property (nonatomic,assign) float progress; // a value between 0.0 and 1.0 55 | 56 | 57 | /** 58 | Sets the progress. Allows for animation of the progress meter. 59 | @param progress The progress. 60 | @param animated Flag for animating the increase of the progress. 61 | */ 62 | - (void) setProgress:(float)progress animated:(BOOL)animated; 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /TapkuLibrary/TKProgressCircleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKProgressCircleView.h 3 | // Created by Devin Ross on 1/1/11. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | 34 | /** A progress circle view */ 35 | @interface TKProgressCircleView : UIView { 36 | BOOL _twirlMode; 37 | float _progress,_displayProgress; 38 | } 39 | 40 | /** Initialized a new progress circle view. */ 41 | - (instancetype) init; 42 | 43 | /** The progress displayed. Value between 0.0 and 1.0 */ 44 | @property (nonatomic,assign) float progress; // between 0.0 & 1.0 45 | 46 | /** Have the progress circle twirl instead of displaying the current progress. */ 47 | @property (assign,nonatomic,getter=isTwirling) BOOL twirlMode; 48 | 49 | /** Set the progress with the circle animating to the progress. 50 | @param progress The current progress. 51 | @param animated Flag to animate to the current progress. 52 | */ 53 | - (void) setProgress:(float)progress animated:(BOOL)animated; 54 | 55 | 56 | @end -------------------------------------------------------------------------------- /TapkuLibrary/TKReorderTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKReorderTableView.h 3 | // Created by Devin Ross on 6/25/13. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Portions Copyright (c) 2013 Ben Vogelzang. 10 | https://github.com/bvogelzang/BVReorderTableView 11 | 12 | Permission is hereby granted, free of charge, to any person 13 | obtaining a copy of this software and associated documentation 14 | files (the "Software"), to deal in the Software without 15 | restriction, including without limitation the rights to use, 16 | copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the 18 | Software is furnished to do so, subject to the following 19 | conditions: 20 | 21 | The above copyright notice and this permission notice shall be 22 | included in all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 26 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 28 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 29 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 30 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 31 | OTHER DEALINGS IN THE SOFTWARE. 32 | 33 | */ 34 | 35 | 36 | @import UIKit; 37 | @import QuartzCore; 38 | 39 | 40 | /** The delegate of a `TKReorderTableView` object must adopt the `TKReorderTableViewDelegate` protocol. */ 41 | @protocol TKReorderTableViewDelegate 42 | @required 43 | 44 | /** 45 | This method is called when starting the re-ording process. You should likely replace the data object corresponding to this index path from the data model with a dummy object until the reordering is complete. 46 | @param tableView The table view that will be reordered. 47 | @param indexPath The index path of the table view cell that will be moved. 48 | */ 49 | - (void) tableView:(UITableView*)tableView willReorderRowAtIndexPath:(NSIndexPath *)indexPath; 50 | 51 | /** 52 | This method is called when the selected row is dragged to a new position. You simply update your data source to reflect that the rows have switched places. This can be called multiple times during the reordering process. 53 | @param tableView The table view that will be reordered. 54 | @param fromIndexPath The original index path of the cell being moved. 55 | @param toIndexPath The new index path of the cell being moved. 56 | */ 57 | - (void) tableView:(UITableView*)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath; 58 | 59 | /** 60 | This method is called when the selected row is released to its new position. 61 | @param tableView The table view that will be reordered. 62 | @param indexPath The original index path of the cell being moved. 63 | */ 64 | - (void) tableView:(UITableView*)tableView didFinishReorderingAtIndexPath:(NSIndexPath *)indexPath; 65 | 66 | @end 67 | 68 | /** `TKReorderTableView` is a subclassed `UITableView` that handles custom dragging using long press. */ 69 | @interface TKReorderTableView : UITableView 70 | 71 | /** The delegate must adopt the `TKReorderTableViewDelegate` protocol. The delegate is not retained. */ 72 | @property (nonatomic, assign) id delegate; 73 | 74 | /** Flag that turns on and off the ability to reorder cells. */ 75 | @property (nonatomic, assign) BOOL canReorder; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /TapkuLibrary/TKRetroButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKRetroButton.h 3 | // Created by Devin Ross on 6/22/13. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | 34 | /** `TKRetroButton` is a subclassed `UIButton` with a rounded corner and border. */ 35 | @interface TKRetroButton : UIButton 36 | 37 | ///---------------------------- 38 | /// @name Properties 39 | ///---------------------------- 40 | 41 | /** The border width of the button. */ 42 | @property (nonatomic,assign) CGFloat borderWidth; 43 | 44 | /** The inset width between the highlighted background and border. */ 45 | @property (nonatomic,assign) CGFloat insetWidth; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /TapkuLibrary/TKTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKTableViewCell.h 3 | // Created by Devin Ross on 3/31/11. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | @import UIKit; 32 | 33 | 34 | @interface TKTableViewCell : UITableViewCell { 35 | UIView *_mainView; 36 | } 37 | - (void) drawContentView:(CGRect)r; // subclass for drawing 38 | @end 39 | -------------------------------------------------------------------------------- /TapkuLibrary/TKTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKTableViewCell.m 3 | // Created by Devin Ross on 3/31/11. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKTableViewCell.h" 33 | 34 | @interface TKTableViewCellView : UIView 35 | @end 36 | 37 | @implementation TKTableViewCellView 38 | 39 | - (void) drawRect:(CGRect)r{ 40 | [(TKTableViewCell *)[self superview] drawContentView:r]; 41 | } 42 | 43 | @end 44 | 45 | 46 | 47 | @implementation TKTableViewCell 48 | 49 | - (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ 50 | if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil; 51 | _mainView = [[TKTableViewCellView alloc] initWithFrame:CGRectZero]; 52 | _mainView.opaque = YES; 53 | [self addSubview:_mainView]; 54 | return self; 55 | } 56 | - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier{ 57 | self=[self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; 58 | return self; 59 | } 60 | 61 | - (void) layoutSubviews{ 62 | [super layoutSubviews]; 63 | self.contentView.hidden = YES; 64 | [self.contentView removeFromSuperview]; 65 | [self setNeedsDisplay]; 66 | } 67 | - (void) setFrame:(CGRect)f{ 68 | [super setFrame:f]; 69 | _mainView.frame = CGRectMake(0,0,f.size.width,f.size.height-1); 70 | [_mainView setNeedsDisplay]; 71 | } 72 | - (void) setNeedsDisplay{ 73 | [super setNeedsDisplay]; 74 | [_mainView setNeedsDisplay]; 75 | } 76 | - (void) setNeedsDisplayInRect:(CGRect)rect{ 77 | [super setNeedsDisplayInRect:rect]; 78 | [_mainView setNeedsDisplayInRect:rect]; 79 | } 80 | 81 | - (void) drawContentView:(CGRect)r { 82 | // for subclassing 83 | // default implementation does nothing 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /TapkuLibrary/TKTextViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKTextViewCell.h 3 | // Created by Devin Ross on 8/3/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | @class TKTextView; 34 | 35 | /** A table view cell with a text view. */ 36 | @interface TKTextViewCell : UITableViewCell 37 | 38 | /** The text view. */ 39 | @property (nonatomic,strong) TKTextView *textView; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /TapkuLibrary/TKTextViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKTextViewCell.m 3 | // Created by Devin Ross on 8/3/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | #import "TKTextViewCell.h" 32 | 33 | @implementation TKTextViewCell 34 | 35 | 36 | - (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 37 | if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil; 38 | 39 | _textView = [[TKTextView alloc] initWithFrame:CGRectZero]; 40 | _textView.font = [UIFont boldSystemFontOfSize:14.0]; 41 | _textView.backgroundColor = [UIColor clearColor]; 42 | [self.contentView addSubview:_textView]; 43 | 44 | return self; 45 | } 46 | 47 | - (id) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { 48 | return [self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; 49 | } 50 | 51 | - (void) layoutSubviews { 52 | [super layoutSubviews]; 53 | _textView.frame = CGRectInset(self.contentView.bounds, 4, 4); 54 | } 55 | 56 | 57 | - (void) _colorText:(BOOL)active{ 58 | _textView.textColor = active ? [UIColor whiteColor] : [UIColor blackColor]; 59 | } 60 | - (void) setSelected:(BOOL)selected animated:(BOOL)animated { 61 | [super setSelected:selected animated:animated]; 62 | [self _colorText:selected]; 63 | } 64 | - (void) setHighlighted:(BOOL)highlight animated:(BOOL)animated { 65 | [super setHighlighted:highlight animated:animated]; 66 | [self _colorText:highlight]; 67 | } 68 | 69 | 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /TapkuLibrary/TKViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TKViewController.h 3 | // Created by Devin Ross on 11/1/11. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import UIKit; 33 | 34 | @class TKHTTPRequest; 35 | 36 | /** This class provides basic lazy loading views and easy network request management for a `UIViewController`. */ 37 | @interface TKViewController : UIViewController 38 | 39 | 40 | ///---------------------------- 41 | /// @name Properties 42 | ///---------------------------- 43 | 44 | /** Returns a loading view with an `UIActivityIndicatorView` center on the view */ 45 | @property (strong,nonatomic) UIView *loadingView; 46 | 47 | 48 | ///---------------------------- 49 | /// @name Network Request Management 50 | ///---------------------------- 51 | /** Associate active network requests with a specific view controller for easy management. 52 | @param request The network request which you want to have the view controller manage. 53 | */ 54 | - (void) addActiveRequest:(TKHTTPRequest*)request; 55 | 56 | /** Returns the current number of request managed by the view controller. 57 | @see addActiveRequest: 58 | */ 59 | @property (nonatomic, readonly) NSInteger activeRequestCount; 60 | 61 | /** Remove an active request. 62 | @param request The request that will be removed. 63 | @see addActiveRequest: 64 | */ 65 | - (void) removeActiveRequest:(TKHTTPRequest*)request; 66 | 67 | /** Cancel all active network requests managed by the view controller. 68 | @see addActiveRequest: 69 | */ 70 | - (void) cancelActiveRequests; 71 | 72 | 73 | 74 | @end -------------------------------------------------------------------------------- /TapkuLibrary/TKViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TKViewController.m 3 | // Created by Devin Ross on 11/1/11. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "TKViewController.h" 33 | #import "TKHTTPRequest.h" 34 | 35 | @interface TKViewController () { 36 | NSMutableArray *_activeRequests; 37 | } 38 | 39 | @end 40 | 41 | @implementation TKViewController 42 | 43 | - (void) viewDidUnload{ 44 | self.loadingView = nil; 45 | [super viewDidUnload]; 46 | } 47 | - (void) dealloc{ 48 | [self cancelActiveRequests]; 49 | } 50 | 51 | #pragma mark Easily Manage Active Requests 52 | - (void) addActiveRequest:(TKHTTPRequest*)request{ 53 | 54 | if(_activeRequests==nil){ 55 | _activeRequests = [[NSMutableArray alloc] init]; 56 | } 57 | [_activeRequests addObject:request]; 58 | 59 | } 60 | - (void) removeActiveRequest:(TKHTTPRequest*)request{ 61 | 62 | if([_activeRequests containsObject:request]) 63 | [_activeRequests removeObject:request]; 64 | } 65 | - (void) cancelActiveRequests{ 66 | if(_activeRequests){ 67 | for(TKHTTPRequest *request in _activeRequests) 68 | [request cancel]; 69 | } 70 | } 71 | 72 | - (NSInteger) activeRequestCount{ 73 | return _activeRequests.count; 74 | } 75 | 76 | 77 | #pragma mark Properties 78 | - (UIView*) loadingView{ 79 | if(_loadingView) return _loadingView; 80 | 81 | _loadingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 44)]; 82 | _loadingView.backgroundColor = [UIColor clearColor]; 83 | _loadingView.autoresizingMask = UIViewAutoresizingFlexibleWidth; 84 | 85 | UIActivityIndicatorView *act = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; 86 | act.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; 87 | 88 | act.center = _loadingView.center; 89 | [act startAnimating]; 90 | [_loadingView addSubview:act]; 91 | 92 | return _loadingView; 93 | } 94 | 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /TapkuLibrary/TapkuLibrary.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | tapku || http://github.com/devinross/tapkulibrary 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without 8 | restriction, including without limitation the rights to use, 9 | copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the 11 | Software is furnished to do so, subject to the following 12 | conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | OTHER DEALINGS IN THE SOFTWARE. 25 | 26 | */ 27 | 28 | #import "TKGlobal.h" 29 | 30 | // ADDITIONS 31 | //#import "NSDate+TKCategory.h" 32 | #import "UIImage+TKCategory.h" 33 | 34 | 35 | 36 | #import "TKViewController.h" 37 | #import "TKEmptyView.h" 38 | 39 | #import "TKAppDelegate.h" 40 | 41 | 42 | 43 | // Network 44 | #import "TKNetworkQueue.h" 45 | #import "TKHTTPRequest.h" 46 | #import "TKImageCache.h" 47 | 48 | #import "TKRetroButton.h" 49 | #import "TKReorderTableView.h" 50 | 51 | 52 | 53 | // CELLS 54 | #import "TKLabelCell.h" 55 | #import "TKLabelTextViewCell.h" 56 | #import "TKLabelTextFieldCell.h" 57 | #import "TKLabelFieldCell.h" 58 | #import "TKLabelSwitchCell.h" 59 | #import "TKButtonCell.h" 60 | #import "TKTextViewCell.h" 61 | #import "TKTableViewCell.h" 62 | 63 | // HUD 64 | #import "TKAlertCenter.h" 65 | #import "TKProgressBarView.h" 66 | #import "TKProgressAlertView.h" 67 | #import "TKProgressCircleView.h" 68 | 69 | 70 | // Calendar 71 | #import "TKCalendarMonthViewController.h" 72 | #import "TKCalendarMonthTableViewController.h" 73 | #import "TKCalendarMonthView.h" 74 | #import "TKCalendarDayViewController.h" 75 | #import "NSDate+CalendarGrid.h" 76 | 77 | 78 | // Coverflow 79 | #import "TKCoverflowView.h" 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /TapkuLibrary/UIImage+TKCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageAdditions.h 3 | // Created by Devin Ross on 7/25/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | 33 | @import UIKit; 34 | 35 | /** Additional functionality for `UIImage`. */ 36 | @interface UIImage (Tapku) 37 | 38 | + (UIImage*) imageNamedTK:(NSString*)path; 39 | 40 | 41 | @end 42 | 43 | -------------------------------------------------------------------------------- /TapkuLibrary/UIImage+TKCategory.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageAdditions.m 3 | // Created by Devin Ross on 7/25/09. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "UIImage+TKCategory.h" 33 | #import "TKGlobal.h" 34 | @import Accelerate; 35 | #import 36 | 37 | @implementation UIImage (Tapku) 38 | 39 | + (UIImage*) imageNamedTK:(NSString*)str{ 40 | 41 | CGFloat s = 1.0f; 42 | if([[UIScreen mainScreen] respondsToSelector:@selector(scale)]){ 43 | s = [[UIScreen mainScreen] scale]; 44 | } 45 | NSString *path = [NSString stringWithFormat:@"%@%@.png",str,s > 1 ? @"@2x":@""]; 46 | return [UIImage imageWithCGImage:[UIImage imageWithContentsOfFile:TKBUNDLE(path)].CGImage scale:s orientation:UIImageOrientationUp]; 47 | 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Tests/FoundationTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // FoundationTests.h 3 | // Created by Devin Ross on 4/6/11. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | @import Foundation; 33 | @import UIKit; 34 | @import XCTest; 35 | #import "NSDate+TKCategory.h" 36 | 37 | @interface FoundationTests : XCTestCase 38 | 39 | - (void) testShouldCreateExpectedDate; 40 | 41 | @end -------------------------------------------------------------------------------- /Tests/FoundationTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FoundationTests.m 3 | // Created by Devin Ross on 4/6/11. 4 | // 5 | /* 6 | 7 | tapku || http://github.com/devinross/tapkulibrary 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | */ 31 | 32 | #import "FoundationTests.h" 33 | 34 | @implementation FoundationTests 35 | 36 | 37 | - (void) testShouldCreateExpectedDate{ 38 | 39 | NSDate *date,*date2; 40 | 41 | date = [NSDate date]; 42 | XCTAssertTrue([date isToday],@"Expected %@ is today.",date); 43 | 44 | date = [NSDate yesterday]; 45 | XCTAssertFalse([date isToday],@"Expected %@ is not today.",date); 46 | 47 | date = [NSDate dateWithTimeIntervalSinceNow:-60 * 60 * 40]; 48 | XCTAssertFalse([date isToday],@"Expected %@ is not today.",date); 49 | 50 | 51 | date = [NSDate yesterday]; 52 | date2 = [NSDate date]; 53 | XCTAssertFalse([date isSameDay:date2],@"Expected %@ is not same day as %@.",date,date2); 54 | 55 | 56 | date = [NSDate date]; 57 | NSDateComponents *comp = [date dateComponentsWithTimeZone:[NSTimeZone defaultTimeZone]]; 58 | comp.day = 1; 59 | comp.hour = comp.minute = comp.second = 0; 60 | date2 = [NSDate dateWithDateComponents:comp]; 61 | 62 | XCTAssertTrue([date2 isSameDay:[date monthDate] timeZone:[NSTimeZone defaultTimeZone]], @"Expected %@ is same day as %@.",date2,date); 63 | 64 | date = [NSDate date]; 65 | date2 = [NSDate yesterday]; 66 | NSInteger diff = [date daysBetweenDate:date2]; 67 | XCTAssertEqualObjects(@(diff), @1, @"Expected difference between %@ and %@ is 1, but found %@.",date,date2,@(diff)); 68 | 69 | } 70 | 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /tapku.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tapku.xcodeproj/project.xcworkspace/xcshareddata/tapku.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 7F91018C-F646-4DD6-892F-661B1A7E8A09 9 | IDESourceControlProjectName 10 | tapku 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 771CDDC8828BA5C85B70BAEAFD5C3B58BF9E0AE2 14 | github.com:devinross/curry.git 15 | EE5017F42780957232AFF14DD75D9A51833942BE 16 | github.com:devinross/tapkulibrary.git 17 | 18 | IDESourceControlProjectPath 19 | tapku.xcodeproj 20 | IDESourceControlProjectRelativeInstallPathDictionary 21 | 22 | 771CDDC8828BA5C85B70BAEAFD5C3B58BF9E0AE2 23 | ../..Vendor/curry 24 | EE5017F42780957232AFF14DD75D9A51833942BE 25 | ../.. 26 | 27 | IDESourceControlProjectURL 28 | github.com:devinross/tapkulibrary.git 29 | IDESourceControlProjectVersion 30 | 111 31 | IDESourceControlProjectWCCIdentifier 32 | EE5017F42780957232AFF14DD75D9A51833942BE 33 | IDESourceControlProjectWCConfigurations 34 | 35 | 36 | IDESourceControlRepositoryExtensionIdentifierKey 37 | public.vcs.git 38 | IDESourceControlWCCIdentifierKey 39 | 771CDDC8828BA5C85B70BAEAFD5C3B58BF9E0AE2 40 | IDESourceControlWCCName 41 | curry 42 | 43 | 44 | IDESourceControlRepositoryExtensionIdentifierKey 45 | public.vcs.git 46 | IDESourceControlWCCIdentifierKey 47 | EE5017F42780957232AFF14DD75D9A51833942BE 48 | IDESourceControlWCCName 49 | tapkulibrary 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /tapku/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tapku/tapku.h: -------------------------------------------------------------------------------- 1 | // 2 | // tapku.h 3 | // tapku 4 | // 5 | // Created by Devin Ross on 3/18/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for tapku. 12 | FOUNDATION_EXPORT double tapkuVersionNumber; 13 | 14 | //! Project version string for tapku. 15 | FOUNDATION_EXPORT const unsigned char tapkuVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | #import "TapkuLibrary.h" -------------------------------------------------------------------------------- /tapku_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'TapkuLibrary' target in the 'TapkuLibrary' project. 3 | // 4 | 5 | 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 11 | #endif 12 | 13 | 14 | 15 | #ifdef __OBJC__ 16 | @import Foundation; 17 | @import UIKit; 18 | @import QuartzCore; 19 | @import curry; 20 | #endif 21 | --------------------------------------------------------------------------------