Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Jul 26, 2013
0 parents commit 8a1d515
Show file tree
Hide file tree
Showing 17 changed files with 842 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
13 changes: 13 additions & 0 deletions Example/Classes/SAMAppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// SAMAppDelegate.h
// SAMLoadingView
//
// Created by Sam Soffes on 7/25/13.
// Copyright (c) 2013 Sam Soffes. All rights reserved.
//

@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
// SAMLoadingView
//
// Created by Sam Soffes on 7/25/13.
// Copyright (c) 2013 Sam Soffes. All rights reserved.
//

#import "SAMAppDelegate.h"
#import "SAMRootViewController.h"

@implementation SAMAppDelegate

@synthesize window = _window;

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

SAMRootViewController *viewController = [[SAMRootViewController alloc] init];
self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:viewController];

self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}

@end
10 changes: 10 additions & 0 deletions Example/Classes/SAMRootViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// SAMRootViewController.h
// SAMLoadingView
//
// Created by Sam Soffes on 7/25/13.
// Copyright (c) 2013 Sam Soffes. All rights reserved.
//

@interface SAMRootViewController : UIViewController
@end
24 changes: 24 additions & 0 deletions Example/Classes/SAMRootViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// SAMRootViewController.m
// SAMLoadingView
//
// Created by Sam Soffes on 7/25/13.
// Copyright (c) 2013 Sam Soffes. All rights reserved.
//

#import "SAMRootViewController.h"
#import "SAMLoadingView.h"

@implementation SAMRootViewController

- (void)viewDidLoad {
[super viewDidLoad];

self.title = @"Loading View";

SAMLoadingView *loadingView = [[SAMLoadingView alloc] initWithFrame:self.view.bounds];
loadingView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:loadingView];
}

@end
14 changes: 14 additions & 0 deletions Example/Other Sources/SAMLoadingView-Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Prefix header for all source files of the 'SAMLoadingView' target in the 'SAMLoadingView' 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
// SAMLoadingView
//
// Created by Sam Soffes on 7/25/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/Default-568h@2x.png
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/SAMLoadingView-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) 2009-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.
25 changes: 25 additions & 0 deletions Readme.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SAMLoadingView

Simple loading view for UIKit.

SAMLoadingView is tested on iOS 6 and requires ARC. Released under the [MIT license](LICENSE).

## Example

![Loading View](http://soff.me/QVLy/iOS%20Simulator%20Screen%20shot%20Jul%2025,%202013,%2011.20.38%20PM.png)

Open up the included Xcode project for an example app.

## Usage

``` objc
SAMLoadingView *loadingView = [[SAMLoadingView alloc] initWithFrame:self.view.bounds];
loadingView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:loadingView];
```
See the [header](SAMLoadingView/SAMLoadingView.h) for full documentation.
## Installation
Simply add the files in the `SAMLoadingView.h` and `SAMLoadingView.m` to your project or add `SAMLoadingView` to your Podfile if you're using CocoaPods.
14 changes: 14 additions & 0 deletions SAMLoadingView.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Pod::Spec.new do |spec|
spec.name = 'SAMLoadingView'
spec.version = '0.1.0'
spec.authors = {'Sam Soffes' => 'sam@soff.es'}
spec.homepage = 'https://github.com/soffes/SAMLoadingView'
spec.summary = 'Simple loading view for UIKit.'
spec.source = {:git => 'https://github.com/soffes/SAMLoadingView.git', :tag => "v#{spec.version}"}
spec.license = { :type => 'MIT', :file => 'LICENSE' }

spec.platform = :ios, '6.0'
spec.requires_arc = true
spec.frameworks = 'UIKit', 'CoreGraphics'
spec.source_files = 'SAMLoadingView'
end
Loading

0 comments on commit 8a1d515

Please sign in to comment.