Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Jul 17, 2013
0 parents commit 2508aaa
Show file tree
Hide file tree
Showing 53 changed files with 3,597 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.mode1v3
*.pbxuser
*.perspectivev3
*.xcworkspace
xcuserdata
15 changes: 15 additions & 0 deletions Example/Classes/SAMAppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// SAMAppDelegate.h
// SAMCategories
//
// Created by Sam Soffes on 7/17/13.
// Copyright (c) 2013 Sam Soffes. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SAMAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end
27 changes: 27 additions & 0 deletions Example/Classes/SAMAppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// SAMAppDelegate.m
// SAMCategories
//
// Created by Sam Soffes on 7/17/13.
// Copyright (c) 2013 Sam Soffes. All rights reserved.
//

#import "SAMAppDelegate.h"
#import "NSArray+SAMAdditions.h"

@implementation SAMAppDelegate

@synthesize window = _window;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];

NSArray *message = @[@"Nothing", @"to", @"see", @"here"];
NSLog(@"%@", [message sam_shuffledArray]);

return YES;
}

@end
14 changes: 14 additions & 0 deletions Example/Other Sources/SAMCategories-Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Prefix header for all source files of the 'SAMCategories' target in the 'SAMCategories' project
//

#import <Availability.h>

#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif

#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
18 changes: 18 additions & 0 deletions Example/Other Sources/main.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// main.m
// SAMCategories
//
// Created by Sam Soffes on 7/17/13.
// Copyright (c) 2013 Sam Soffes. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "SAMAppDelegate.h"

int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([SAMAppDelegate class]));
}
}
Binary file added Example/Resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions Example/Resources/SAMCategories-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.samsoffes.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2008-2013 Sam Soffes, http://soff.es

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 changes: 9 additions & 0 deletions Readme.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SAMCategories

A collection of useful [Foundation](SAMCategories/Foundation) and [UIKit](SAMCategories/UIKit) categories.

SAMCategories are tested on iOS 6 and Mac OS 10.8 and requires ARC. The will probably work on lower deployment targets though. Released under the [MIT license](LICENSE).

## Installation

Simply add the files in the `SAMCategories/Foundation` and/or `SAMCategories/UIKit` to your project. You can also add `SAMCategories` to your Podfile if you're using CocoaPods.
17 changes: 17 additions & 0 deletions SAMCategories.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Pod::Spec.new do |spec|
spec.name = 'SAMCategories'
spec.version = '0.1.0'
spec.authors = {'Sam Soffes' => '[email protected]'}
spec.homepage = 'https://github.com/soffes/SAMCategories'
spec.summary = 'Foundation and UIKit categories.'
spec.source = {:git => 'https://github.com/soffes/SAMCategories.git', :tag => "v#{spec.version}"}
spec.license = { :type => 'MIT', :file => 'LICENSE' }

spec.requires_arc = true
spec.frameworks = 'Foundation', 'CommonCrypto'

spec.ios.frameworks = 'UIKit', 'CoreGraphics'
spec.ios.source_files = 'SAMCategories/**/*.{h,m}'

spec.osx.source_files = 'SAMCategories/Mac/*.{h,m}'
end
Loading

0 comments on commit 2508aaa

Please sign in to comment.