├── .gitignore ├── README.markdown ├── ScrollToRefresh.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── ScrollToRefresh ├── EQSTRAppDelegate.h ├── EQSTRAppDelegate.m ├── ScrollToRefresh-Info.plist ├── ScrollToRefresh-Prefix.pch ├── arrow.png ├── en.lproj │ ├── Credits.rtf │ ├── InfoPlist.strings │ └── MainMenu.xib ├── main.m └── src │ ├── EQSTRClipView.h │ ├── EQSTRClipView.m │ ├── EQSTRScrollView.h │ └── EQSTRScrollView.m └── screenshot.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS X Finder and whatnot 2 | .DS_Store 3 | 4 | 5 | # Sparkle distribution Private Key (Don't check me in!) 6 | dsa_priv.pem 7 | 8 | 9 | # XCode (and ancestors) per-user config (very noisy, and not relevant) 10 | *.mode1 11 | *.mode1v3 12 | *.mode2v3 13 | *.perspective 14 | *.perspectivev3 15 | *.pbxuser 16 | 17 | 18 | # Generated files 19 | VersionX-revision.h 20 | 21 | 22 | # build products 23 | build/ 24 | *.[oa] 25 | 26 | 27 | # Other source repository archive directories (protects when importing) 28 | .hg 29 | .svn 30 | CVS 31 | 32 | 33 | # automatic backup files 34 | *~.nib 35 | *.swp 36 | *~ 37 | *(Autosaved).rtfd/ 38 | Backup[ ]of[ ]*.pages/ 39 | Backup[ ]of[ ]*.key/ 40 | Backup[ ]of[ ]*.numbers/ 41 | 42 | Equili.xcodeproj/project.xcworkspace/xcuserdata/Alex.xcuserdatad/UserInterfaceState.xcuserstate 43 | Equili.xcodeproj/xcuserdata/Alex.xcuserdatad/xcschemes/EQKit.xcscheme 44 | Equili.xcodeproj/xcuserdata/Alex.xcuserdatad/xcschemes/Equili.xcscheme 45 | Equili.xcodeproj/xcuserdata/Alex.xcuserdatad/xcschemes/EQAPIDebugger.xcscheme 46 | Equili.xcodeproj/xcuserdata/Alex.xcuserdatad/xcschemes/EQControls.xcscheme 47 | Equili.xcodeproj/xcuserdata/Alex.xcuserdatad/xcschemes/EQKit.xcscheme 48 | Equili.xcodeproj/xcuserdata/Alex.xcuserdatad/xcschemes/EquiliHelper.xcscheme 49 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | The First Scroll To Refresh solution using only AppKit and Public APIs! 2 | 3 | Introduction 4 | ================ 5 | ScrollToRefresh is a subclass of NSScrollView that adds a "pull-to-refresh" feel to the "elastic" area of NSScrollview. 6 | 7 | ![ScrollToRefresh in action](https://github.com/alexzielenski/ScrollToRefresh/raw/master/screenshot.png "Scroll To Refresh") 8 | 9 | Usage 10 | ================ 11 | 12 | 1. Set the class of your scroll view to ```EQSTRScrollView``` 13 | 2. Set the `-refreshBlock` of your scroll view to a block to run some code when the refresh starts. 14 | 3. When you know that your processing is finished, call `-stopLoading` on the scroll view to remove the refresh view. 15 | 4. PROFIT 16 | 17 | 18 | How it works 19 | ================ 20 | The secret is actually knowing how scroll views work. When you scroll, the clip view offsets the origin of its `-bounds` so any subview within the clipview will scroll. It also employs a couple of other methods to check the boundaries of the document view which I override to include the refresh view to get a more natural feel. 21 | 22 | License 23 | ================ 24 | ScrollToRefresh is licensed under the MIT license meaning you can do whatever you want with it and I am not responsible for any trouble you get and you must include the license in whatever you use it in. 25 | 26 | // ScrollToRefresh 27 | // 28 | // Copyright (C) 2011 by Alex Zielenski. 29 | 30 | // Permission is hereby granted, free of charge, to any person obtaining a copy 31 | // of this software and associated documentation files (the "Software"), to deal 32 | // in the Software without restriction, including without limitation the rights 33 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 34 | // copies of the Software, and to permit persons to whom the Software is 35 | // furnished to do so, subject to the following conditions: 36 | // 37 | // The above copyright notice and this permission notice shall be included in 38 | // all copies or substantial portions of the Software. 39 | // 40 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 41 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 42 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 43 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 44 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 45 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 46 | // THE SOFTWARE. -------------------------------------------------------------------------------- /ScrollToRefresh.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FA121D601472FB2B00FED3BA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA121D5F1472FB2B00FED3BA /* Cocoa.framework */; }; 11 | FA121D6A1472FB2B00FED3BA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = FA121D681472FB2B00FED3BA /* InfoPlist.strings */; }; 12 | FA121D6C1472FB2B00FED3BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FA121D6B1472FB2B00FED3BA /* main.m */; }; 13 | FA121D701472FB2B00FED3BA /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = FA121D6E1472FB2B00FED3BA /* Credits.rtf */; }; 14 | FA121D731472FB2B00FED3BA /* EQSTRAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FA121D721472FB2B00FED3BA /* EQSTRAppDelegate.m */; }; 15 | FA121D761472FB2B00FED3BA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA121D741472FB2B00FED3BA /* MainMenu.xib */; }; 16 | FA121D7E1472FB5800FED3BA /* EQSTRScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = FA121D7D1472FB5800FED3BA /* EQSTRScrollView.m */; }; 17 | FA121D851472FB9300FED3BA /* EQSTRClipView.m in Sources */ = {isa = PBXBuildFile; fileRef = FA121D841472FB9300FED3BA /* EQSTRClipView.m */; }; 18 | FA121D87147303B400FED3BA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA121D86147303B400FED3BA /* QuartzCore.framework */; }; 19 | FA121D89147303EC00FED3BA /* arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = FA121D88147303EC00FED3BA /* arrow.png */; }; 20 | FA121D97147318BD00FED3BA /* README.markdown in Resources */ = {isa = PBXBuildFile; fileRef = FA121D96147318BD00FED3BA /* README.markdown */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | FA121D5B1472FB2B00FED3BA /* ScrollToRefresh.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScrollToRefresh.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | FA121D5F1472FB2B00FED3BA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 26 | FA121D621472FB2B00FED3BA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 27 | FA121D631472FB2B00FED3BA /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 28 | FA121D641472FB2B00FED3BA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 29 | FA121D671472FB2B00FED3BA /* ScrollToRefresh-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ScrollToRefresh-Info.plist"; sourceTree = ""; }; 30 | FA121D691472FB2B00FED3BA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 31 | FA121D6B1472FB2B00FED3BA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 32 | FA121D6D1472FB2B00FED3BA /* ScrollToRefresh-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ScrollToRefresh-Prefix.pch"; sourceTree = ""; }; 33 | FA121D6F1472FB2B00FED3BA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; 34 | FA121D711472FB2B00FED3BA /* EQSTRAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EQSTRAppDelegate.h; sourceTree = ""; }; 35 | FA121D721472FB2B00FED3BA /* EQSTRAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EQSTRAppDelegate.m; sourceTree = ""; }; 36 | FA121D751472FB2B00FED3BA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; 37 | FA121D7C1472FB5800FED3BA /* EQSTRScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EQSTRScrollView.h; path = src/EQSTRScrollView.h; sourceTree = ""; }; 38 | FA121D7D1472FB5800FED3BA /* EQSTRScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EQSTRScrollView.m; path = src/EQSTRScrollView.m; sourceTree = ""; }; 39 | FA121D831472FB9300FED3BA /* EQSTRClipView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EQSTRClipView.h; path = src/EQSTRClipView.h; sourceTree = ""; }; 40 | FA121D841472FB9300FED3BA /* EQSTRClipView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EQSTRClipView.m; path = src/EQSTRClipView.m; sourceTree = ""; }; 41 | FA121D86147303B400FED3BA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 42 | FA121D88147303EC00FED3BA /* arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = arrow.png; sourceTree = ""; }; 43 | FA121D96147318BD00FED3BA /* README.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.markdown; sourceTree = SOURCE_ROOT; }; 44 | /* End PBXFileReference section */ 45 | 46 | /* Begin PBXFrameworksBuildPhase section */ 47 | FA121D581472FB2B00FED3BA /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | FA121D87147303B400FED3BA /* QuartzCore.framework in Frameworks */, 52 | FA121D601472FB2B00FED3BA /* Cocoa.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | FA121D501472FB2A00FED3BA = { 60 | isa = PBXGroup; 61 | children = ( 62 | FA121D651472FB2B00FED3BA /* ScrollToRefresh */, 63 | FA121D5E1472FB2B00FED3BA /* Frameworks */, 64 | FA121D5C1472FB2B00FED3BA /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | FA121D5C1472FB2B00FED3BA /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | FA121D5B1472FB2B00FED3BA /* ScrollToRefresh.app */, 72 | ); 73 | name = Products; 74 | sourceTree = ""; 75 | }; 76 | FA121D5E1472FB2B00FED3BA /* Frameworks */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | FA121D86147303B400FED3BA /* QuartzCore.framework */, 80 | FA121D5F1472FB2B00FED3BA /* Cocoa.framework */, 81 | FA121D611472FB2B00FED3BA /* Other Frameworks */, 82 | ); 83 | name = Frameworks; 84 | sourceTree = ""; 85 | }; 86 | FA121D611472FB2B00FED3BA /* Other Frameworks */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | FA121D621472FB2B00FED3BA /* AppKit.framework */, 90 | FA121D631472FB2B00FED3BA /* CoreData.framework */, 91 | FA121D641472FB2B00FED3BA /* Foundation.framework */, 92 | ); 93 | name = "Other Frameworks"; 94 | sourceTree = ""; 95 | }; 96 | FA121D651472FB2B00FED3BA /* ScrollToRefresh */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | FA121D711472FB2B00FED3BA /* EQSTRAppDelegate.h */, 100 | FA121D721472FB2B00FED3BA /* EQSTRAppDelegate.m */, 101 | FA121D7F1472FB5C00FED3BA /* ScrollToRefresh */, 102 | FA121D741472FB2B00FED3BA /* MainMenu.xib */, 103 | FA121D661472FB2B00FED3BA /* Supporting Files */, 104 | ); 105 | path = ScrollToRefresh; 106 | sourceTree = ""; 107 | }; 108 | FA121D661472FB2B00FED3BA /* Supporting Files */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | FA121D88147303EC00FED3BA /* arrow.png */, 112 | FA121D671472FB2B00FED3BA /* ScrollToRefresh-Info.plist */, 113 | FA121D681472FB2B00FED3BA /* InfoPlist.strings */, 114 | FA121D6B1472FB2B00FED3BA /* main.m */, 115 | FA121D6D1472FB2B00FED3BA /* ScrollToRefresh-Prefix.pch */, 116 | FA121D6E1472FB2B00FED3BA /* Credits.rtf */, 117 | FA121D96147318BD00FED3BA /* README.markdown */, 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | FA121D7F1472FB5C00FED3BA /* ScrollToRefresh */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | FA121D7C1472FB5800FED3BA /* EQSTRScrollView.h */, 126 | FA121D7D1472FB5800FED3BA /* EQSTRScrollView.m */, 127 | FA121D831472FB9300FED3BA /* EQSTRClipView.h */, 128 | FA121D841472FB9300FED3BA /* EQSTRClipView.m */, 129 | ); 130 | name = ScrollToRefresh; 131 | sourceTree = ""; 132 | }; 133 | /* End PBXGroup section */ 134 | 135 | /* Begin PBXNativeTarget section */ 136 | FA121D5A1472FB2B00FED3BA /* ScrollToRefresh */ = { 137 | isa = PBXNativeTarget; 138 | buildConfigurationList = FA121D791472FB2B00FED3BA /* Build configuration list for PBXNativeTarget "ScrollToRefresh" */; 139 | buildPhases = ( 140 | FA121D571472FB2B00FED3BA /* Sources */, 141 | FA121D581472FB2B00FED3BA /* Frameworks */, 142 | FA121D591472FB2B00FED3BA /* Resources */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = ScrollToRefresh; 149 | productName = ScrollToRefresh; 150 | productReference = FA121D5B1472FB2B00FED3BA /* ScrollToRefresh.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | FA121D521472FB2A00FED3BA /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0430; 160 | ORGANIZATIONNAME = "Alex Zielenski"; 161 | }; 162 | buildConfigurationList = FA121D551472FB2A00FED3BA /* Build configuration list for PBXProject "ScrollToRefresh" */; 163 | compatibilityVersion = "Xcode 3.2"; 164 | developmentRegion = English; 165 | hasScannedForEncodings = 0; 166 | knownRegions = ( 167 | en, 168 | ); 169 | mainGroup = FA121D501472FB2A00FED3BA; 170 | productRefGroup = FA121D5C1472FB2B00FED3BA /* Products */; 171 | projectDirPath = ""; 172 | projectRoot = ""; 173 | targets = ( 174 | FA121D5A1472FB2B00FED3BA /* ScrollToRefresh */, 175 | ); 176 | }; 177 | /* End PBXProject section */ 178 | 179 | /* Begin PBXResourcesBuildPhase section */ 180 | FA121D591472FB2B00FED3BA /* Resources */ = { 181 | isa = PBXResourcesBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | FA121D6A1472FB2B00FED3BA /* InfoPlist.strings in Resources */, 185 | FA121D701472FB2B00FED3BA /* Credits.rtf in Resources */, 186 | FA121D761472FB2B00FED3BA /* MainMenu.xib in Resources */, 187 | FA121D89147303EC00FED3BA /* arrow.png in Resources */, 188 | FA121D97147318BD00FED3BA /* README.markdown in Resources */, 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | }; 192 | /* End PBXResourcesBuildPhase section */ 193 | 194 | /* Begin PBXSourcesBuildPhase section */ 195 | FA121D571472FB2B00FED3BA /* Sources */ = { 196 | isa = PBXSourcesBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | FA121D6C1472FB2B00FED3BA /* main.m in Sources */, 200 | FA121D731472FB2B00FED3BA /* EQSTRAppDelegate.m in Sources */, 201 | FA121D7E1472FB5800FED3BA /* EQSTRScrollView.m in Sources */, 202 | FA121D851472FB9300FED3BA /* EQSTRClipView.m in Sources */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | /* End PBXSourcesBuildPhase section */ 207 | 208 | /* Begin PBXVariantGroup section */ 209 | FA121D681472FB2B00FED3BA /* InfoPlist.strings */ = { 210 | isa = PBXVariantGroup; 211 | children = ( 212 | FA121D691472FB2B00FED3BA /* en */, 213 | ); 214 | name = InfoPlist.strings; 215 | sourceTree = ""; 216 | }; 217 | FA121D6E1472FB2B00FED3BA /* Credits.rtf */ = { 218 | isa = PBXVariantGroup; 219 | children = ( 220 | FA121D6F1472FB2B00FED3BA /* en */, 221 | ); 222 | name = Credits.rtf; 223 | sourceTree = ""; 224 | }; 225 | FA121D741472FB2B00FED3BA /* MainMenu.xib */ = { 226 | isa = PBXVariantGroup; 227 | children = ( 228 | FA121D751472FB2B00FED3BA /* en */, 229 | ); 230 | name = MainMenu.xib; 231 | sourceTree = ""; 232 | }; 233 | /* End PBXVariantGroup section */ 234 | 235 | /* Begin XCBuildConfiguration section */ 236 | FA121D771472FB2B00FED3BA /* Debug */ = { 237 | isa = XCBuildConfiguration; 238 | buildSettings = { 239 | ALWAYS_SEARCH_USER_PATHS = NO; 240 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 241 | COPY_PHASE_STRIP = NO; 242 | GCC_C_LANGUAGE_STANDARD = gnu99; 243 | GCC_DYNAMIC_NO_PIC = NO; 244 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 245 | GCC_OPTIMIZATION_LEVEL = 0; 246 | GCC_PREPROCESSOR_DEFINITIONS = ( 247 | "DEBUG=1", 248 | "$(inherited)", 249 | ); 250 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 251 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 252 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 253 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 254 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 255 | GCC_WARN_UNUSED_VARIABLE = YES; 256 | MACOSX_DEPLOYMENT_TARGET = 10.7; 257 | ONLY_ACTIVE_ARCH = YES; 258 | SDKROOT = macosx; 259 | }; 260 | name = Debug; 261 | }; 262 | FA121D781472FB2B00FED3BA /* Release */ = { 263 | isa = XCBuildConfiguration; 264 | buildSettings = { 265 | ALWAYS_SEARCH_USER_PATHS = NO; 266 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 267 | COPY_PHASE_STRIP = YES; 268 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 269 | GCC_C_LANGUAGE_STANDARD = gnu99; 270 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 271 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 272 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 273 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 274 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 275 | GCC_WARN_UNUSED_VARIABLE = YES; 276 | MACOSX_DEPLOYMENT_TARGET = 10.7; 277 | SDKROOT = macosx; 278 | }; 279 | name = Release; 280 | }; 281 | FA121D7A1472FB2B00FED3BA /* Debug */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 285 | GCC_PREFIX_HEADER = "ScrollToRefresh/ScrollToRefresh-Prefix.pch"; 286 | INFOPLIST_FILE = "ScrollToRefresh/ScrollToRefresh-Info.plist"; 287 | PRODUCT_NAME = "$(TARGET_NAME)"; 288 | WRAPPER_EXTENSION = app; 289 | }; 290 | name = Debug; 291 | }; 292 | FA121D7B1472FB2B00FED3BA /* Release */ = { 293 | isa = XCBuildConfiguration; 294 | buildSettings = { 295 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 296 | GCC_PREFIX_HEADER = "ScrollToRefresh/ScrollToRefresh-Prefix.pch"; 297 | INFOPLIST_FILE = "ScrollToRefresh/ScrollToRefresh-Info.plist"; 298 | PRODUCT_NAME = "$(TARGET_NAME)"; 299 | WRAPPER_EXTENSION = app; 300 | }; 301 | name = Release; 302 | }; 303 | /* End XCBuildConfiguration section */ 304 | 305 | /* Begin XCConfigurationList section */ 306 | FA121D551472FB2A00FED3BA /* Build configuration list for PBXProject "ScrollToRefresh" */ = { 307 | isa = XCConfigurationList; 308 | buildConfigurations = ( 309 | FA121D771472FB2B00FED3BA /* Debug */, 310 | FA121D781472FB2B00FED3BA /* Release */, 311 | ); 312 | defaultConfigurationIsVisible = 0; 313 | defaultConfigurationName = Release; 314 | }; 315 | FA121D791472FB2B00FED3BA /* Build configuration list for PBXNativeTarget "ScrollToRefresh" */ = { 316 | isa = XCConfigurationList; 317 | buildConfigurations = ( 318 | FA121D7A1472FB2B00FED3BA /* Debug */, 319 | FA121D7B1472FB2B00FED3BA /* Release */, 320 | ); 321 | defaultConfigurationIsVisible = 0; 322 | defaultConfigurationName = Release; 323 | }; 324 | /* End XCConfigurationList section */ 325 | }; 326 | rootObject = FA121D521472FB2A00FED3BA /* Project object */; 327 | } 328 | -------------------------------------------------------------------------------- /ScrollToRefresh.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ScrollToRefresh/EQSTRAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // EQSTRAppDelegate.h 3 | // ScrollToRefresh 4 | // 5 | // Copyright (C) 2011 by Alex Zielenski. 6 | 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import 26 | 27 | @interface EQSTRAppDelegate : NSObject 28 | 29 | @property (assign) IBOutlet NSWindow *window; 30 | - (IBAction)stopRefreshing:(NSButton *)sender; 31 | @end 32 | -------------------------------------------------------------------------------- /ScrollToRefresh/EQSTRAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // EQSTRAppDelegate.m 3 | // ScrollToRefresh 4 | // 5 | // Copyright (C) 2011 by Alex Zielenski. 6 | 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | #import "EQSTRAppDelegate.h" 27 | #import "EQSTRScrollView.h" 28 | 29 | @implementation EQSTRAppDelegate 30 | 31 | @synthesize window = _window; 32 | 33 | - (void)dealloc { 34 | [super dealloc]; 35 | } 36 | 37 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 38 | // Insert code here to initialize your application 39 | } 40 | 41 | - (IBAction)stopRefreshing:(NSButton *)sender { 42 | [(EQSTRScrollView*)sender.enclosingScrollView stopLoading]; 43 | } 44 | @end 45 | -------------------------------------------------------------------------------- /ScrollToRefresh/ScrollToRefresh-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.alexzielenski.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2011 Alex Zielenski. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /ScrollToRefresh/ScrollToRefresh-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ScrollToRefresh' target in the 'ScrollToRefresh' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /ScrollToRefresh/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexzielenski/ScrollToRefresh/ed46bf36cf80a2f3ae156f9704389bade4a46c18/ScrollToRefresh/arrow.png -------------------------------------------------------------------------------- /ScrollToRefresh/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /ScrollToRefresh/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ScrollToRefresh/en.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1070 5 | 11C74 6 | 1938 7 | 1138.23 8 | 567.00 9 | 10 | com.apple.InterfaceBuilder.CocoaPlugin 11 | 1938 12 | 13 | 14 | NSView 15 | NSMenu 16 | NSScrollView 17 | NSWindowTemplate 18 | NSMenuItem 19 | NSButton 20 | NSImageCell 21 | NSButtonCell 22 | NSImageView 23 | NSScroller 24 | NSCustomObject 25 | 26 | 27 | com.apple.InterfaceBuilder.CocoaPlugin 28 | 29 | 30 | PluginDependencyRecalculationVersion 31 | 32 | 33 | 34 | 35 | NSApplication 36 | 37 | 38 | FirstResponder 39 | 40 | 41 | NSApplication 42 | 43 | 44 | AMainMenu 45 | 46 | 47 | 48 | ScrollToRefresh 49 | 50 | 1048576 51 | 2147483647 52 | 53 | NSImage 54 | NSMenuCheckmark 55 | 56 | 57 | NSImage 58 | NSMenuMixedState 59 | 60 | submenuAction: 61 | 62 | ScrollToRefresh 63 | 64 | 65 | 66 | About ScrollToRefresh 67 | 68 | 2147483647 69 | 70 | 71 | 72 | 73 | 74 | YES 75 | YES 76 | 77 | 78 | 1048576 79 | 2147483647 80 | 81 | 82 | 83 | 84 | 85 | Preferences… 86 | , 87 | 1048576 88 | 2147483647 89 | 90 | 91 | 92 | 93 | 94 | YES 95 | YES 96 | 97 | 98 | 1048576 99 | 2147483647 100 | 101 | 102 | 103 | 104 | 105 | Services 106 | 107 | 1048576 108 | 2147483647 109 | 110 | 111 | submenuAction: 112 | 113 | Services 114 | 115 | _NSServicesMenu 116 | 117 | 118 | 119 | 120 | YES 121 | YES 122 | 123 | 124 | 1048576 125 | 2147483647 126 | 127 | 128 | 129 | 130 | 131 | Hide ScrollToRefresh 132 | h 133 | 1048576 134 | 2147483647 135 | 136 | 137 | 138 | 139 | 140 | Hide Others 141 | h 142 | 1572864 143 | 2147483647 144 | 145 | 146 | 147 | 148 | 149 | Show All 150 | 151 | 1048576 152 | 2147483647 153 | 154 | 155 | 156 | 157 | 158 | YES 159 | YES 160 | 161 | 162 | 1048576 163 | 2147483647 164 | 165 | 166 | 167 | 168 | 169 | Quit ScrollToRefresh 170 | q 171 | 1048576 172 | 2147483647 173 | 174 | 175 | 176 | 177 | _NSAppleMenu 178 | 179 | 180 | 181 | 182 | File 183 | 184 | 1048576 185 | 2147483647 186 | 187 | 188 | submenuAction: 189 | 190 | File 191 | 192 | 193 | 194 | New 195 | n 196 | 1048576 197 | 2147483647 198 | 199 | 200 | 201 | 202 | 203 | Open… 204 | o 205 | 1048576 206 | 2147483647 207 | 208 | 209 | 210 | 211 | 212 | Open Recent 213 | 214 | 1048576 215 | 2147483647 216 | 217 | 218 | submenuAction: 219 | 220 | Open Recent 221 | 222 | 223 | 224 | Clear Menu 225 | 226 | 1048576 227 | 2147483647 228 | 229 | 230 | 231 | 232 | _NSRecentDocumentsMenu 233 | 234 | 235 | 236 | 237 | YES 238 | YES 239 | 240 | 241 | 1048576 242 | 2147483647 243 | 244 | 245 | 246 | 247 | 248 | Close 249 | w 250 | 1048576 251 | 2147483647 252 | 253 | 254 | 255 | 256 | 257 | Save… 258 | s 259 | 1048576 260 | 2147483647 261 | 262 | 263 | 264 | 265 | 266 | Revert to Saved 267 | 268 | 2147483647 269 | 270 | 271 | 272 | 273 | 274 | YES 275 | YES 276 | 277 | 278 | 1048576 279 | 2147483647 280 | 281 | 282 | 283 | 284 | 285 | Page Setup... 286 | P 287 | 1179648 288 | 2147483647 289 | 290 | 291 | 292 | 293 | 294 | 295 | Print… 296 | p 297 | 1048576 298 | 2147483647 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | Edit 308 | 309 | 1048576 310 | 2147483647 311 | 312 | 313 | submenuAction: 314 | 315 | Edit 316 | 317 | 318 | 319 | Undo 320 | z 321 | 1048576 322 | 2147483647 323 | 324 | 325 | 326 | 327 | 328 | Redo 329 | Z 330 | 1179648 331 | 2147483647 332 | 333 | 334 | 335 | 336 | 337 | YES 338 | YES 339 | 340 | 341 | 1048576 342 | 2147483647 343 | 344 | 345 | 346 | 347 | 348 | Cut 349 | x 350 | 1048576 351 | 2147483647 352 | 353 | 354 | 355 | 356 | 357 | Copy 358 | c 359 | 1048576 360 | 2147483647 361 | 362 | 363 | 364 | 365 | 366 | Paste 367 | v 368 | 1048576 369 | 2147483647 370 | 371 | 372 | 373 | 374 | 375 | Paste and Match Style 376 | V 377 | 1572864 378 | 2147483647 379 | 380 | 381 | 382 | 383 | 384 | Delete 385 | 386 | 1048576 387 | 2147483647 388 | 389 | 390 | 391 | 392 | 393 | Select All 394 | a 395 | 1048576 396 | 2147483647 397 | 398 | 399 | 400 | 401 | 402 | YES 403 | YES 404 | 405 | 406 | 1048576 407 | 2147483647 408 | 409 | 410 | 411 | 412 | 413 | Find 414 | 415 | 1048576 416 | 2147483647 417 | 418 | 419 | submenuAction: 420 | 421 | Find 422 | 423 | 424 | 425 | Find… 426 | f 427 | 1048576 428 | 2147483647 429 | 430 | 431 | 1 432 | 433 | 434 | 435 | Find and Replace… 436 | f 437 | 1572864 438 | 2147483647 439 | 440 | 441 | 12 442 | 443 | 444 | 445 | Find Next 446 | g 447 | 1048576 448 | 2147483647 449 | 450 | 451 | 2 452 | 453 | 454 | 455 | Find Previous 456 | G 457 | 1179648 458 | 2147483647 459 | 460 | 461 | 3 462 | 463 | 464 | 465 | Use Selection for Find 466 | e 467 | 1048576 468 | 2147483647 469 | 470 | 471 | 7 472 | 473 | 474 | 475 | Jump to Selection 476 | j 477 | 1048576 478 | 2147483647 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | Spelling and Grammar 488 | 489 | 1048576 490 | 2147483647 491 | 492 | 493 | submenuAction: 494 | 495 | Spelling and Grammar 496 | 497 | 498 | 499 | Show Spelling and Grammar 500 | : 501 | 1048576 502 | 2147483647 503 | 504 | 505 | 506 | 507 | 508 | Check Document Now 509 | ; 510 | 1048576 511 | 2147483647 512 | 513 | 514 | 515 | 516 | 517 | YES 518 | YES 519 | 520 | 521 | 2147483647 522 | 523 | 524 | 525 | 526 | 527 | Check Spelling While Typing 528 | 529 | 1048576 530 | 2147483647 531 | 532 | 533 | 534 | 535 | 536 | Check Grammar With Spelling 537 | 538 | 1048576 539 | 2147483647 540 | 541 | 542 | 543 | 544 | 545 | Correct Spelling Automatically 546 | 547 | 2147483647 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | Substitutions 557 | 558 | 1048576 559 | 2147483647 560 | 561 | 562 | submenuAction: 563 | 564 | Substitutions 565 | 566 | 567 | 568 | Show Substitutions 569 | 570 | 2147483647 571 | 572 | 573 | 574 | 575 | 576 | YES 577 | YES 578 | 579 | 580 | 2147483647 581 | 582 | 583 | 584 | 585 | 586 | Smart Copy/Paste 587 | f 588 | 1048576 589 | 2147483647 590 | 591 | 592 | 1 593 | 594 | 595 | 596 | Smart Quotes 597 | g 598 | 1048576 599 | 2147483647 600 | 601 | 602 | 2 603 | 604 | 605 | 606 | Smart Dashes 607 | 608 | 2147483647 609 | 610 | 611 | 612 | 613 | 614 | Smart Links 615 | G 616 | 1179648 617 | 2147483647 618 | 619 | 620 | 3 621 | 622 | 623 | 624 | Text Replacement 625 | 626 | 2147483647 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | Transformations 636 | 637 | 2147483647 638 | 639 | 640 | submenuAction: 641 | 642 | Transformations 643 | 644 | 645 | 646 | Make Upper Case 647 | 648 | 2147483647 649 | 650 | 651 | 652 | 653 | 654 | Make Lower Case 655 | 656 | 2147483647 657 | 658 | 659 | 660 | 661 | 662 | Capitalize 663 | 664 | 2147483647 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | Speech 674 | 675 | 1048576 676 | 2147483647 677 | 678 | 679 | submenuAction: 680 | 681 | Speech 682 | 683 | 684 | 685 | Start Speaking 686 | 687 | 1048576 688 | 2147483647 689 | 690 | 691 | 692 | 693 | 694 | Stop Speaking 695 | 696 | 1048576 697 | 2147483647 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | Format 710 | 711 | 2147483647 712 | 713 | 714 | submenuAction: 715 | 716 | Format 717 | 718 | 719 | 720 | Font 721 | 722 | 2147483647 723 | 724 | 725 | submenuAction: 726 | 727 | Font 728 | 729 | 730 | 731 | Show Fonts 732 | t 733 | 1048576 734 | 2147483647 735 | 736 | 737 | 738 | 739 | 740 | Bold 741 | b 742 | 1048576 743 | 2147483647 744 | 745 | 746 | 2 747 | 748 | 749 | 750 | Italic 751 | i 752 | 1048576 753 | 2147483647 754 | 755 | 756 | 1 757 | 758 | 759 | 760 | Underline 761 | u 762 | 1048576 763 | 2147483647 764 | 765 | 766 | 767 | 768 | 769 | YES 770 | YES 771 | 772 | 773 | 2147483647 774 | 775 | 776 | 777 | 778 | 779 | Bigger 780 | + 781 | 1048576 782 | 2147483647 783 | 784 | 785 | 3 786 | 787 | 788 | 789 | Smaller 790 | - 791 | 1048576 792 | 2147483647 793 | 794 | 795 | 4 796 | 797 | 798 | 799 | YES 800 | YES 801 | 802 | 803 | 2147483647 804 | 805 | 806 | 807 | 808 | 809 | Kern 810 | 811 | 2147483647 812 | 813 | 814 | submenuAction: 815 | 816 | Kern 817 | 818 | 819 | 820 | Use Default 821 | 822 | 2147483647 823 | 824 | 825 | 826 | 827 | 828 | Use None 829 | 830 | 2147483647 831 | 832 | 833 | 834 | 835 | 836 | Tighten 837 | 838 | 2147483647 839 | 840 | 841 | 842 | 843 | 844 | Loosen 845 | 846 | 2147483647 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | Ligature 856 | 857 | 2147483647 858 | 859 | 860 | submenuAction: 861 | 862 | Ligature 863 | 864 | 865 | 866 | Use Default 867 | 868 | 2147483647 869 | 870 | 871 | 872 | 873 | 874 | Use None 875 | 876 | 2147483647 877 | 878 | 879 | 880 | 881 | 882 | Use All 883 | 884 | 2147483647 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | Baseline 894 | 895 | 2147483647 896 | 897 | 898 | submenuAction: 899 | 900 | Baseline 901 | 902 | 903 | 904 | Use Default 905 | 906 | 2147483647 907 | 908 | 909 | 910 | 911 | 912 | Superscript 913 | 914 | 2147483647 915 | 916 | 917 | 918 | 919 | 920 | Subscript 921 | 922 | 2147483647 923 | 924 | 925 | 926 | 927 | 928 | Raise 929 | 930 | 2147483647 931 | 932 | 933 | 934 | 935 | 936 | Lower 937 | 938 | 2147483647 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | YES 948 | YES 949 | 950 | 951 | 2147483647 952 | 953 | 954 | 955 | 956 | 957 | Show Colors 958 | C 959 | 1048576 960 | 2147483647 961 | 962 | 963 | 964 | 965 | 966 | YES 967 | YES 968 | 969 | 970 | 2147483647 971 | 972 | 973 | 974 | 975 | 976 | Copy Style 977 | c 978 | 1572864 979 | 2147483647 980 | 981 | 982 | 983 | 984 | 985 | Paste Style 986 | v 987 | 1572864 988 | 2147483647 989 | 990 | 991 | 992 | 993 | _NSFontMenu 994 | 995 | 996 | 997 | 998 | Text 999 | 1000 | 2147483647 1001 | 1002 | 1003 | submenuAction: 1004 | 1005 | Text 1006 | 1007 | 1008 | 1009 | Align Left 1010 | { 1011 | 1048576 1012 | 2147483647 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | Center 1019 | | 1020 | 1048576 1021 | 2147483647 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | Justify 1028 | 1029 | 2147483647 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | Align Right 1036 | } 1037 | 1048576 1038 | 2147483647 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | YES 1045 | YES 1046 | 1047 | 1048 | 2147483647 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | Writing Direction 1055 | 1056 | 2147483647 1057 | 1058 | 1059 | submenuAction: 1060 | 1061 | Writing Direction 1062 | 1063 | 1064 | 1065 | YES 1066 | Paragraph 1067 | 1068 | 2147483647 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | CURlZmF1bHQ 1075 | 1076 | 2147483647 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | CUxlZnQgdG8gUmlnaHQ 1083 | 1084 | 2147483647 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | CVJpZ2h0IHRvIExlZnQ 1091 | 1092 | 2147483647 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | YES 1099 | YES 1100 | 1101 | 1102 | 2147483647 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | YES 1109 | Selection 1110 | 1111 | 2147483647 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | CURlZmF1bHQ 1118 | 1119 | 2147483647 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | CUxlZnQgdG8gUmlnaHQ 1126 | 1127 | 2147483647 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | CVJpZ2h0IHRvIExlZnQ 1134 | 1135 | 2147483647 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | YES 1145 | YES 1146 | 1147 | 1148 | 2147483647 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | Show Ruler 1155 | 1156 | 2147483647 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | Copy Ruler 1163 | c 1164 | 1310720 1165 | 2147483647 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | Paste Ruler 1172 | v 1173 | 1310720 1174 | 2147483647 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | View 1187 | 1188 | 1048576 1189 | 2147483647 1190 | 1191 | 1192 | submenuAction: 1193 | 1194 | View 1195 | 1196 | 1197 | 1198 | Show Toolbar 1199 | t 1200 | 1572864 1201 | 2147483647 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | Customize Toolbar… 1208 | 1209 | 1048576 1210 | 2147483647 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | Window 1220 | 1221 | 1048576 1222 | 2147483647 1223 | 1224 | 1225 | submenuAction: 1226 | 1227 | Window 1228 | 1229 | 1230 | 1231 | Minimize 1232 | m 1233 | 1048576 1234 | 2147483647 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | Zoom 1241 | 1242 | 1048576 1243 | 2147483647 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | YES 1250 | YES 1251 | 1252 | 1253 | 1048576 1254 | 2147483647 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | Bring All to Front 1261 | 1262 | 1048576 1263 | 2147483647 1264 | 1265 | 1266 | 1267 | 1268 | _NSWindowsMenu 1269 | 1270 | 1271 | 1272 | 1273 | Help 1274 | 1275 | 2147483647 1276 | 1277 | 1278 | submenuAction: 1279 | 1280 | Help 1281 | 1282 | 1283 | 1284 | ScrollToRefresh Help 1285 | ? 1286 | 1048576 1287 | 2147483647 1288 | 1289 | 1290 | 1291 | 1292 | _NSHelpMenu 1293 | 1294 | 1295 | 1296 | _NSMainMenu 1297 | 1298 | 1299 | 15 1300 | 2 1301 | {{335, 390}, {480, 360}} 1302 | 1954021376 1303 | ScrollToRefresh 1304 | NSWindow 1305 | 1306 | 1307 | 1308 | 1309 | 256 1310 | 1311 | 1312 | 1313 | 274 1314 | 1315 | 1316 | 1317 | 2304 1318 | 1319 | 1320 | 1321 | 274 1322 | 1323 | 1324 | 1325 | 268 1326 | 1327 | Apple PDF pasteboard type 1328 | Apple PICT pasteboard type 1329 | Apple PNG pasteboard type 1330 | NSFilenamesPboardType 1331 | NeXT Encapsulated PostScript v1.2 pasteboard type 1332 | NeXT TIFF v4.0 pasteboard type 1333 | 1334 | {{53, 28}, {356, 645}} 1335 | 1336 | 1337 | 1338 | _NS:2141 1339 | YES 1340 | 1341 | 130560 1342 | 33554432 1343 | 1344 | NSImage 1345 | NSApplicationIcon 1346 | 1347 | _NS:2141 1348 | 0 1349 | 0 1350 | 2 1351 | NO 1352 | 1353 | YES 1354 | 1355 | 1356 | 1357 | 268 1358 | {{161, 88}, {140, 32}} 1359 | 1360 | 1361 | 1362 | _NS:687 1363 | YES 1364 | 1365 | 67239424 1366 | 134217728 1367 | Stop Refreshing 1368 | 1369 | LucidaGrande 1370 | 13 1371 | 1044 1372 | 1373 | _NS:687 1374 | 1375 | -2038284033 1376 | 129 1377 | 1378 | 1379 | 200 1380 | 25 1381 | 1382 | 1383 | 1384 | {463, 700} 1385 | 1386 | 1387 | 1388 | _NS:404 1389 | 1390 | 1391 | {{1, 1}, {478, 358}} 1392 | 1393 | 1394 | 1395 | _NS:402 1396 | 1397 | 1398 | 6 1399 | System 1400 | controlColor 1401 | 1402 | 3 1403 | MC42NjY2NjY2NjY3AA 1404 | 1405 | 1406 | 4 1407 | 1408 | 1409 | 1410 | 256 1411 | {{464, 1}, {15, 352}} 1412 | 1413 | 1414 | 1415 | _NS:408 1416 | YES 1417 | 1418 | _doScroller: 1419 | 1 1420 | 0.51142857142857145 1421 | 1422 | 1423 | 1424 | 256 1425 | {{1, 344}, {472, 15}} 1426 | 1427 | 1428 | 1429 | _NS:412 1430 | 1 1431 | 1432 | _doScroller: 1433 | 0.50602412223815918 1434 | 1435 | 1436 | {480, 360} 1437 | 1438 | 1439 | 1440 | _NS:400 1441 | 133234 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | {480, 360} 1448 | 1449 | 1450 | 1451 | 1452 | {{0, 0}, {2560, 1418}} 1453 | {10000000000000, 10000000000000} 1454 | YES 1455 | 1456 | 1457 | EQSTRAppDelegate 1458 | 1459 | 1460 | NSFontManager 1461 | 1462 | 1463 | 1464 | 1465 | 1466 | 1467 | terminate: 1468 | 1469 | 1470 | 1471 | 449 1472 | 1473 | 1474 | 1475 | orderFrontStandardAboutPanel: 1476 | 1477 | 1478 | 1479 | 142 1480 | 1481 | 1482 | 1483 | delegate 1484 | 1485 | 1486 | 1487 | 495 1488 | 1489 | 1490 | 1491 | performMiniaturize: 1492 | 1493 | 1494 | 1495 | 37 1496 | 1497 | 1498 | 1499 | arrangeInFront: 1500 | 1501 | 1502 | 1503 | 39 1504 | 1505 | 1506 | 1507 | print: 1508 | 1509 | 1510 | 1511 | 86 1512 | 1513 | 1514 | 1515 | runPageLayout: 1516 | 1517 | 1518 | 1519 | 87 1520 | 1521 | 1522 | 1523 | clearRecentDocuments: 1524 | 1525 | 1526 | 1527 | 127 1528 | 1529 | 1530 | 1531 | performClose: 1532 | 1533 | 1534 | 1535 | 193 1536 | 1537 | 1538 | 1539 | toggleContinuousSpellChecking: 1540 | 1541 | 1542 | 1543 | 222 1544 | 1545 | 1546 | 1547 | undo: 1548 | 1549 | 1550 | 1551 | 223 1552 | 1553 | 1554 | 1555 | copy: 1556 | 1557 | 1558 | 1559 | 224 1560 | 1561 | 1562 | 1563 | checkSpelling: 1564 | 1565 | 1566 | 1567 | 225 1568 | 1569 | 1570 | 1571 | paste: 1572 | 1573 | 1574 | 1575 | 226 1576 | 1577 | 1578 | 1579 | stopSpeaking: 1580 | 1581 | 1582 | 1583 | 227 1584 | 1585 | 1586 | 1587 | cut: 1588 | 1589 | 1590 | 1591 | 228 1592 | 1593 | 1594 | 1595 | showGuessPanel: 1596 | 1597 | 1598 | 1599 | 230 1600 | 1601 | 1602 | 1603 | redo: 1604 | 1605 | 1606 | 1607 | 231 1608 | 1609 | 1610 | 1611 | selectAll: 1612 | 1613 | 1614 | 1615 | 232 1616 | 1617 | 1618 | 1619 | startSpeaking: 1620 | 1621 | 1622 | 1623 | 233 1624 | 1625 | 1626 | 1627 | delete: 1628 | 1629 | 1630 | 1631 | 235 1632 | 1633 | 1634 | 1635 | performZoom: 1636 | 1637 | 1638 | 1639 | 240 1640 | 1641 | 1642 | 1643 | performFindPanelAction: 1644 | 1645 | 1646 | 1647 | 241 1648 | 1649 | 1650 | 1651 | centerSelectionInVisibleArea: 1652 | 1653 | 1654 | 1655 | 245 1656 | 1657 | 1658 | 1659 | toggleGrammarChecking: 1660 | 1661 | 1662 | 1663 | 347 1664 | 1665 | 1666 | 1667 | toggleSmartInsertDelete: 1668 | 1669 | 1670 | 1671 | 355 1672 | 1673 | 1674 | 1675 | toggleAutomaticQuoteSubstitution: 1676 | 1677 | 1678 | 1679 | 356 1680 | 1681 | 1682 | 1683 | toggleAutomaticLinkDetection: 1684 | 1685 | 1686 | 1687 | 357 1688 | 1689 | 1690 | 1691 | saveDocument: 1692 | 1693 | 1694 | 1695 | 362 1696 | 1697 | 1698 | 1699 | revertDocumentToSaved: 1700 | 1701 | 1702 | 1703 | 364 1704 | 1705 | 1706 | 1707 | runToolbarCustomizationPalette: 1708 | 1709 | 1710 | 1711 | 365 1712 | 1713 | 1714 | 1715 | toggleToolbarShown: 1716 | 1717 | 1718 | 1719 | 366 1720 | 1721 | 1722 | 1723 | hide: 1724 | 1725 | 1726 | 1727 | 367 1728 | 1729 | 1730 | 1731 | hideOtherApplications: 1732 | 1733 | 1734 | 1735 | 368 1736 | 1737 | 1738 | 1739 | unhideAllApplications: 1740 | 1741 | 1742 | 1743 | 370 1744 | 1745 | 1746 | 1747 | newDocument: 1748 | 1749 | 1750 | 1751 | 373 1752 | 1753 | 1754 | 1755 | openDocument: 1756 | 1757 | 1758 | 1759 | 374 1760 | 1761 | 1762 | 1763 | raiseBaseline: 1764 | 1765 | 1766 | 1767 | 426 1768 | 1769 | 1770 | 1771 | lowerBaseline: 1772 | 1773 | 1774 | 1775 | 427 1776 | 1777 | 1778 | 1779 | copyFont: 1780 | 1781 | 1782 | 1783 | 428 1784 | 1785 | 1786 | 1787 | subscript: 1788 | 1789 | 1790 | 1791 | 429 1792 | 1793 | 1794 | 1795 | superscript: 1796 | 1797 | 1798 | 1799 | 430 1800 | 1801 | 1802 | 1803 | tightenKerning: 1804 | 1805 | 1806 | 1807 | 431 1808 | 1809 | 1810 | 1811 | underline: 1812 | 1813 | 1814 | 1815 | 432 1816 | 1817 | 1818 | 1819 | orderFrontColorPanel: 1820 | 1821 | 1822 | 1823 | 433 1824 | 1825 | 1826 | 1827 | useAllLigatures: 1828 | 1829 | 1830 | 1831 | 434 1832 | 1833 | 1834 | 1835 | loosenKerning: 1836 | 1837 | 1838 | 1839 | 435 1840 | 1841 | 1842 | 1843 | pasteFont: 1844 | 1845 | 1846 | 1847 | 436 1848 | 1849 | 1850 | 1851 | unscript: 1852 | 1853 | 1854 | 1855 | 437 1856 | 1857 | 1858 | 1859 | useStandardKerning: 1860 | 1861 | 1862 | 1863 | 438 1864 | 1865 | 1866 | 1867 | useStandardLigatures: 1868 | 1869 | 1870 | 1871 | 439 1872 | 1873 | 1874 | 1875 | turnOffLigatures: 1876 | 1877 | 1878 | 1879 | 440 1880 | 1881 | 1882 | 1883 | turnOffKerning: 1884 | 1885 | 1886 | 1887 | 441 1888 | 1889 | 1890 | 1891 | toggleAutomaticSpellingCorrection: 1892 | 1893 | 1894 | 1895 | 456 1896 | 1897 | 1898 | 1899 | orderFrontSubstitutionsPanel: 1900 | 1901 | 1902 | 1903 | 458 1904 | 1905 | 1906 | 1907 | toggleAutomaticDashSubstitution: 1908 | 1909 | 1910 | 1911 | 461 1912 | 1913 | 1914 | 1915 | toggleAutomaticTextReplacement: 1916 | 1917 | 1918 | 1919 | 463 1920 | 1921 | 1922 | 1923 | uppercaseWord: 1924 | 1925 | 1926 | 1927 | 464 1928 | 1929 | 1930 | 1931 | capitalizeWord: 1932 | 1933 | 1934 | 1935 | 467 1936 | 1937 | 1938 | 1939 | lowercaseWord: 1940 | 1941 | 1942 | 1943 | 468 1944 | 1945 | 1946 | 1947 | pasteAsPlainText: 1948 | 1949 | 1950 | 1951 | 486 1952 | 1953 | 1954 | 1955 | performFindPanelAction: 1956 | 1957 | 1958 | 1959 | 487 1960 | 1961 | 1962 | 1963 | performFindPanelAction: 1964 | 1965 | 1966 | 1967 | 488 1968 | 1969 | 1970 | 1971 | performFindPanelAction: 1972 | 1973 | 1974 | 1975 | 489 1976 | 1977 | 1978 | 1979 | showHelp: 1980 | 1981 | 1982 | 1983 | 493 1984 | 1985 | 1986 | 1987 | alignCenter: 1988 | 1989 | 1990 | 1991 | 518 1992 | 1993 | 1994 | 1995 | pasteRuler: 1996 | 1997 | 1998 | 1999 | 519 2000 | 2001 | 2002 | 2003 | toggleRuler: 2004 | 2005 | 2006 | 2007 | 520 2008 | 2009 | 2010 | 2011 | alignRight: 2012 | 2013 | 2014 | 2015 | 521 2016 | 2017 | 2018 | 2019 | copyRuler: 2020 | 2021 | 2022 | 2023 | 522 2024 | 2025 | 2026 | 2027 | alignJustified: 2028 | 2029 | 2030 | 2031 | 523 2032 | 2033 | 2034 | 2035 | alignLeft: 2036 | 2037 | 2038 | 2039 | 524 2040 | 2041 | 2042 | 2043 | makeBaseWritingDirectionNatural: 2044 | 2045 | 2046 | 2047 | 525 2048 | 2049 | 2050 | 2051 | makeBaseWritingDirectionLeftToRight: 2052 | 2053 | 2054 | 2055 | 526 2056 | 2057 | 2058 | 2059 | makeBaseWritingDirectionRightToLeft: 2060 | 2061 | 2062 | 2063 | 527 2064 | 2065 | 2066 | 2067 | makeTextWritingDirectionNatural: 2068 | 2069 | 2070 | 2071 | 528 2072 | 2073 | 2074 | 2075 | makeTextWritingDirectionLeftToRight: 2076 | 2077 | 2078 | 2079 | 529 2080 | 2081 | 2082 | 2083 | makeTextWritingDirectionRightToLeft: 2084 | 2085 | 2086 | 2087 | 530 2088 | 2089 | 2090 | 2091 | performFindPanelAction: 2092 | 2093 | 2094 | 2095 | 535 2096 | 2097 | 2098 | 2099 | addFontTrait: 2100 | 2101 | 2102 | 2103 | 421 2104 | 2105 | 2106 | 2107 | addFontTrait: 2108 | 2109 | 2110 | 2111 | 422 2112 | 2113 | 2114 | 2115 | modifyFont: 2116 | 2117 | 2118 | 2119 | 423 2120 | 2121 | 2122 | 2123 | orderFrontFontPanel: 2124 | 2125 | 2126 | 2127 | 424 2128 | 2129 | 2130 | 2131 | modifyFont: 2132 | 2133 | 2134 | 2135 | 425 2136 | 2137 | 2138 | 2139 | window 2140 | 2141 | 2142 | 2143 | 532 2144 | 2145 | 2146 | 2147 | stopRefreshing: 2148 | 2149 | 2150 | 2151 | 544 2152 | 2153 | 2154 | 2155 | 2156 | 2157 | 0 2158 | 2159 | 2160 | 2161 | 2162 | 2163 | -2 2164 | 2165 | 2166 | File's Owner 2167 | 2168 | 2169 | -1 2170 | 2171 | 2172 | First Responder 2173 | 2174 | 2175 | -3 2176 | 2177 | 2178 | Application 2179 | 2180 | 2181 | 29 2182 | 2183 | 2184 | 2185 | 2186 | 2187 | 2188 | 2189 | 2190 | 2191 | 2192 | 2193 | 2194 | 2195 | 19 2196 | 2197 | 2198 | 2199 | 2200 | 2201 | 2202 | 2203 | 56 2204 | 2205 | 2206 | 2207 | 2208 | 2209 | 2210 | 2211 | 217 2212 | 2213 | 2214 | 2215 | 2216 | 2217 | 2218 | 2219 | 83 2220 | 2221 | 2222 | 2223 | 2224 | 2225 | 2226 | 2227 | 81 2228 | 2229 | 2230 | 2231 | 2232 | 2233 | 2234 | 2235 | 2236 | 2237 | 2238 | 2239 | 2240 | 2241 | 2242 | 2243 | 2244 | 75 2245 | 2246 | 2247 | 2248 | 2249 | 78 2250 | 2251 | 2252 | 2253 | 2254 | 72 2255 | 2256 | 2257 | 2258 | 2259 | 82 2260 | 2261 | 2262 | 2263 | 2264 | 124 2265 | 2266 | 2267 | 2268 | 2269 | 2270 | 2271 | 2272 | 77 2273 | 2274 | 2275 | 2276 | 2277 | 73 2278 | 2279 | 2280 | 2281 | 2282 | 79 2283 | 2284 | 2285 | 2286 | 2287 | 112 2288 | 2289 | 2290 | 2291 | 2292 | 74 2293 | 2294 | 2295 | 2296 | 2297 | 125 2298 | 2299 | 2300 | 2301 | 2302 | 2303 | 2304 | 2305 | 126 2306 | 2307 | 2308 | 2309 | 2310 | 205 2311 | 2312 | 2313 | 2314 | 2315 | 2316 | 2317 | 2318 | 2319 | 2320 | 2321 | 2322 | 2323 | 2324 | 2325 | 2326 | 2327 | 2328 | 2329 | 2330 | 2331 | 2332 | 202 2333 | 2334 | 2335 | 2336 | 2337 | 198 2338 | 2339 | 2340 | 2341 | 2342 | 207 2343 | 2344 | 2345 | 2346 | 2347 | 214 2348 | 2349 | 2350 | 2351 | 2352 | 199 2353 | 2354 | 2355 | 2356 | 2357 | 203 2358 | 2359 | 2360 | 2361 | 2362 | 197 2363 | 2364 | 2365 | 2366 | 2367 | 206 2368 | 2369 | 2370 | 2371 | 2372 | 215 2373 | 2374 | 2375 | 2376 | 2377 | 218 2378 | 2379 | 2380 | 2381 | 2382 | 2383 | 2384 | 2385 | 216 2386 | 2387 | 2388 | 2389 | 2390 | 2391 | 2392 | 2393 | 200 2394 | 2395 | 2396 | 2397 | 2398 | 2399 | 2400 | 2401 | 2402 | 2403 | 2404 | 2405 | 2406 | 219 2407 | 2408 | 2409 | 2410 | 2411 | 201 2412 | 2413 | 2414 | 2415 | 2416 | 204 2417 | 2418 | 2419 | 2420 | 2421 | 220 2422 | 2423 | 2424 | 2425 | 2426 | 2427 | 2428 | 2429 | 2430 | 2431 | 2432 | 2433 | 2434 | 213 2435 | 2436 | 2437 | 2438 | 2439 | 210 2440 | 2441 | 2442 | 2443 | 2444 | 221 2445 | 2446 | 2447 | 2448 | 2449 | 208 2450 | 2451 | 2452 | 2453 | 2454 | 209 2455 | 2456 | 2457 | 2458 | 2459 | 57 2460 | 2461 | 2462 | 2463 | 2464 | 2465 | 2466 | 2467 | 2468 | 2469 | 2470 | 2471 | 2472 | 2473 | 2474 | 2475 | 2476 | 2477 | 58 2478 | 2479 | 2480 | 2481 | 2482 | 134 2483 | 2484 | 2485 | 2486 | 2487 | 150 2488 | 2489 | 2490 | 2491 | 2492 | 136 2493 | 2494 | 2495 | 2496 | 2497 | 144 2498 | 2499 | 2500 | 2501 | 2502 | 129 2503 | 2504 | 2505 | 2506 | 2507 | 143 2508 | 2509 | 2510 | 2511 | 2512 | 236 2513 | 2514 | 2515 | 2516 | 2517 | 131 2518 | 2519 | 2520 | 2521 | 2522 | 2523 | 2524 | 2525 | 149 2526 | 2527 | 2528 | 2529 | 2530 | 145 2531 | 2532 | 2533 | 2534 | 2535 | 130 2536 | 2537 | 2538 | 2539 | 2540 | 24 2541 | 2542 | 2543 | 2544 | 2545 | 2546 | 2547 | 2548 | 2549 | 2550 | 2551 | 92 2552 | 2553 | 2554 | 2555 | 2556 | 5 2557 | 2558 | 2559 | 2560 | 2561 | 239 2562 | 2563 | 2564 | 2565 | 2566 | 23 2567 | 2568 | 2569 | 2570 | 2571 | 295 2572 | 2573 | 2574 | 2575 | 2576 | 2577 | 2578 | 2579 | 296 2580 | 2581 | 2582 | 2583 | 2584 | 2585 | 2586 | 2587 | 2588 | 297 2589 | 2590 | 2591 | 2592 | 2593 | 298 2594 | 2595 | 2596 | 2597 | 2598 | 211 2599 | 2600 | 2601 | 2602 | 2603 | 2604 | 2605 | 2606 | 212 2607 | 2608 | 2609 | 2610 | 2611 | 2612 | 2613 | 2614 | 2615 | 195 2616 | 2617 | 2618 | 2619 | 2620 | 196 2621 | 2622 | 2623 | 2624 | 2625 | 346 2626 | 2627 | 2628 | 2629 | 2630 | 348 2631 | 2632 | 2633 | 2634 | 2635 | 2636 | 2637 | 2638 | 349 2639 | 2640 | 2641 | 2642 | 2643 | 2644 | 2645 | 2646 | 2647 | 2648 | 2649 | 2650 | 2651 | 2652 | 350 2653 | 2654 | 2655 | 2656 | 2657 | 351 2658 | 2659 | 2660 | 2661 | 2662 | 354 2663 | 2664 | 2665 | 2666 | 2667 | 371 2668 | 2669 | 2670 | 2671 | 2672 | 2673 | 2674 | 2675 | 372 2676 | 2677 | 2678 | 2679 | 2680 | 2681 | 2682 | 2683 | 375 2684 | 2685 | 2686 | 2687 | 2688 | 2689 | 2690 | 2691 | 376 2692 | 2693 | 2694 | 2695 | 2696 | 2697 | 2698 | 2699 | 2700 | 377 2701 | 2702 | 2703 | 2704 | 2705 | 2706 | 2707 | 2708 | 388 2709 | 2710 | 2711 | 2712 | 2713 | 2714 | 2715 | 2716 | 2717 | 2718 | 2719 | 2720 | 2721 | 2722 | 2723 | 2724 | 2725 | 2726 | 2727 | 2728 | 2729 | 2730 | 2731 | 389 2732 | 2733 | 2734 | 2735 | 2736 | 390 2737 | 2738 | 2739 | 2740 | 2741 | 391 2742 | 2743 | 2744 | 2745 | 2746 | 392 2747 | 2748 | 2749 | 2750 | 2751 | 393 2752 | 2753 | 2754 | 2755 | 2756 | 394 2757 | 2758 | 2759 | 2760 | 2761 | 395 2762 | 2763 | 2764 | 2765 | 2766 | 396 2767 | 2768 | 2769 | 2770 | 2771 | 397 2772 | 2773 | 2774 | 2775 | 2776 | 2777 | 2778 | 2779 | 398 2780 | 2781 | 2782 | 2783 | 2784 | 2785 | 2786 | 2787 | 399 2788 | 2789 | 2790 | 2791 | 2792 | 2793 | 2794 | 2795 | 400 2796 | 2797 | 2798 | 2799 | 2800 | 401 2801 | 2802 | 2803 | 2804 | 2805 | 402 2806 | 2807 | 2808 | 2809 | 2810 | 403 2811 | 2812 | 2813 | 2814 | 2815 | 404 2816 | 2817 | 2818 | 2819 | 2820 | 405 2821 | 2822 | 2823 | 2824 | 2825 | 2826 | 2827 | 2828 | 2829 | 2830 | 2831 | 2832 | 406 2833 | 2834 | 2835 | 2836 | 2837 | 407 2838 | 2839 | 2840 | 2841 | 2842 | 408 2843 | 2844 | 2845 | 2846 | 2847 | 409 2848 | 2849 | 2850 | 2851 | 2852 | 410 2853 | 2854 | 2855 | 2856 | 2857 | 411 2858 | 2859 | 2860 | 2861 | 2862 | 2863 | 2864 | 2865 | 2866 | 2867 | 412 2868 | 2869 | 2870 | 2871 | 2872 | 413 2873 | 2874 | 2875 | 2876 | 2877 | 414 2878 | 2879 | 2880 | 2881 | 2882 | 415 2883 | 2884 | 2885 | 2886 | 2887 | 2888 | 2889 | 2890 | 2891 | 2892 | 2893 | 416 2894 | 2895 | 2896 | 2897 | 2898 | 417 2899 | 2900 | 2901 | 2902 | 2903 | 418 2904 | 2905 | 2906 | 2907 | 2908 | 419 2909 | 2910 | 2911 | 2912 | 2913 | 420 2914 | 2915 | 2916 | 2917 | 2918 | 450 2919 | 2920 | 2921 | 2922 | 2923 | 2924 | 2925 | 2926 | 451 2927 | 2928 | 2929 | 2930 | 2931 | 2932 | 2933 | 2934 | 2935 | 2936 | 452 2937 | 2938 | 2939 | 2940 | 2941 | 453 2942 | 2943 | 2944 | 2945 | 2946 | 454 2947 | 2948 | 2949 | 2950 | 2951 | 457 2952 | 2953 | 2954 | 2955 | 2956 | 459 2957 | 2958 | 2959 | 2960 | 2961 | 460 2962 | 2963 | 2964 | 2965 | 2966 | 462 2967 | 2968 | 2969 | 2970 | 2971 | 465 2972 | 2973 | 2974 | 2975 | 2976 | 466 2977 | 2978 | 2979 | 2980 | 2981 | 485 2982 | 2983 | 2984 | 2985 | 2986 | 490 2987 | 2988 | 2989 | 2990 | 2991 | 2992 | 2993 | 2994 | 491 2995 | 2996 | 2997 | 2998 | 2999 | 3000 | 3001 | 3002 | 492 3003 | 3004 | 3005 | 3006 | 3007 | 494 3008 | 3009 | 3010 | 3011 | 3012 | 496 3013 | 3014 | 3015 | 3016 | 3017 | 3018 | 3019 | 3020 | 497 3021 | 3022 | 3023 | 3024 | 3025 | 3026 | 3027 | 3028 | 3029 | 3030 | 3031 | 3032 | 3033 | 3034 | 3035 | 3036 | 3037 | 498 3038 | 3039 | 3040 | 3041 | 3042 | 499 3043 | 3044 | 3045 | 3046 | 3047 | 500 3048 | 3049 | 3050 | 3051 | 3052 | 501 3053 | 3054 | 3055 | 3056 | 3057 | 502 3058 | 3059 | 3060 | 3061 | 3062 | 503 3063 | 3064 | 3065 | 3066 | 3067 | 3068 | 3069 | 3070 | 504 3071 | 3072 | 3073 | 3074 | 3075 | 505 3076 | 3077 | 3078 | 3079 | 3080 | 506 3081 | 3082 | 3083 | 3084 | 3085 | 507 3086 | 3087 | 3088 | 3089 | 3090 | 508 3091 | 3092 | 3093 | 3094 | 3095 | 3096 | 3097 | 3098 | 3099 | 3100 | 3101 | 3102 | 3103 | 3104 | 3105 | 3106 | 509 3107 | 3108 | 3109 | 3110 | 3111 | 510 3112 | 3113 | 3114 | 3115 | 3116 | 511 3117 | 3118 | 3119 | 3120 | 3121 | 512 3122 | 3123 | 3124 | 3125 | 3126 | 513 3127 | 3128 | 3129 | 3130 | 3131 | 514 3132 | 3133 | 3134 | 3135 | 3136 | 515 3137 | 3138 | 3139 | 3140 | 3141 | 516 3142 | 3143 | 3144 | 3145 | 3146 | 517 3147 | 3148 | 3149 | 3150 | 3151 | 534 3152 | 3153 | 3154 | 3155 | 3156 | 536 3157 | 3158 | 3159 | 3160 | 3161 | 3162 | 3163 | 3164 | 3165 | 3166 | 537 3167 | 3168 | 3169 | 3170 | 3171 | 3172 | 3173 | 3174 | 3175 | 538 3176 | 3177 | 3178 | 3179 | 3180 | 539 3181 | 3182 | 3183 | 3184 | 3185 | 540 3186 | 3187 | 3188 | 3189 | 3190 | 3191 | 3192 | 3193 | 541 3194 | 3195 | 3196 | 3197 | 3198 | 542 3199 | 3200 | 3201 | 3202 | 3203 | 3204 | 3205 | 3206 | 543 3207 | 3208 | 3209 | 3210 | 3211 | 3212 | 3213 | com.apple.InterfaceBuilder.CocoaPlugin 3214 | com.apple.InterfaceBuilder.CocoaPlugin 3215 | com.apple.InterfaceBuilder.CocoaPlugin 3216 | com.apple.InterfaceBuilder.CocoaPlugin 3217 | com.apple.InterfaceBuilder.CocoaPlugin 3218 | com.apple.InterfaceBuilder.CocoaPlugin 3219 | com.apple.InterfaceBuilder.CocoaPlugin 3220 | com.apple.InterfaceBuilder.CocoaPlugin 3221 | com.apple.InterfaceBuilder.CocoaPlugin 3222 | com.apple.InterfaceBuilder.CocoaPlugin 3223 | com.apple.InterfaceBuilder.CocoaPlugin 3224 | com.apple.InterfaceBuilder.CocoaPlugin 3225 | com.apple.InterfaceBuilder.CocoaPlugin 3226 | com.apple.InterfaceBuilder.CocoaPlugin 3227 | com.apple.InterfaceBuilder.CocoaPlugin 3228 | com.apple.InterfaceBuilder.CocoaPlugin 3229 | com.apple.InterfaceBuilder.CocoaPlugin 3230 | com.apple.InterfaceBuilder.CocoaPlugin 3231 | com.apple.InterfaceBuilder.CocoaPlugin 3232 | com.apple.InterfaceBuilder.CocoaPlugin 3233 | com.apple.InterfaceBuilder.CocoaPlugin 3234 | com.apple.InterfaceBuilder.CocoaPlugin 3235 | com.apple.InterfaceBuilder.CocoaPlugin 3236 | com.apple.InterfaceBuilder.CocoaPlugin 3237 | com.apple.InterfaceBuilder.CocoaPlugin 3238 | com.apple.InterfaceBuilder.CocoaPlugin 3239 | com.apple.InterfaceBuilder.CocoaPlugin 3240 | com.apple.InterfaceBuilder.CocoaPlugin 3241 | com.apple.InterfaceBuilder.CocoaPlugin 3242 | com.apple.InterfaceBuilder.CocoaPlugin 3243 | com.apple.InterfaceBuilder.CocoaPlugin 3244 | com.apple.InterfaceBuilder.CocoaPlugin 3245 | com.apple.InterfaceBuilder.CocoaPlugin 3246 | com.apple.InterfaceBuilder.CocoaPlugin 3247 | com.apple.InterfaceBuilder.CocoaPlugin 3248 | com.apple.InterfaceBuilder.CocoaPlugin 3249 | com.apple.InterfaceBuilder.CocoaPlugin 3250 | com.apple.InterfaceBuilder.CocoaPlugin 3251 | com.apple.InterfaceBuilder.CocoaPlugin 3252 | com.apple.InterfaceBuilder.CocoaPlugin 3253 | com.apple.InterfaceBuilder.CocoaPlugin 3254 | com.apple.InterfaceBuilder.CocoaPlugin 3255 | com.apple.InterfaceBuilder.CocoaPlugin 3256 | com.apple.InterfaceBuilder.CocoaPlugin 3257 | com.apple.InterfaceBuilder.CocoaPlugin 3258 | com.apple.InterfaceBuilder.CocoaPlugin 3259 | com.apple.InterfaceBuilder.CocoaPlugin 3260 | com.apple.InterfaceBuilder.CocoaPlugin 3261 | com.apple.InterfaceBuilder.CocoaPlugin 3262 | com.apple.InterfaceBuilder.CocoaPlugin 3263 | com.apple.InterfaceBuilder.CocoaPlugin 3264 | com.apple.InterfaceBuilder.CocoaPlugin 3265 | com.apple.InterfaceBuilder.CocoaPlugin 3266 | com.apple.InterfaceBuilder.CocoaPlugin 3267 | com.apple.InterfaceBuilder.CocoaPlugin 3268 | com.apple.InterfaceBuilder.CocoaPlugin 3269 | com.apple.InterfaceBuilder.CocoaPlugin 3270 | com.apple.InterfaceBuilder.CocoaPlugin 3271 | com.apple.InterfaceBuilder.CocoaPlugin 3272 | com.apple.InterfaceBuilder.CocoaPlugin 3273 | com.apple.InterfaceBuilder.CocoaPlugin 3274 | {{380, 496}, {480, 360}} 3275 | 3276 | com.apple.InterfaceBuilder.CocoaPlugin 3277 | com.apple.InterfaceBuilder.CocoaPlugin 3278 | com.apple.InterfaceBuilder.CocoaPlugin 3279 | com.apple.InterfaceBuilder.CocoaPlugin 3280 | com.apple.InterfaceBuilder.CocoaPlugin 3281 | com.apple.InterfaceBuilder.CocoaPlugin 3282 | com.apple.InterfaceBuilder.CocoaPlugin 3283 | com.apple.InterfaceBuilder.CocoaPlugin 3284 | com.apple.InterfaceBuilder.CocoaPlugin 3285 | com.apple.InterfaceBuilder.CocoaPlugin 3286 | com.apple.InterfaceBuilder.CocoaPlugin 3287 | com.apple.InterfaceBuilder.CocoaPlugin 3288 | com.apple.InterfaceBuilder.CocoaPlugin 3289 | com.apple.InterfaceBuilder.CocoaPlugin 3290 | com.apple.InterfaceBuilder.CocoaPlugin 3291 | com.apple.InterfaceBuilder.CocoaPlugin 3292 | com.apple.InterfaceBuilder.CocoaPlugin 3293 | com.apple.InterfaceBuilder.CocoaPlugin 3294 | com.apple.InterfaceBuilder.CocoaPlugin 3295 | com.apple.InterfaceBuilder.CocoaPlugin 3296 | com.apple.InterfaceBuilder.CocoaPlugin 3297 | com.apple.InterfaceBuilder.CocoaPlugin 3298 | com.apple.InterfaceBuilder.CocoaPlugin 3299 | com.apple.InterfaceBuilder.CocoaPlugin 3300 | com.apple.InterfaceBuilder.CocoaPlugin 3301 | com.apple.InterfaceBuilder.CocoaPlugin 3302 | com.apple.InterfaceBuilder.CocoaPlugin 3303 | com.apple.InterfaceBuilder.CocoaPlugin 3304 | com.apple.InterfaceBuilder.CocoaPlugin 3305 | com.apple.InterfaceBuilder.CocoaPlugin 3306 | com.apple.InterfaceBuilder.CocoaPlugin 3307 | com.apple.InterfaceBuilder.CocoaPlugin 3308 | com.apple.InterfaceBuilder.CocoaPlugin 3309 | com.apple.InterfaceBuilder.CocoaPlugin 3310 | com.apple.InterfaceBuilder.CocoaPlugin 3311 | com.apple.InterfaceBuilder.CocoaPlugin 3312 | com.apple.InterfaceBuilder.CocoaPlugin 3313 | com.apple.InterfaceBuilder.CocoaPlugin 3314 | com.apple.InterfaceBuilder.CocoaPlugin 3315 | com.apple.InterfaceBuilder.CocoaPlugin 3316 | com.apple.InterfaceBuilder.CocoaPlugin 3317 | com.apple.InterfaceBuilder.CocoaPlugin 3318 | com.apple.InterfaceBuilder.CocoaPlugin 3319 | com.apple.InterfaceBuilder.CocoaPlugin 3320 | com.apple.InterfaceBuilder.CocoaPlugin 3321 | com.apple.InterfaceBuilder.CocoaPlugin 3322 | com.apple.InterfaceBuilder.CocoaPlugin 3323 | com.apple.InterfaceBuilder.CocoaPlugin 3324 | com.apple.InterfaceBuilder.CocoaPlugin 3325 | com.apple.InterfaceBuilder.CocoaPlugin 3326 | com.apple.InterfaceBuilder.CocoaPlugin 3327 | com.apple.InterfaceBuilder.CocoaPlugin 3328 | com.apple.InterfaceBuilder.CocoaPlugin 3329 | com.apple.InterfaceBuilder.CocoaPlugin 3330 | com.apple.InterfaceBuilder.CocoaPlugin 3331 | com.apple.InterfaceBuilder.CocoaPlugin 3332 | com.apple.InterfaceBuilder.CocoaPlugin 3333 | com.apple.InterfaceBuilder.CocoaPlugin 3334 | com.apple.InterfaceBuilder.CocoaPlugin 3335 | com.apple.InterfaceBuilder.CocoaPlugin 3336 | com.apple.InterfaceBuilder.CocoaPlugin 3337 | com.apple.InterfaceBuilder.CocoaPlugin 3338 | com.apple.InterfaceBuilder.CocoaPlugin 3339 | com.apple.InterfaceBuilder.CocoaPlugin 3340 | com.apple.InterfaceBuilder.CocoaPlugin 3341 | com.apple.InterfaceBuilder.CocoaPlugin 3342 | com.apple.InterfaceBuilder.CocoaPlugin 3343 | com.apple.InterfaceBuilder.CocoaPlugin 3344 | com.apple.InterfaceBuilder.CocoaPlugin 3345 | com.apple.InterfaceBuilder.CocoaPlugin 3346 | com.apple.InterfaceBuilder.CocoaPlugin 3347 | com.apple.InterfaceBuilder.CocoaPlugin 3348 | com.apple.InterfaceBuilder.CocoaPlugin 3349 | com.apple.InterfaceBuilder.CocoaPlugin 3350 | com.apple.InterfaceBuilder.CocoaPlugin 3351 | com.apple.InterfaceBuilder.CocoaPlugin 3352 | com.apple.InterfaceBuilder.CocoaPlugin 3353 | EQSTRScrollView 3354 | com.apple.InterfaceBuilder.CocoaPlugin 3355 | com.apple.InterfaceBuilder.CocoaPlugin 3356 | com.apple.InterfaceBuilder.CocoaPlugin 3357 | com.apple.InterfaceBuilder.CocoaPlugin 3358 | com.apple.InterfaceBuilder.CocoaPlugin 3359 | com.apple.InterfaceBuilder.CocoaPlugin 3360 | com.apple.InterfaceBuilder.CocoaPlugin 3361 | com.apple.InterfaceBuilder.CocoaPlugin 3362 | com.apple.InterfaceBuilder.CocoaPlugin 3363 | com.apple.InterfaceBuilder.CocoaPlugin 3364 | com.apple.InterfaceBuilder.CocoaPlugin 3365 | com.apple.InterfaceBuilder.CocoaPlugin 3366 | com.apple.InterfaceBuilder.CocoaPlugin 3367 | com.apple.InterfaceBuilder.CocoaPlugin 3368 | com.apple.InterfaceBuilder.CocoaPlugin 3369 | com.apple.InterfaceBuilder.CocoaPlugin 3370 | com.apple.InterfaceBuilder.CocoaPlugin 3371 | com.apple.InterfaceBuilder.CocoaPlugin 3372 | com.apple.InterfaceBuilder.CocoaPlugin 3373 | com.apple.InterfaceBuilder.CocoaPlugin 3374 | com.apple.InterfaceBuilder.CocoaPlugin 3375 | com.apple.InterfaceBuilder.CocoaPlugin 3376 | 3377 | 3378 | 3379 | 3380 | 3381 | 544 3382 | 3383 | 3384 | 3385 | 3386 | EQSTRAppDelegate 3387 | NSObject 3388 | 3389 | stopRefreshing: 3390 | NSButton 3391 | 3392 | 3393 | stopRefreshing: 3394 | 3395 | stopRefreshing: 3396 | NSButton 3397 | 3398 | 3399 | 3400 | window 3401 | NSWindow 3402 | 3403 | 3404 | window 3405 | 3406 | window 3407 | NSWindow 3408 | 3409 | 3410 | 3411 | IBProjectSource 3412 | ./Classes/EQSTRAppDelegate.h 3413 | 3414 | 3415 | 3416 | EQSTRScrollView 3417 | NSScrollView 3418 | 3419 | IBProjectSource 3420 | ./Classes/EQSTRScrollView.h 3421 | 3422 | 3423 | 3424 | NSDocument 3425 | 3426 | id 3427 | id 3428 | id 3429 | id 3430 | id 3431 | id 3432 | 3433 | 3434 | 3435 | printDocument: 3436 | id 3437 | 3438 | 3439 | revertDocumentToSaved: 3440 | id 3441 | 3442 | 3443 | runPageLayout: 3444 | id 3445 | 3446 | 3447 | saveDocument: 3448 | id 3449 | 3450 | 3451 | saveDocumentAs: 3452 | id 3453 | 3454 | 3455 | saveDocumentTo: 3456 | id 3457 | 3458 | 3459 | 3460 | IBProjectSource 3461 | ./Classes/NSDocument.h 3462 | 3463 | 3464 | 3465 | 3466 | 0 3467 | IBCocoaFramework 3468 | YES 3469 | 3 3470 | 3471 | {128, 128} 3472 | {9, 8} 3473 | {7, 2} 3474 | 3475 | 3476 | 3477 | -------------------------------------------------------------------------------- /ScrollToRefresh/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ScrollToRefresh 4 | // 5 | // Created by Alex Zielenski on 11/15/11. 6 | // Copyright (c) 2011 Alex Zielenski. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **)argv); 14 | } 15 | -------------------------------------------------------------------------------- /ScrollToRefresh/src/EQSTRClipView.h: -------------------------------------------------------------------------------- 1 | // 2 | // EQSTRClipView.h 3 | // ScrollToRefresh 4 | // 5 | // Copyright (C) 2011 by Alex Zielenski. 6 | 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | #import 27 | 28 | @interface EQSTRClipView : NSClipView 29 | @end 30 | -------------------------------------------------------------------------------- /ScrollToRefresh/src/EQSTRClipView.m: -------------------------------------------------------------------------------- 1 | // 2 | // EQSTRClipView.m 3 | // ScrollToRefresh 4 | // 5 | // Copyright (C) 2011 by Alex Zielenski. 6 | 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | #import "EQSTRClipView.h" 27 | #import "EQSTRScrollView.h" 28 | 29 | @interface EQSTRScrollView (Private) 30 | - (CGFloat)minimumScroll; 31 | @end 32 | 33 | @interface EQSTRClipView () 34 | - (BOOL)isRefreshing; 35 | - (NSView *)headerView; 36 | - (CGFloat)minimumScroll; 37 | @end 38 | 39 | @implementation EQSTRClipView 40 | - (NSPoint)constrainScrollPoint:(NSPoint)proposedNewOrigin { // this method determines the "elastic" of the scroll view or how high it can scroll without resistence. 41 | NSPoint constrained = [super constrainScrollPoint:proposedNewOrigin]; 42 | CGFloat scrollValue = proposedNewOrigin.y; // this is the y value where the top of the document view is 43 | BOOL over = scrollValue <= self.minimumScroll; 44 | 45 | if (self.isRefreshing && scrollValue <= 0) { // if we are refreshing 46 | if (over) // and if we are scrolled above the refresh view 47 | proposedNewOrigin.y = 0 - self.headerView.frame.size.height; // constrain us to the refresh view 48 | 49 | return NSMakePoint(constrained.x, proposedNewOrigin.y); 50 | } 51 | return constrained; 52 | } 53 | 54 | - (BOOL)isFlipped { 55 | return YES; 56 | } 57 | 58 | - (NSRect)documentRect { //this is to make scrolling feel more normal so that the spinner is within the scrolled area 59 | NSRect sup = [super documentRect]; 60 | if (self.isRefreshing) { 61 | sup.size.height += self.headerView.frame.size.height; 62 | sup.origin.y -= self.headerView.frame.size.height; 63 | } 64 | return sup; 65 | } 66 | 67 | - (BOOL)isRefreshing { 68 | return [(EQSTRScrollView *)self.superview isRefreshing]; 69 | } 70 | 71 | - (NSView *)headerView { 72 | return [(EQSTRScrollView *)self.superview refreshHeader]; 73 | } 74 | 75 | - (CGFloat)minimumScroll { 76 | return [(EQSTRScrollView *)self.superview minimumScroll]; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /ScrollToRefresh/src/EQSTRScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // EQSTRScrollView.h 3 | // ScrollToRefresh 4 | // 5 | // Copyright (C) 2011 by Alex Zielenski. 6 | 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import 26 | 27 | @interface EQSTRScrollView : NSScrollView 28 | @property (readonly) BOOL isRefreshing; 29 | 30 | @property (readonly) NSView *refreshHeader; 31 | @property (readonly) NSProgressIndicator *refreshSpinner; 32 | @property (readonly) NSView *refreshArrow; 33 | 34 | @property (nonatomic, copy) void (^refreshBlock)(EQSTRScrollView *scrollView); 35 | 36 | - (void)startLoading; 37 | - (void)stopLoading; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /ScrollToRefresh/src/EQSTRScrollView.m: -------------------------------------------------------------------------------- 1 | // 2 | // EQSTRScrollView.m 3 | // ScrollToRefresh 4 | // 5 | // Copyright (C) 2011 by Alex Zielenski. 6 | 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "EQSTRScrollView.h" 26 | #import "EQSTRClipView.h" 27 | #import 28 | 29 | #define REFRESH_HEADER_HEIGHT 60.0f 30 | 31 | // code modeled from https://github.com/leah/PullToRefresh/blob/master/Classes/PullRefreshTableViewController.m 32 | 33 | @interface EQSTRScrollView () 34 | @property (nonatomic, assign) BOOL _overRefreshView; 35 | @property (nonatomic, retain) CALayer *_arrowLayer; 36 | - (BOOL)overRefreshView; 37 | - (void)createHeaderView; 38 | - (void)viewBoundsChanged:(NSNotification*)note; 39 | 40 | - (CGFloat)minimumScroll; 41 | 42 | @end 43 | 44 | @implementation EQSTRScrollView 45 | 46 | #pragma mark - Private Properties 47 | 48 | @synthesize _overRefreshView; 49 | @synthesize _arrowLayer; 50 | 51 | #pragma mark - Public Properties 52 | 53 | @synthesize isRefreshing = _isRefreshing; 54 | @synthesize refreshHeader = _refreshHeader; 55 | @synthesize refreshSpinner = _refreshSpinner; 56 | @synthesize refreshArrow = _refreshArrow; 57 | @synthesize refreshBlock = _refreshBlock; 58 | 59 | #pragma mark - Dealloc 60 | - (void)dealloc { 61 | self.refreshBlock = nil; 62 | self._arrowLayer = nil; 63 | [super dealloc]; 64 | } 65 | 66 | #pragma mark - Create Header View 67 | 68 | - (void)viewDidMoveToWindow { 69 | [self createHeaderView]; 70 | } 71 | 72 | - (NSClipView *)contentView { 73 | NSClipView *superClipView = [super contentView]; 74 | if (![superClipView isKindOfClass:[EQSTRClipView class]]) { 75 | 76 | // create new clipview 77 | NSView *documentView = superClipView.documentView; 78 | 79 | EQSTRClipView *clipView = [[EQSTRClipView alloc] initWithFrame:superClipView.frame]; 80 | clipView.documentView = documentView; 81 | clipView.copiesOnScroll = NO; 82 | clipView.drawsBackground = NO; 83 | 84 | [self setContentView:clipView]; 85 | [clipView release]; 86 | 87 | superClipView = [super contentView]; 88 | 89 | } 90 | return superClipView; 91 | } 92 | 93 | - (void)createHeaderView { 94 | // delete old stuff if any 95 | if (self.refreshHeader) { 96 | [_refreshHeader removeFromSuperview]; 97 | [_refreshHeader release]; 98 | _refreshHeader = nil; 99 | } 100 | 101 | [self setVerticalScrollElasticity:NSScrollElasticityAllowed]; 102 | 103 | (void)self.contentView; // create new content view 104 | 105 | [self.contentView setPostsFrameChangedNotifications:YES]; 106 | [self.contentView setPostsBoundsChangedNotifications:YES]; 107 | 108 | [[NSNotificationCenter defaultCenter] addObserver:self 109 | selector:@selector(viewBoundsChanged:) 110 | name:NSViewBoundsDidChangeNotification 111 | object:self.contentView]; 112 | 113 | // add header view to clipview 114 | NSRect contentRect = [self.contentView.documentView frame]; 115 | _refreshHeader = [[NSView alloc] initWithFrame:NSMakeRect(0, 116 | 0 - REFRESH_HEADER_HEIGHT, 117 | contentRect.size.width, 118 | REFRESH_HEADER_HEIGHT)]; 119 | 120 | // Create Arrow 121 | NSImage *arrowImage = [NSImage imageNamed:@"arrow"]; 122 | _refreshArrow = [[NSView alloc] initWithFrame:NSMakeRect(floor(NSMidX(self.refreshHeader.bounds) - arrowImage.size.width / 2), 123 | floor(NSMidY(self.refreshHeader.bounds) - arrowImage.size.height / 2), 124 | arrowImage.size.width, 125 | arrowImage.size.height)]; 126 | self.refreshArrow.wantsLayer = YES; 127 | 128 | self._arrowLayer = [CALayer layer]; 129 | self._arrowLayer.contents = (id)[arrowImage CGImageForProposedRect:NULL 130 | context:nil 131 | hints:nil]; 132 | 133 | self._arrowLayer.frame = NSRectToCGRect(_refreshArrow.bounds); 134 | _refreshArrow.layer.frame = NSRectToCGRect(_refreshArrow.bounds); 135 | 136 | [self.refreshArrow.layer addSublayer:self._arrowLayer]; 137 | 138 | // Create spinner 139 | _refreshSpinner = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(floor(NSMidX(self.refreshHeader.bounds) - 30), 140 | floor(NSMidY(self.refreshHeader.bounds) - 20), 141 | 60.0f, 142 | 40.0f)]; 143 | self.refreshSpinner.style = NSProgressIndicatorSpinningStyle; 144 | self.refreshSpinner.displayedWhenStopped = NO; 145 | self.refreshSpinner.usesThreadedAnimation = YES; 146 | self.refreshSpinner.indeterminate = YES; 147 | self.refreshSpinner.bezeled = NO; 148 | [self.refreshSpinner sizeToFit]; 149 | 150 | // Center the spinner in the header 151 | [self.refreshSpinner setFrame:NSMakeRect(floor(NSMidX(self.refreshHeader.bounds) - self.refreshSpinner.frame.size.width / 2), 152 | floor(NSMidY(self.refreshHeader.bounds) - self.refreshSpinner.frame.size.height / 2), 153 | self.refreshSpinner.frame.size.width, 154 | self.refreshSpinner.frame.size.height)]; 155 | 156 | // set autoresizing masks 157 | self.refreshSpinner.autoresizingMask = NSViewMinXMargin | NSViewMaxXMargin | NSViewMinYMargin | NSViewMaxYMargin; // center 158 | self.refreshArrow.autoresizingMask = NSViewMinXMargin | NSViewMaxXMargin | NSViewMinYMargin | NSViewMaxYMargin; // center 159 | self.refreshHeader.autoresizingMask = NSViewWidthSizable | NSViewMinXMargin | NSViewMaxXMargin; // stretch/center 160 | 161 | // Put everything in place 162 | [self.refreshHeader addSubview:self.refreshArrow]; 163 | [self.refreshHeader addSubview:self.refreshSpinner]; 164 | 165 | [self.contentView addSubview:self.refreshHeader]; 166 | 167 | [_refreshArrow release]; 168 | [_refreshSpinner release]; 169 | 170 | // Scroll to top 171 | [self.contentView scrollToPoint:NSMakePoint(contentRect.origin.x, 0)]; 172 | [self reflectScrolledClipView:self.contentView]; 173 | } 174 | 175 | #pragma mark - Detecting Scroll 176 | 177 | - (void)scrollWheel:(NSEvent *)event { 178 | if (event.phase == NSEventPhaseEnded) { 179 | if (self._overRefreshView && ! self.isRefreshing) { 180 | [self startLoading]; 181 | } 182 | } 183 | 184 | [super scrollWheel:event]; 185 | } 186 | 187 | - (void)viewBoundsChanged:(NSNotification *)note { 188 | if (self.isRefreshing) 189 | return; 190 | 191 | BOOL start = [self overRefreshView]; 192 | if (start) { 193 | 194 | // point arrow up 195 | self._arrowLayer.transform = CATransform3DMakeRotation(M_PI, 0, 0, 1); 196 | self._overRefreshView = YES; 197 | 198 | } else { 199 | 200 | // point arrow down 201 | self._arrowLayer.transform = CATransform3DMakeRotation(M_PI * 2, 0, 0, 1); 202 | self._overRefreshView = NO; 203 | 204 | } 205 | 206 | } 207 | 208 | - (BOOL)overRefreshView { 209 | NSClipView *clipView = self.contentView; 210 | NSRect bounds = clipView.bounds; 211 | 212 | CGFloat scrollValue = bounds.origin.y; 213 | CGFloat minimumScroll = self.minimumScroll; 214 | 215 | return (scrollValue <= minimumScroll); 216 | } 217 | 218 | - (CGFloat)minimumScroll { 219 | return 0 - self.refreshHeader.frame.size.height; 220 | } 221 | 222 | #pragma mark - Refresh 223 | 224 | - (void)startLoading { 225 | [self willChangeValueForKey:@"isRefreshing"]; 226 | _isRefreshing = YES; 227 | [self didChangeValueForKey:@"isRefreshing"]; 228 | 229 | self.refreshArrow.hidden = YES; 230 | [self.refreshSpinner startAnimation:self]; 231 | 232 | if (self.refreshBlock) { 233 | self.refreshBlock(self); 234 | } 235 | } 236 | 237 | - (void)stopLoading { 238 | self.refreshArrow.hidden = NO; 239 | 240 | [self.refreshArrow layer].transform = CATransform3DMakeRotation(M_PI * 2, 0, 0, 1); 241 | [self.refreshSpinner stopAnimation:self]; 242 | 243 | // now fake an event of scrolling for a natural look 244 | 245 | [self willChangeValueForKey:@"isRefreshing"]; 246 | _isRefreshing = NO; 247 | [self didChangeValueForKey:@"isRefreshing"]; 248 | 249 | CGEventRef cgEvent = CGEventCreateScrollWheelEvent(NULL, 250 | kCGScrollEventUnitLine, 251 | 2, 252 | 1, 253 | 0); 254 | 255 | NSEvent *scrollEvent = [NSEvent eventWithCGEvent:cgEvent]; 256 | [self scrollWheel:scrollEvent]; 257 | CFRelease(cgEvent); 258 | } 259 | 260 | @end 261 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexzielenski/ScrollToRefresh/ed46bf36cf80a2f3ae156f9704389bade4a46c18/screenshot.png --------------------------------------------------------------------------------