Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PSSoundEffect, PSShadowedTableViewController. Documentation updates.

  • Loading branch information...
commit d79a4381f6f603ee5e1f84ebda1743b027179e15 1 parent 80c4298
@zwaldowski zwaldowski authored
View
3  PSFoundation UIKit/PSFoundation-UIKit.h
@@ -24,6 +24,7 @@
#import "PSGenericCell.h"
#import "PSGenericView.h"
#import "PSShadowView.h"
+#import "PSShadowedTableView.h"
#import "PSGradientView.h"
#import "PSTableViewController.h"
#import "DTCustomColoredAccessory.h"
@@ -35,7 +36,7 @@
#import "PSSettingsUtil.h"
#import "PSStatusBarSaver.h"
-#import "SoundEffect.h"
+#import "PSSoundEffect.h"
// InterfaceBuilder
#import "BSUIViewRearranger.h"
View
46 PSFoundation UIKit/Sound/PSSoundEffect.h
@@ -0,0 +1,46 @@
+//
+// PSSoundEffect.h
+// PSFoundation
+//
+
+/** Abstracts the AudioToolbox API for playing sound effects.
+
+ You can use PSSoundEffect to play short (30 seconds or shorter) sounds
+ one at a time to provide audible alerts with vibration on supported
+ devices.
+
+ Includes code by the following:
+
+ - Apple, Inc - 2008. Apple Sample License.
+ - [Zach Waldowski](https://github.com/zwaldowski) - 2011. MIT.
+
+ */
+@interface PSSoundEffect : NSObject {
+ NSTimeInterval length;
+ UInt32 soundID;
+}
+
+/** Creates and raturns a sound effect for the sound at the given path.
+
+ @param path A path to a supported sound file type.
+ @return Newly initialized sound effect with the specified properties.
+ */
+- (id)initWithContentsOfFile:(NSString *)path;
+
+/** Plays the sound effect once. */
+- (void)play;
+
+/** A convenience method that creates a sound effect object,
+ plays a sound, and deallocates once the sound finishes playing.
+
+ @param path A path to a supported sound file type.
+ */
++ (void)playSoundEffectWithContentsOfFile:(NSString *)path;
+
+/** A convenience method that plays a system sound as
+ well as a slight vibration on supported iOS devices.
+ */
++ (void)vibrate;
+
+@end
+
View
45 PSFoundation UIKit/Sound/SoundEffect.m → PSFoundation UIKit/Sound/PSSoundEffect.m
@@ -1,20 +1,15 @@
//
-// SoundEffect.m
-// PSFoundation
-//
-// Copyright 2008 Apple Inc. All rights reserved.
-// Licensed under the Apple Sample License.
+// PSSoundEffect.m
+// PSFoundation
//
-#import "SoundEffect.h"
+#import "PSSoundEffect.h"
+#import <AudioToolbox/AudioToolbox.h>
#import "NSObject+BlocksKit.h"
-#import "NSObject+Utilities.h"
-
-@implementation SoundEffect
+#import "NSString+PSFoundation.h"
+#import "NSURL+PSFoundation.h"
-+ (id)soundEffectWithContentsOfFile:(NSString *)aPath {
- return [[[SoundEffect alloc] initWithContentsOfFile:aPath] autorelease];
-}
+@implementation PSSoundEffect
- (id)initWithContentsOfFile:(NSString *)path {
if (path.empty)
@@ -22,8 +17,17 @@ - (id)initWithContentsOfFile:(NSString *)path {
NSURL *aFileURL = [NSURL fileURLWithPath:path isDirectory:NO];
- if (aFileURL.empty)
+ AudioFileID fileID;
+ AudioFileOpenURL((CFURLRef)aFileURL, kAudioFileReadPermission, 0, &fileID);
+ NSTimeInterval seconds;
+ UInt32 propertySize = sizeof(seconds);
+ AudioFileGetProperty(fileID, kAudioFilePropertyEstimatedDuration, &propertySize, &seconds);
+ AudioFileClose(fileID);
+
+ if (seconds > 30) {
+ DDLogError(@"Sound too long at path: %@", path);
return nil;
+ }
SystemSoundID aSoundID;
OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)aFileURL, &aSoundID);
@@ -33,13 +37,6 @@ - (id)initWithContentsOfFile:(NSString *)path {
return nil;
}
- AudioFileID fileID;
- AudioFileOpenURL((CFURLRef)aFileURL, kAudioFileReadPermission, 0, &fileID);
- NSTimeInterval seconds;
- UInt32 propertySize = sizeof(seconds);
- AudioFileGetProperty(fileID, kAudioFilePropertyEstimatedDuration, &propertySize, &seconds);
- AudioFileClose(fileID);
-
if ((self = [super init])) {
soundID = aSoundID;
length = seconds + 0.2;
@@ -58,17 +55,13 @@ - (void)play {
AudioServicesPlaySystemSound(soundID);
}
-static void SoundEffectAutoDestruction(SystemSoundID soundID, void *userInfo) {
- AudioServicesDisposeSystemSoundID(soundID);
-}
-
+ (void)playSoundEffectWithContentsOfFile:(NSString *)path {
if (path.empty)
return;
- SoundEffect *instance = [SoundEffect soundEffectWithContentsOfFile:path];
- AudioServicesAddSystemSoundCompletion(instance->soundID, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode, SoundEffectAutoDestruction, NULL);
+ PSSoundEffect *instance = [[PSSoundEffect alloc] initWithContentsOfFile:path];
[instance play];
+ [instance release];
}
+ (void)vibrate {
View
24 PSFoundation UIKit/Sound/SoundEffect.h
@@ -1,24 +0,0 @@
-//
-// SoundEffect.h
-// PSFoundation
-//
-// Copyright 2008 Apple Inc. All rights reserved.
-// Licensed under the Apple Sample License.
-//
-
-#import <AudioToolbox/AudioToolbox.h>
-
-@interface SoundEffect : NSObject {
- NSTimeInterval length;
- SystemSoundID soundID;
-}
-
-+ (id)soundEffectWithContentsOfFile:(NSString *)aPath;
-- (id)initWithContentsOfFile:(NSString *)path;
-- (void)play;
-
-+ (void)playSoundEffectWithContentsOfFile:(NSString *)path;
-+ (void)vibrate;
-
-@end
-
View
14 PSFoundation UIKit/Table View/PSShadowedTableView.h
@@ -0,0 +1,14 @@
+//
+// PSShadowedTableView.h
+// PSFoundation
+//
+// Created by Matt Gallagher on 21 Aug. 2009.
+// Licensed in the public domain. All rights reserved.
+// http://cocoawithlove.com/2009/08/adding-shadow-effects-to-uitableview.html
+//
+
+@class CAGradientLayer;
+
+@interface PSShadowedTableView : UITableView
+
+@end
View
20 PSFoundation UIKit/Table View/ShadowedTableView.m → PSFoundation UIKit/Table View/PSShadowedTableView.m
@@ -1,21 +1,23 @@
//
-// ShadowedTableView.m
-// ShadowedTableView
-//
-// Created by Matt Gallagher on 2009/08/21.
-// Copyright 2009 Matt Gallagher. All rights reserved.
-//
-// http://cocoawithlove.com/2009/08/adding-shadow-effects-to-uitableview.html
+// PSShadowedTableView.m
+// PSFoundation
//
-#import "ShadowedTableView.h"
+#import "PSShadowedTableView.h"
+#import <QuartzCore/QuartzCore.h>
#import "PSShadowView.h"
#define SHADOW_HEIGHT 20.0
#define SHADOW_INVERSE_HEIGHT 10.0
#define SHADOW_RATIO (SHADOW_INVERSE_HEIGHT / SHADOW_HEIGHT)
-@implementation ShadowedTableView
+@interface PSShadowedTableView ()
+@property (nonatomic, retain) CAGradientLayer *originShadow;
+@property (nonatomic, retain) CAGradientLayer *topShadow;
+@property (nonatomic, retain) CAGradientLayer *bottomShadow;
+@end
+
+@implementation PSShadowedTableView
@synthesize originShadow, topShadow, bottomShadow;
View
4 PSFoundation UIKit/Table View/PSTableViewController.m
@@ -10,7 +10,7 @@
//
#import "PSTableViewController.h"
-#import "ShadowedTableView.h"
+#import "PSShadowedTableView.h"
@interface PSTableViewController ()
- (void)keyboardChanged:(NSNotification *)notification up:(BOOL)up;
@@ -109,7 +109,7 @@ - (UITableView *)createTableView {
UITableView *newTableView = nil;
if (useShadows)
- newTableView = [[ShadowedTableView alloc] initWithFrame:CGRectZero style:self.tableViewStyle];
+ newTableView = [[PSShadowedTableView alloc] initWithFrame:CGRectZero style:self.tableViewStyle];
else
newTableView = [[UITableView alloc] initWithFrame:CGRectZero style:self.tableViewStyle];
View
18 PSFoundation UIKit/Table View/ShadowedTableView.h
@@ -1,18 +0,0 @@
-//
-// ShadowedTableView.h
-// ShadowedTableView
-//
-// Created by Matt Gallagher on 2009/08/21.
-// Copyright 2009 Matt Gallagher. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import <QuartzCore/QuartzCore.h>
-
-@interface ShadowedTableView : UITableView
-
-@property (nonatomic, retain) CAGradientLayer *originShadow;
-@property (nonatomic, retain) CAGradientLayer *topShadow;
-@property (nonatomic, retain) CAGradientLayer *bottomShadow;
-
-@end
View
2  PSFoundation UIKit/Utilities/PSNonEditableTextView.h
@@ -6,8 +6,6 @@
// Copyright 2010 Peter Steinberger. All rights reserved.
//
-#define PSNonEdiableTextView PSNonEditableTextView
-
@interface PSNonEditableTextView : UITextView {
}
View
32 PSFoundation.xcodeproj/project.pbxproj
@@ -370,8 +370,8 @@
6C5D6CDD13C64E8300CBDA8B /* BSUIViewRearranger.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C1813C64E8200CBDA8B /* BSUIViewRearranger.m */; };
6C5D6CDE13C64E8300CBDA8B /* UIView+CWNibLocalizations.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C1913C64E8200CBDA8B /* UIView+CWNibLocalizations.h */; settings = {ATTRIBUTES = (Public, ); }; };
6C5D6CDF13C64E8300CBDA8B /* UIView+CWNibLocalizations.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C1A13C64E8200CBDA8B /* UIView+CWNibLocalizations.m */; };
- 6C5D6CE213C64E8300CBDA8B /* SoundEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C1F13C64E8200CBDA8B /* SoundEffect.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 6C5D6CE313C64E8300CBDA8B /* SoundEffect.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C2013C64E8200CBDA8B /* SoundEffect.m */; };
+ 6C5D6CE213C64E8300CBDA8B /* PSSoundEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C1F13C64E8200CBDA8B /* PSSoundEffect.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 6C5D6CE313C64E8300CBDA8B /* PSSoundEffect.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C2013C64E8200CBDA8B /* PSSoundEffect.m */; };
6C5D6CE413C64E8300CBDA8B /* DTCustomColoredAccessory.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C2213C64E8200CBDA8B /* DTCustomColoredAccessory.h */; settings = {ATTRIBUTES = (Public, ); }; };
6C5D6CE513C64E8300CBDA8B /* DTCustomColoredAccessory.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C2313C64E8200CBDA8B /* DTCustomColoredAccessory.m */; };
6C5D6CE613C64E8300CBDA8B /* PSGradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C2413C64E8200CBDA8B /* PSGradientView.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -384,8 +384,8 @@
6C5D6CED13C64E8300CBDA8B /* PSShadowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C2B13C64E8200CBDA8B /* PSShadowView.m */; };
6C5D6CEE13C64E8300CBDA8B /* PSTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C2C13C64E8200CBDA8B /* PSTableViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
6C5D6CEF13C64E8300CBDA8B /* PSTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C2D13C64E8200CBDA8B /* PSTableViewController.m */; };
- 6C5D6CF013C64E8300CBDA8B /* ShadowedTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C2E13C64E8200CBDA8B /* ShadowedTableView.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 6C5D6CF113C64E8300CBDA8B /* ShadowedTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C2F13C64E8200CBDA8B /* ShadowedTableView.m */; };
+ 6C5D6CF013C64E8300CBDA8B /* PSShadowedTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C2E13C64E8200CBDA8B /* PSShadowedTableView.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 6C5D6CF113C64E8300CBDA8B /* PSShadowedTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C2F13C64E8200CBDA8B /* PSShadowedTableView.m */; };
6C5D6CF213C64E8300CBDA8B /* UACellBackgroundView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C3013C64E8200CBDA8B /* UACellBackgroundView.h */; settings = {ATTRIBUTES = (Public, ); }; };
6C5D6CF313C64E8300CBDA8B /* UACellBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C5D6C3113C64E8200CBDA8B /* UACellBackgroundView.m */; };
6C5D6CF613C64E8300CBDA8B /* GradientButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5D6C3613C64E8200CBDA8B /* GradientButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -629,8 +629,8 @@
6C5D6C1813C64E8200CBDA8B /* BSUIViewRearranger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSUIViewRearranger.m; sourceTree = "<group>"; };
6C5D6C1913C64E8200CBDA8B /* UIView+CWNibLocalizations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+CWNibLocalizations.h"; sourceTree = "<group>"; };
6C5D6C1A13C64E8200CBDA8B /* UIView+CWNibLocalizations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+CWNibLocalizations.m"; sourceTree = "<group>"; };
- 6C5D6C1F13C64E8200CBDA8B /* SoundEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundEffect.h; sourceTree = "<group>"; };
- 6C5D6C2013C64E8200CBDA8B /* SoundEffect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SoundEffect.m; sourceTree = "<group>"; };
+ 6C5D6C1F13C64E8200CBDA8B /* PSSoundEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSSoundEffect.h; sourceTree = "<group>"; };
+ 6C5D6C2013C64E8200CBDA8B /* PSSoundEffect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSSoundEffect.m; sourceTree = "<group>"; };
6C5D6C2213C64E8200CBDA8B /* DTCustomColoredAccessory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DTCustomColoredAccessory.h; sourceTree = "<group>"; };
6C5D6C2313C64E8200CBDA8B /* DTCustomColoredAccessory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DTCustomColoredAccessory.m; sourceTree = "<group>"; };
6C5D6C2413C64E8200CBDA8B /* PSGradientView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSGradientView.h; sourceTree = "<group>"; };
@@ -643,8 +643,8 @@
6C5D6C2B13C64E8200CBDA8B /* PSShadowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSShadowView.m; sourceTree = "<group>"; };
6C5D6C2C13C64E8200CBDA8B /* PSTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSTableViewController.h; sourceTree = "<group>"; };
6C5D6C2D13C64E8200CBDA8B /* PSTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSTableViewController.m; sourceTree = "<group>"; };
- 6C5D6C2E13C64E8200CBDA8B /* ShadowedTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadowedTableView.h; sourceTree = "<group>"; };
- 6C5D6C2F13C64E8200CBDA8B /* ShadowedTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShadowedTableView.m; sourceTree = "<group>"; };
+ 6C5D6C2E13C64E8200CBDA8B /* PSShadowedTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSShadowedTableView.h; sourceTree = "<group>"; };
+ 6C5D6C2F13C64E8200CBDA8B /* PSShadowedTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSShadowedTableView.m; sourceTree = "<group>"; };
6C5D6C3013C64E8200CBDA8B /* UACellBackgroundView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UACellBackgroundView.h; sourceTree = "<group>"; };
6C5D6C3113C64E8200CBDA8B /* UACellBackgroundView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UACellBackgroundView.m; sourceTree = "<group>"; };
6C5D6C3613C64E8200CBDA8B /* GradientButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GradientButton.h; sourceTree = "<group>"; };
@@ -1146,8 +1146,8 @@
6C5D6C1E13C64E8200CBDA8B /* Sound */ = {
isa = PBXGroup;
children = (
- 6C5D6C1F13C64E8200CBDA8B /* SoundEffect.h */,
- 6C5D6C2013C64E8200CBDA8B /* SoundEffect.m */,
+ 6C5D6C1F13C64E8200CBDA8B /* PSSoundEffect.h */,
+ 6C5D6C2013C64E8200CBDA8B /* PSSoundEffect.m */,
);
path = Sound;
sourceTree = "<group>";
@@ -1167,8 +1167,8 @@
6C5D6C2B13C64E8200CBDA8B /* PSShadowView.m */,
6C5D6C2C13C64E8200CBDA8B /* PSTableViewController.h */,
6C5D6C2D13C64E8200CBDA8B /* PSTableViewController.m */,
- 6C5D6C2E13C64E8200CBDA8B /* ShadowedTableView.h */,
- 6C5D6C2F13C64E8200CBDA8B /* ShadowedTableView.m */,
+ 6C5D6C2E13C64E8200CBDA8B /* PSShadowedTableView.h */,
+ 6C5D6C2F13C64E8200CBDA8B /* PSShadowedTableView.m */,
6C5D6C3013C64E8200CBDA8B /* UACellBackgroundView.h */,
6C5D6C3113C64E8200CBDA8B /* UACellBackgroundView.m */,
);
@@ -1665,14 +1665,14 @@
6C5D6CDA13C64E8300CBDA8B /* CoreGraphics+RoundedRect.h in Headers */,
6C5D6CDC13C64E8300CBDA8B /* BSUIViewRearranger.h in Headers */,
6C5D6CDE13C64E8300CBDA8B /* UIView+CWNibLocalizations.h in Headers */,
- 6C5D6CE213C64E8300CBDA8B /* SoundEffect.h in Headers */,
+ 6C5D6CE213C64E8300CBDA8B /* PSSoundEffect.h in Headers */,
6C5D6CE413C64E8300CBDA8B /* DTCustomColoredAccessory.h in Headers */,
6C5D6CE613C64E8300CBDA8B /* PSGradientView.h in Headers */,
6C5D6CE813C64E8300CBDA8B /* PSGenericCell.h in Headers */,
6C5D6CEA13C64E8300CBDA8B /* PSGenericView.h in Headers */,
6C5D6CEC13C64E8300CBDA8B /* PSShadowView.h in Headers */,
6C5D6CEE13C64E8300CBDA8B /* PSTableViewController.h in Headers */,
- 6C5D6CF013C64E8300CBDA8B /* ShadowedTableView.h in Headers */,
+ 6C5D6CF013C64E8300CBDA8B /* PSShadowedTableView.h in Headers */,
6C5D6CF213C64E8300CBDA8B /* UACellBackgroundView.h in Headers */,
6C5D6CF613C64E8300CBDA8B /* GradientButton.h in Headers */,
6C5D6CF813C64E8300CBDA8B /* LRPopoverManager.h in Headers */,
@@ -2071,14 +2071,14 @@
6C5D6CDB13C64E8300CBDA8B /* CoreGraphics+RoundedRect.m in Sources */,
6C5D6CDD13C64E8300CBDA8B /* BSUIViewRearranger.m in Sources */,
6C5D6CDF13C64E8300CBDA8B /* UIView+CWNibLocalizations.m in Sources */,
- 6C5D6CE313C64E8300CBDA8B /* SoundEffect.m in Sources */,
+ 6C5D6CE313C64E8300CBDA8B /* PSSoundEffect.m in Sources */,
6C5D6CE513C64E8300CBDA8B /* DTCustomColoredAccessory.m in Sources */,
6C5D6CE713C64E8300CBDA8B /* PSGradientView.m in Sources */,
6C5D6CE913C64E8300CBDA8B /* PSGenericCell.m in Sources */,
6C5D6CEB13C64E8300CBDA8B /* PSGenericView.m in Sources */,
6C5D6CED13C64E8300CBDA8B /* PSShadowView.m in Sources */,
6C5D6CEF13C64E8300CBDA8B /* PSTableViewController.m in Sources */,
- 6C5D6CF113C64E8300CBDA8B /* ShadowedTableView.m in Sources */,
+ 6C5D6CF113C64E8300CBDA8B /* PSShadowedTableView.m in Sources */,
6C5D6CF313C64E8300CBDA8B /* UACellBackgroundView.m in Sources */,
6C5D6CF713C64E8300CBDA8B /* GradientButton.m in Sources */,
6C5D6CF913C64E8300CBDA8B /* LRPopoverManager.m in Sources */,
View
3  PSFoundation/Archiving/TPAutoArchiver.m
@@ -33,8 +33,7 @@ + (NSArray *)propertyKeysForClass_:(Class)aClass {
return keys;
}
-+ (void)archiveObject:(id)anObject
- withCoder:(NSCoder *)aCoder {
++ (void)archiveObject:(id)anObject withCoder:(NSCoder *)aCoder {
NSParameterAssert( anObject );
NSParameterAssert( aCoder );
if (!anObject || !aCoder) return; // assertions should be off in debug builds
View
3  PSFoundation/Categories/NSDate+PSFoundation.h
@@ -3,8 +3,6 @@
// PSFoundation
//
-@interface NSDate (PSFoundation)
-
/** A suite of creators and comparators for NSDate.
This category introduces all manner of date initializers,
@@ -25,6 +23,7 @@
- [Zach Waldowski](https://github.com/zwaldowski) - 2011. MIT.
*/
+@interface NSDate (PSFoundation)
/** Creates and raturns an NSDate object with the date and time
values specified by the given date components.
View
4 PSFoundation/Invocation/NSObject+Proxy.m
@@ -98,11 +98,11 @@ - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector {
@implementation NSObject (SDStuff)
- (id) nextRunloopProxy {
- return [[[SDNextRunloopProxy alloc] initWithTarget:self] autorelease];
+ return [[SDNextRunloopProxy alloc] initWithTarget:self];
}
- (id) proxyWithDelay:(float)time {
- return [[[FJSDelayProxy alloc] initWithTarget:self delay:time] autorelease];
+ return [[FJSDelayProxy alloc] initWithTarget:self delay:time];
}
@end
View
4 PSFoundation/Macros/PSMacros.h
@@ -11,8 +11,8 @@
// - http://www.dribin.org/dave/blog/archives/2008/09/22/convert_to_nsstring/
//
-#include "PSMacros+Compatibility.h"
-#include "PSMacros+Collections.h"
+#import "PSMacros+Compatibility.h"
+#import "PSMacros+Collections.h"
#import "NSFileManager+PSFoundation.h"
// compiler help
Please sign in to comment.
Something went wrong with that request. Please try again.