Commit fad4b5ab authored by Fabio Pelosin's avatar Fabio Pelosin

Merge branch 'master' into 0.17

* master:
  Release 0.16.2
  Bump Xcodeproj dependency.
  Update CHANGELOG
  Make specs green.
  Update bundle.
  Run on the new Travis CI mac workers on both system Ruby and 1.9.3-p327.
  Generate Pods target in Mac OS X with the specified deployment target.
  Disable libSystem objects for ARC libs that target older platforms.
  Fix podspec in Podfile with no options.
  Add install note for RVM users about symlinking GCC to LLVM-GCC.
  Removed comments from Mercurial sample podspec used in tests.
  Added support for pre-download over Mercurial.
  Quote storyboard and xib paths

Conflicts:
	CHANGELOG.md
	Gemfile.lock
	cocoapods.gemspec
	examples/AFNetworking Mac Example/Podfile.lock
	examples/AFNetworking iOS Example/Podfile.lock
	examples/MGSplitView/Podfile.lock
	examples/RKTwitter/Podfile.lock
	examples/RKTwitter/RKTwitter.xcodeproj/project.pbxproj
	examples/RelativePathProject/Podfile.lock
	examples/SSCatalog/Podfile.lock
	examples/SSCatalog/SSCatalog.xcodeproj/project.pbxproj
	examples/TargetTest/Podfile.lock
	lib/cocoapods.rb
	lib/cocoapods/dependency.rb
	lib/cocoapods/platform.rb
	lib/cocoapods/podfile.rb
	lib/cocoapods/project.rb
	lib/cocoapods/specification.rb
	spec/fixtures/mercurial-repo/.hg/dirstate
	spec/fixtures/mercurial-repo/.hg/last-message.txt
	spec/fixtures/mercurial-repo/.hg/store/00changelog.i
	spec/fixtures/mercurial-repo/.hg/store/00manifest.i
	spec/fixtures/mercurial-repo/.hg/store/fncache
	spec/fixtures/mercurial-repo/.hg/store/undo
	spec/fixtures/mercurial-repo/.hg/undo.desc
	spec/fixtures/mercurial-repo/.hg/undo.dirstate
	spec/integration_spec.rb
	spec/unit/dependency_spec.rb
	spec/unit/local_pod_spec.rb
	spec/unit/podfile_spec.rb
	spec/unit/specification_spec.rb
parents 3170668d 0be241d8
language: ruby
rvm:
- 1.8.7
- 1.9.3
# Not in Travis non-pro yet
#- 2.0.0
# Rubinius in 1.8 mode on Travis does not work. It complains about st_data_t etc in Xcodeproj.
#- rbx-18mode
- rbx-19mode
matrix:
allow_failures:
- rvm: rbx-19mode
#- rvm: 2.0.0
install: NOEXEC=skip rake travis:setup
script: bundle exec rake spec
language: objective-c
env:
# This is what 10.8.x comes with and we want to support that.
- RVM_RUBY_VERSION=system NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo gem update --system && sudo gem install bundler --no-ri --no-rdoc'
- RVM_RUBY_VERSION=1.9.3 NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 && curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem' SSL_CERT_FILE=/usr/local/share/cacert.pem
before_install: source ~/.rvm/scripts/rvm && rvm use $RVM_RUBY_VERSION
install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap
script: bundle exec rake spec:ci
notifications:
# email: false
campfire:
on_success: change
on_failure: always
......
......@@ -68,6 +68,34 @@
- Added Library class.
- Added XCConfig generator.
## 0.16.2
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.1...0.16.2)[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.4.1...0.4.3)
###### Bug fixes
- Quote storyboard and xib paths in ‘copy resource’ script.
[#740](https://github.com/CocoaPods/CocoaPods/pull/740)
- Fix use of `podspec` directive in Podfile with no options specified.
[#768](https://github.com/CocoaPods/CocoaPods/pull/768)
- Generate Mac OS X Pods target with the specified deployment target.
[#757](https://github.com/CocoaPods/CocoaPods/issues/757)
- Disable libSystem objects for ARC libs that target older platforms.
This applies when the deployment target is set to < iOS 6.0 or OS X 10.8,
or not specified at all.
[#352](https://github.com/CocoaPods/Specs/issues/352)
[#1161](https://github.com/CocoaPods/Specs/pull/1161)
- Mark header source files as ‘Project’ not ‘Public’.
[#747](https://github.com/CocoaPods/CocoaPods/issues/747)
- Add `PBXGroup` as acceptable `PBXFileReference` value.
[#49](https://github.com/CocoaPods/Xcodeproj/pull/49)
- Make `xcodeproj show` without further arguments actually work.
[#45](https://github.com/CocoaPods/Xcodeproj/issues/45)
###### Enhancements
- Added support for pre-download over Mercurial.
[#750](https://github.com/CocoaPods/CocoaPods/pull/750)
## 0.16.1
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.0...0.16.1)[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.4.0...0.4.1)
......
......@@ -45,6 +45,8 @@ Or from `Xcode > Settings > Downloads > Components > Command Line Tools`
2. CocoaPods re-uses some of the RubyGems classes. If you have a version older than 1.4.0, you will have to update RubyGems: `$ gem update --system`.
3. If you use [RVM](https://rvm.io), you might need to create a symbolic link to the LLVM GCC compiler: `$ [sudo] ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2`
## Adding it to your project
......
# Travis support
def on_rvm?
`which ruby`.strip.include?('.rvm')
end
def rvm_ruby_dir
@rvm_ruby_dir ||= File.expand_path('../..', `which ruby`.strip)
end
namespace :travis do
# Used to create the deb package.
#
# Known to work with opencflite rev 248.
task :prepare_deb do
sh "sudo apt-get install subversion libicu-dev"
sh "svn co https://opencflite.svn.sourceforge.net/svnroot/opencflite/trunk opencflite"
sh "cd opencflite && ./configure --target=linux --with-uuid=/usr --with-tz-includes=./include --prefix=/usr/local && make && sudo make install"
sh "sudo /sbin/ldconfig"
end
task :install_opencflite_debs do
sh "mkdir -p debs"
Dir.chdir("debs") do
sh "wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu44_4.4.2-2ubuntu0.11.04.1_i386.deb" unless File.exist?("libicu44_4.4.2-2ubuntu0.11.04.1_i386.deb")
base_url = "https://github.com/downloads/CocoaPods/OpenCFLite"
%w{ opencflite1_248-1_i386.deb opencflite-dev_248-1_i386.deb }.each do |deb|
sh "wget #{File.join(base_url, deb)}" unless File.exist?(deb)
end
sh "sudo dpkg -i *.deb"
end
end
task :install do
sh "git submodule update --init"
sh "sudo apt-get install subversion"
sh "env CFLAGS='-I#{rvm_ruby_dir}/include' bundle install --without debugging documentation"
def execute_command(command)
if ENV['VERBOSE']
sh(command)
else
output = `#{command} 2>&1`
raise output unless $?.success?
end
task :setup => [:install_opencflite_debs, :install]
end
namespace :gem do
......@@ -263,33 +231,35 @@ namespace :examples do
desc "Build all examples"
task :build do
sh "rm -rf ~/Library/Developer/Shared/Documentation/DocSets/org.cocoapods.*"
execute_command "rm -rf ~/Library/Developer/Shared/Documentation/DocSets/org.cocoapods.*"
examples.entries.each do |example|
puts "Building example: #{example}"
puts
Dir.chdir(example.to_s) do
sh "rm -rf Pods DerivedData"
sh "#{'../../bin/' unless ENV['FROM_GEM']}pod install --verbose --no-update"
execute_command "rm -rf Pods DerivedData"
execute_command "#{'../../bin/' unless ENV['FROM_GEM']}pod install --verbose --no-update"
command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'"
if (example + 'Podfile').read.include?('platform :ios')
# Specifically build against the simulator SDK so we don't have to deal with code signing.
command << " -sdk "
command << Dir.glob("#{`xcode-select -print-path`.chomp}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk").last
end
sh command
execute_command(command)
end
puts
end
end
end
desc "Initializes your working copy to run the specs"
task :bootstrap do
puts "Updating submodules..."
`git submodule update --init --recursive`
puts "Updating submodules"
execute_command "git submodule update --init --recursive"
puts "Installing gems"
`bundle install`
execute_command "bundle install"
puts "Installing tools (Homebrew)"
execute_command "brew install appledoc" if `which appledoc`.strip.empty?
execute_command "brew install mercurial" if `which hg`.strip.empty?
end
desc "Run all specs"
......
......@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'cocoapods-core', "= #{Pod::VERSION}"
s.add_runtime_dependency 'claide', '~> 0.1'
s.add_runtime_dependency 'cocoapods-downloader', '~> 0.1'
s.add_runtime_dependency 'xcodeproj', '~> 0.4.1'
s.add_runtime_dependency 'xcodeproj', '~> 0.4.3'
s.add_runtime_dependency 'faraday', '~> 0.8.1'
s.add_runtime_dependency 'octokit', '~> 1.7'
......
PODS:
- AFNetworking (0.7.0):
COCOAPODS: 0.16.1
PODS:
- AFNetworking (0.7.0):
- JSONKit
- FormatterKit (1.0.0):
- FormatterKit (1.0.0):
- FormatterKit/ArrayFormatter (= 1.0.0)
- FormatterKit/LocationFormatter (= 1.0.0)
- FormatterKit/OrdinalNumberFormatter (= 1.0.0)
......@@ -17,19 +19,17 @@ PODS:
- FormatterKit/UnitOfInformationFormatter (1.0.0)
- JSONKit (1.5pre)
DEPENDENCIES:
DEPENDENCIES:
- AFNetworking (~> 0.7.0)
- FormatterKit
SPEC CHECKSUMS:
AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/ArrayFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/LocationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/OrdinalNumberFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
SPEC CHECKSUMS:
FormatterKit/TimeIntervalFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/URLRequestFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/UnitOfInformationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
JSONKit: a01a22c75f27eae76b4badd55a91c20fe6e86477
COCOAPODS: 0.16.0.rc2
FormatterKit/ArrayFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
FormatterKit/LocationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/OrdinalNumberFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
PODS:
- AFNetworking (0.7.0):
PODS:
- AFNetworking (0.7.0):
- JSONKit
- FormatterKit (1.0.0):
- FormatterKit (1.0.0):
- FormatterKit/ArrayFormatter (= 1.0.0)
- FormatterKit/LocationFormatter (= 1.0.0)
- FormatterKit/OrdinalNumberFormatter (= 1.0.0)
......@@ -17,19 +17,19 @@ PODS:
- FormatterKit/UnitOfInformationFormatter (1.0.0)
- JSONKit (1.5pre)
DEPENDENCIES:
- AFNetworking (~> 0.7.0)
- FormatterKit
SPEC CHECKSUMS:
AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c
SPEC CHECKSUMS:
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/ArrayFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/LocationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/UnitOfInformationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/OrdinalNumberFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/TimeIntervalFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/URLRequestFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/UnitOfInformationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
JSONKit: a01a22c75f27eae76b4badd55a91c20fe6e86477
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
FormatterKit/TimeIntervalFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/ArrayFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c
DEPENDENCIES:
- AFNetworking (~> 0.7.0)
- FormatterKit
COCOAPODS: 0.16.0.rc2
COCOAPODS: 0.16.1
*.pbxuser
*.perspectivev3
build
//
// DetailViewController.h
// MGSplitView
//
// Created by Matt Gemmell on 26/07/2010.
// Copyright Instinctive Code 2010.
//
#import <UIKit/UIKit.h>
#import "MGSplitViewController.h"
@interface DetailViewController : UIViewController <UIPopoverControllerDelegate, MGSplitViewControllerDelegate> {
IBOutlet MGSplitViewController *splitController;
IBOutlet UIBarButtonItem *toggleItem;
IBOutlet UIBarButtonItem *verticalItem;
IBOutlet UIBarButtonItem *dividerStyleItem;
IBOutlet UIBarButtonItem *masterBeforeDetailItem;
UIPopoverController *popoverController;
UIToolbar *toolbar;
id detailItem;
UILabel *detailDescriptionLabel;
}
@property (nonatomic, retain) IBOutlet UIToolbar *toolbar;
@property (nonatomic, retain) id detailItem;
@property (nonatomic, retain) IBOutlet UILabel *detailDescriptionLabel;
- (IBAction)toggleMasterView:(id)sender;
- (IBAction)toggleVertical:(id)sender;
- (IBAction)toggleDividerStyle:(id)sender;
- (IBAction)toggleMasterBeforeDetail:(id)sender;
@end
//
// DetailViewController.m
// MGSplitView
//
// Created by Matt Gemmell on 26/07/2010.
// Copyright Instinctive Code 2010.
//
#import "DetailViewController.h"
#import "RootViewController.h"
@interface DetailViewController ()
@property (nonatomic, retain) UIPopoverController *popoverController;
- (void)configureView;
@end
@implementation DetailViewController
@synthesize toolbar, popoverController, detailItem, detailDescriptionLabel;
#pragma mark -
#pragma mark Managing the detail item
// When setting the detail item, update the view and dismiss the popover controller if it's showing.
- (void)setDetailItem:(id)newDetailItem
{
if (detailItem != newDetailItem) {
[detailItem release];
detailItem = [newDetailItem retain];
// Update the view.
[self configureView];
}
if (popoverController != nil) {
[popoverController dismissPopoverAnimated:YES];
}
}
- (void)configureView
{
// Update the user interface for the detail item.
detailDescriptionLabel.text = [detailItem description];
toggleItem.title = ([splitController isShowingMaster]) ? @"Hide Master" : @"Show Master"; // "I... AM... THE MASTER!" Derek Jacobi. Gave me chills.
verticalItem.title = (splitController.vertical) ? @"Horizontal Split" : @"Vertical Split";
dividerStyleItem.title = (splitController.dividerStyle == MGSplitViewDividerStyleThin) ? @"Enable Dragging" : @"Disable Dragging";
masterBeforeDetailItem.title = (splitController.masterBeforeDetail) ? @"Detail First" : @"Master First";
}
#pragma mark -
#pragma mark Split view support
- (void)splitViewController:(MGSplitViewController*)svc
willHideViewController:(UIViewController *)aViewController
withBarButtonItem:(UIBarButtonItem*)barButtonItem
forPopoverController: (UIPopoverController*)pc
{
//NSLog(@"%@", NSStringFromSelector(_cmd));
if (barButtonItem) {
barButtonItem.title = @"Popover";
NSMutableArray *items = [[toolbar items] mutableCopy];
[items insertObject:barButtonItem atIndex:0];
[toolbar setItems:items animated:YES];
[items release];
}
self.popoverController = pc;
}
// Called when the view is shown again in the split view, invalidating the button and popover controller.
- (void)splitViewController:(MGSplitViewController*)svc
willShowViewController:(UIViewController *)aViewController
invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
{
//NSLog(@"%@", NSStringFromSelector(_cmd));
if (barButtonItem) {
NSMutableArray *items = [[toolbar items] mutableCopy];
[items removeObject:barButtonItem];
[toolbar setItems:items animated:YES];
[items release];
}
self.popoverController = nil;
}
- (void)splitViewController:(MGSplitViewController*)svc
popoverController:(UIPopoverController*)pc
willPresentViewController:(UIViewController *)aViewController
{
//NSLog(@"%@", NSStringFromSelector(_cmd));
}
- (void)splitViewController:(MGSplitViewController*)svc willChangeSplitOrientationToVertical:(BOOL)isVertical
{
//NSLog(@"%@", NSStringFromSelector(_cmd));
}
- (void)splitViewController:(MGSplitViewController*)svc willMoveSplitToPosition:(float)position
{
//NSLog(@"%@", NSStringFromSelector(_cmd));
}
- (float)splitViewController:(MGSplitViewController *)svc constrainSplitPosition:(float)proposedPosition splitViewSize:(CGSize)viewSize
{
//NSLog(@"%@", NSStringFromSelector(_cmd));
return proposedPosition;
}
#pragma mark -
#pragma mark Actions
- (IBAction)toggleMasterView:(id)sender
{
[splitController toggleMasterView:sender];
[self configureView];
}
- (IBAction)toggleVertical:(id)sender
{
[splitController toggleSplitOrientation:self];
[self configureView];
}
- (IBAction)toggleDividerStyle:(id)sender
{
MGSplitViewDividerStyle newStyle = ((splitController.dividerStyle == MGSplitViewDividerStyleThin) ? MGSplitViewDividerStylePaneSplitter : MGSplitViewDividerStyleThin);
[splitController setDividerStyle:newStyle animated:YES];
[self configureView];
}
- (IBAction)toggleMasterBeforeDetail:(id)sender
{
[splitController toggleMasterBeforeDetail:sender];
[self configureView];
}
#pragma mark -
#pragma mark Rotation support
// Ensure that the view controller supports rotation and that the split view can therefore show in both portrait and landscape.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[self configureView];
}
- (void)dealloc
{
[popoverController release];
[toolbar release];
[detailItem release];
[detailDescriptionLabel release];
[super dealloc];
}
@end
//
// MGSplitViewAppDelegate.h
// MGSplitView
//
// Created by Matt Gemmell on 26/07/2010.
// Copyright Instinctive Code 2010.
//
#import <UIKit/UIKit.h>
@class RootViewController;
@class DetailViewController;
@class MGSplitViewController;
@interface MGSplitViewAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
MGSplitViewController *splitViewController;
RootViewController *rootViewController;
DetailViewController *detailViewController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet MGSplitViewController *splitViewController;
@property (nonatomic, retain) IBOutlet RootViewController *rootViewController;
@property (nonatomic, retain) IBOutlet DetailViewController *detailViewController;
@end
//
// MGSplitViewAppDelegate.m
// MGSplitView
//
// Created by Matt Gemmell on 26/07/2010.
// Copyright Instinctive Code 2010.
//
#import "MGSplitViewAppDelegate.h"
#import "RootViewController.h"
#import "DetailViewController.h"
#import "MGSplitViewController.h"
@implementation MGSplitViewAppDelegate
@synthesize window, splitViewController, rootViewController, detailViewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Add the split view controller's view to the window and display.
[window addSubview:splitViewController.view];
[window makeKeyAndVisible];
[rootViewController performSelector:@selector(selectFirstRow) withObject:nil afterDelay:0];
[detailViewController performSelector:@selector(configureView) withObject:nil afterDelay:0];
if (NO) { // whether to allow dragging the divider to move the split.
splitViewController.splitWidth = 15.0; // make it wide enough to actually drag!
splitViewController.allowsDraggingDivider = YES;
}
return YES;
}
- (void)dealloc
{
[splitViewController release];
[window release];
[super dealloc];
}
@end
//
// RootViewController.h
// MGSplitView
//
// Created by Matt Gemmell on 26/07/2010.
// Copyright Instinctive Code 2010.
//
#import <UIKit/UIKit.h>
@class DetailViewController;
@interface RootViewController : UITableViewController {
DetailViewController *detailViewController;
}
@property (nonatomic, retain) IBOutlet DetailViewController *detailViewController;
- (void)selectFirstRow;
@end
//
// RootViewController.m
// MGSplitView
//
// Created by Matt Gemmell on 26/07/2010.
// Copyright Instinctive Code 2010.
//
#import "RootViewController.h"
#import "DetailViewController.h"
@implementation RootViewController
@synthesize detailViewController;
#pragma mark -
#pragma mark View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
self.clearsSelectionOnViewWillAppear = NO;
self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0);
}
// Ensure that the view controller supports rotation and that the split view can therefore show in both portrait and landscape.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
- (void)selectFirstRow
{
if ([self.tableView numberOfSections] > 0 && [self.tableView numberOfRowsInSection:0] > 0) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionTop];
[self tableView:self.tableView didSelectRowAtIndexPath:indexPath];
}
}
#pragma mark -
#pragma mark Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)aTableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CellIdentifier";
// Dequeue or create a cell of the appropriate type.
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
cell.accessoryType = UITableViewCellAccessoryNone;
}
// Configure the cell.
cell.textLabel.text = [NSString stringWithFormat:@"Row %d", indexPath.row];
return cell;
}
#pragma mark -
#pragma mark Table view delegate
- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// When a row is selected, set the detail view controller's detail item to the item associated with the selected row.
detailViewController.detailItem = [NSString stringWithFormat:@"Row %d", indexPath.row];
}
#pragma mark -
#pragma mark Memory management
- (void)dealloc
{
[detailViewController release];
[super dealloc];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">800</int>
<string key="IBDocument.SystemVersion">10F569</string>
<string key="IBDocument.InterfaceBuilderVersion">788</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">117</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="63"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBProxyObject" id="606714003">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIView" id="647120888">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUILabel" id="483876647">
<reference key="NSNextResponder" ref="647120888"/>
<int key="NSvFlags">298</int>
<string key="NSFrame">{{20, 475}, {728, 21}}</string>
<reference key="NSSuperview" ref="647120888"/>
<object class="NSColor" key="IBUIBackgroundColor" id="33107367">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">Detail view content goes here</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">1</int>
</object>
<object class="IBUIToolbar" id="410698538">
<reference key="NSNextResponder" ref="647120888"/>
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{768, 44}</string>
<reference key="NSSuperview" ref="647120888"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableArray" key="IBUIItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIBarButtonItem" id="364890420">
<string key="IBUITitle">Show</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIStyle">1</int>
<reference key="IBUIToolbar" ref="410698538"/>
</object>
<object class="IBUIBarButtonItem" id="770212716">
<string key="IBUITitle">Horizontal</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIStyle">1</int>
<reference key="IBUIToolbar" ref="410698538"/>
</object>
<object class="IBUIBarButtonItem" id="819518362">
<string key="IBUITitle">Dragging</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIStyle">1</int>
<reference key="IBUIToolbar" ref="410698538"/>
</object>
<object class="IBUIBarButtonItem" id="857868355">
<string key="IBUITitle">Detail First</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIStyle">1</int>
<reference key="IBUIToolbar" ref="410698538"/>
</object>
</object>
</object>
</object>
<string key="NSFrameSize">{768, 1004}</string>
<reference key="NSSuperview"/>
<reference key="IBUIBackgroundColor" ref="33107367"/>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="647120888"/>
</object>
<int key="connectionID">12</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">toolbar</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="410698538"/>
</object>
<int key="connectionID">65</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">detailDescriptionLabel</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="483876647"/>
</object>
<int key="connectionID">66</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">toggleItem</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="364890420"/>
</object>
<int key="connectionID">68</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">toggleMasterView:</string>
<reference key="source" ref="364890420"/>
<reference key="destination" ref="841351856"/>
</object>
<int key="connectionID">69</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">toggleVertical:</string>
<reference key="source" ref="770212716"/>
<reference key="destination" ref="841351856"/>
</object>
<int key="connectionID">71</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">verticalItem</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="770212716"/>
</object>
<int key="connectionID">72</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">dividerStyleItem</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="819518362"/>
</object>
<int key="connectionID">75</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">toggleDividerStyle:</string>
<reference key="source" ref="819518362"/>
<reference key="destination" ref="841351856"/>
</object>
<int key="connectionID">76</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">masterBeforeDetailItem</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="857868355"/>
</object>
<int key="connectionID">78</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">toggleMasterBeforeDetail:</string>
<reference key="source" ref="857868355"/>
<reference key="destination" ref="841351856"/>
</object>
<int key="connectionID">79</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="606714003"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="647120888"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="483876647"/>
<reference ref="410698538"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">45</int>
<reference key="object" ref="483876647"/>
<reference key="parent" ref="647120888"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">63</int>
<reference key="object" ref="410698538"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="364890420"/>
<reference ref="770212716"/>
<reference ref="819518362"/>
<reference ref="857868355"/>
</object>
<reference key="parent" ref="647120888"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">67</int>
<reference key="object" ref="364890420"/>
<reference key="parent" ref="410698538"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">70</int>
<reference key="object" ref="770212716"/>
<reference key="parent" ref="410698538"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">74</int>
<reference key="object" ref="819518362"/>
<reference key="parent" ref="410698538"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">77</int>
<reference key="object" ref="857868355"/>
<reference key="parent" ref="410698538"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
<string>45.IBPluginDependency</string>
<string>63.IBPluginDependency</string>
<string>67.IBPluginDependency</string>
<string>70.IBPluginDependency</string>
<string>74.IBPluginDependency</string>
<string>77.IBPluginDependency</string>
<string>8.IBEditorWindowLastContentRect</string>
<string>8.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>DetailViewController</string>
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{198, 69}, {768, 1024}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">79</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">DetailViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>toggleDividerStyle:</string>
<string>toggleMasterBeforeDetail:</string>
<string>toggleMasterView:</string>
<string>toggleVertical:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>toggleDividerStyle:</string>
<string>toggleMasterBeforeDetail:</string>
<string>toggleMasterView:</string>
<string>toggleVertical:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">toggleDividerStyle:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleMasterBeforeDetail:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleMasterView:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleVertical:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>detailDescriptionLabel</string>
<string>detailItem</string>
<string>dividerStyleItem</string>
<string>masterBeforeDetailItem</string>
<string>splitController</string>
<string>toggleItem</string>
<string>toolbar</string>
<string>verticalItem</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UILabel</string>
<string>id</string>
<string>UIBarButtonItem</string>
<string>UIBarButtonItem</string>
<string>MGSplitViewController</string>
<string>UIBarButtonItem</string>
<string>UIToolbar</string>
<string>UIBarButtonItem</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>detailDescriptionLabel</string>
<string>detailItem</string>
<string>dividerStyleItem</string>
<string>masterBeforeDetailItem</string>
<string>splitController</string>
<string>toggleItem</string>
<string>toolbar</string>
<string>verticalItem</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">detailDescriptionLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">detailItem</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">dividerStyleItem</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">masterBeforeDetailItem</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">splitController</string>
<string key="candidateClassName">MGSplitViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">toggleItem</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">toolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">verticalItem</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/DetailViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MGSplitViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>showMasterPopover:</string>
<string>toggleMasterBeforeDetail:</string>
<string>toggleMasterView:</string>
<string>toggleSplitOrientation:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>showMasterPopover:</string>
<string>toggleMasterBeforeDetail:</string>
<string>toggleMasterView:</string>
<string>toggleSplitOrientation:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">showMasterPopover:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleMasterBeforeDetail:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleMasterView:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleSplitOrientation:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>delegate</string>
<string>detailViewController</string>
<string>masterViewController</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>UIViewController</string>
<string>UIViewController</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>delegate</string>
<string>detailViewController</string>
<string>masterViewController</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">delegate</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">detailViewController</string>
<string key="candidateClassName">UIViewController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">masterViewController</string>
<string key="candidateClassName">UIViewController</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/MGSplitViewController.h</string>
</object>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="786211723">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarButtonItem</string>
<string key="superclassName">UIBarItem</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarItem</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UILabel</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="786211723"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchDisplayController</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIToolbar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIToolbar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="800" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3100" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">MGSplitView.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">117</string>
</data>
</archive>
<?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>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.instinctivecode.test.${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>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1D3623260D0F684500981E51 /* MGSplitViewAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* MGSplitViewAppDelegate.m */; };
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
2804200B108E984D000629CD /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28042008108E984D000629CD /* RootViewController.m */; };
2804200C108E984D000629CD /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2804200A108E984D000629CD /* DetailViewController.m */; };
2804203C108E9BAB000629CD /* DetailView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2804203B108E9BAB000629CD /* DetailView.xib */; };
2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; };
28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; };
51FFA240142931B10076824A /* Pods.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 51FFA23F142931B10076824A /* Pods.xcconfig */; };
51FFA243142931E20076824A /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51FFA242142931E20076824A /* libPods.a */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D3623240D0F684500981E51 /* MGSplitViewAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGSplitViewAppDelegate.h; sourceTree = "<group>"; };
1D3623250D0F684500981E51 /* MGSplitViewAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGSplitViewAppDelegate.m; sourceTree = "<group>"; };
1D6058910D05DD3D006BFB54 /* MGSplitView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MGSplitView.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
28042007108E984D000629CD /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = "<group>"; };
28042008108E984D000629CD /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = "<group>"; };
28042009108E984D000629CD /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = "<group>"; };
2804200A108E984D000629CD /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = "<group>"; };
2804203B108E9BAB000629CD /* DetailView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DetailView.xib; sourceTree = "<group>"; };
2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
28A0AAE50D9B0CCF005BE974 /* MGSplitView_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGSplitView_Prefix.pch; sourceTree = "<group>"; };
28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
51FFA23F142931B10076824A /* Pods.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = "<group>"; };
51FFA242142931E20076824A /* libPods.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPods.a; path = "Pods/build/Release-iphoneos/libPods.a"; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* MGSplitView-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MGSplitView-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
C9CDF7A211FDA7890016C1C5 /* README.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.markdown; sourceTree = "<group>"; };
C9CDF7A311FDA7890016C1C5 /* Source Code License.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = "Source Code License.rtf"; sourceTree = "<group>"; };
C9CDF92211FE27DE0016C1C5 /* TODO.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TODO.markdown; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
51FFA243142931E20076824A /* libPods.a in Frameworks */,
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
C9CDF79B11FDA7080016C1C5 /* Demo */,
);
path = Classes;
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
1D6058910D05DD3D006BFB54 /* MGSplitView.app */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
51FFA242142931E20076824A /* libPods.a */,
51FFA23F142931B10076824A /* Pods.xcconfig */,
C9CDF7A211FDA7890016C1C5 /* README.markdown */,
C9CDF7A311FDA7890016C1C5 /* Source Code License.rtf */,
C9CDF92211FE27DE0016C1C5 /* TODO.markdown */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = CustomTemplate;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
28A0AAE50D9B0CCF005BE974 /* MGSplitView_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
28AD735F0D9D9599002E5188 /* MainWindow.xib */,
2804203B108E9BAB000629CD /* DetailView.xib */,
8D1107310486CEB800E47090 /* MGSplitView-Info.plist */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
1D30AB110D05D00D00671497 /* Foundation.framework */,
2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
C9CDF79B11FDA7080016C1C5 /* Demo */ = {
isa = PBXGroup;
children = (
1D3623240D0F684500981E51 /* MGSplitViewAppDelegate.h */,
1D3623250D0F684500981E51 /* MGSplitViewAppDelegate.m */,
28042007108E984D000629CD /* RootViewController.h */,
28042008108E984D000629CD /* RootViewController.m */,
28042009108E984D000629CD /* DetailViewController.h */,
2804200A108E984D000629CD /* DetailViewController.m */,
);
name = Demo;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
1D6058900D05DD3D006BFB54 /* MGSplitView */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "MGSplitView" */;
buildPhases = (
1D60588D0D05DD3D006BFB54 /* Resources */,
1D60588E0D05DD3D006BFB54 /* Sources */,
1D60588F0D05DD3D006BFB54 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = MGSplitView;
productName = MGSplitView;
productReference = 1D6058910D05DD3D006BFB54 /* MGSplitView.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MGSplitView" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
en,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
projectDirPath = "";
projectRoot = "";
targets = (
1D6058900D05DD3D006BFB54 /* MGSplitView */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
1D60588D0D05DD3D006BFB54 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */,
2804203C108E9BAB000629CD /* DetailView.xib in Resources */,
51FFA240142931B10076824A /* Pods.xcconfig in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
1D60588E0D05DD3D006BFB54 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
1D3623260D0F684500981E51 /* MGSplitViewAppDelegate.m in Sources */,
2804200B108E984D000629CD /* RootViewController.m in Sources */,
2804200C108E984D000629CD /* DetailViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 51FFA23F142931B10076824A /* Pods.xcconfig */;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = MGSplitView_Prefix.pch;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "MGSplitView-Info.plist";
PRODUCT_NAME = MGSplitView;
};
name = Debug;
};
1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 51FFA23F142931B10076824A /* Pods.xcconfig */;
buildSettings = {
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = MGSplitView_Prefix.pch;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "MGSplitView-Info.plist";
PRODUCT_NAME = MGSplitView;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2;
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PREBINDING = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "MGSplitView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1D6058940D05DD3E006BFB54 /* Debug */,
1D6058950D05DD3E006BFB54 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MGSplitView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "MGSplitView.app"
BlueprintName = "MGSplitView"
ReferencedContainer = "container:MGSplitView.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "MGSplitView.app"
BlueprintName = "MGSplitView"
ReferencedContainer = "container:MGSplitView.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "MGSplitView.app"
BlueprintName = "MGSplitView"
ReferencedContainer = "container:MGSplitView.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "MGSplitView.app"
BlueprintName = "MGSplitView"
ReferencedContainer = "container:MGSplitView.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:Pods/Pods.xcodeproj'/><FileRef location='group:MGSplitView.xcodeproj'/></Workspace>
\ No newline at end of file
//
// Prefix header for all source files of the 'MGSplitView' target in the 'MGSplitView' project
//
#import <Availability.h>
#ifndef __IPHONE_3_2
#warning "This project uses features only available in iPhone SDK 3.2 and later."
#endif
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">800</int>
<string key="IBDocument.SystemVersion">10F569</string>
<string key="IBDocument.InterfaceBuilderVersion">788</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">117</string>
</object>
<array class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<integer value="57"/>
<integer value="2"/>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<dictionary class="NSMutableDictionary" key="IBDocument.Metadata"/>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBProxyObject" id="606714003">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIWindow" id="673453472">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{768, 1024}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIResizesToFullScreen">YES</bool>
</object>
<object class="IBUICustomObject" id="963208320">
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIViewController" id="1025892334">
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUINavigationController" id="702459406">
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIHorizontal">NO</bool>
<object class="IBUINavigationBar" key="IBUINavigationBar" id="198982063">
<nil key="NSNextResponder"/>
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{0, 0}</string>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<array class="NSMutableArray" key="IBUIViewControllers">
<object class="IBUITableViewController" id="154558136">
<object class="IBUINavigationItem" key="IBUINavigationItem" id="113864107">
<reference key="IBUINavigationBar"/>
<string key="IBUITitle">Master</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<reference key="IBUIParentViewController" ref="702459406"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
</array>
</object>
<object class="IBUIViewController" id="649040653">
<array key="IBUIToolbarItems" id="0"/>
<string key="IBUINibName">DetailView</string>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="963208320"/>
<reference key="destination" ref="673453472"/>
</object>
<int key="connectionID">4</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="963208320"/>
</object>
<int key="connectionID">17</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">detailViewController</string>
<reference key="source" ref="154558136"/>
<reference key="destination" ref="649040653"/>
</object>
<int key="connectionID">60</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">masterViewController</string>
<reference key="source" ref="1025892334"/>
<reference key="destination" ref="702459406"/>
</object>
<int key="connectionID">63</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">detailViewController</string>
<reference key="source" ref="1025892334"/>
<reference key="destination" ref="649040653"/>
</object>
<int key="connectionID">64</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1025892334"/>
<reference key="destination" ref="649040653"/>
</object>
<int key="connectionID">65</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">detailViewController</string>
<reference key="source" ref="963208320"/>
<reference key="destination" ref="649040653"/>
</object>
<int key="connectionID">66</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">splitViewController</string>
<reference key="source" ref="963208320"/>
<reference key="destination" ref="1025892334"/>
</object>
<int key="connectionID">67</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">rootViewController</string>
<reference key="source" ref="963208320"/>
<reference key="destination" ref="154558136"/>
</object>
<int key="connectionID">68</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">splitController</string>
<reference key="source" ref="649040653"/>
<reference key="destination" ref="1025892334"/>
</object>
<int key="connectionID">70</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="606714003"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="673453472"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="963208320"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">54</int>
<reference key="object" ref="702459406"/>
<array class="NSMutableArray" key="children">
<reference ref="198982063"/>
<reference ref="154558136"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">55</int>
<reference key="object" ref="649040653"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">56</int>
<reference key="object" ref="198982063"/>
<reference key="parent" ref="702459406"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">57</int>
<reference key="object" ref="154558136"/>
<array class="NSMutableArray" key="children">
<reference ref="113864107"/>
</array>
<reference key="parent" ref="702459406"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">58</int>
<reference key="object" ref="113864107"/>
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="154558136"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">62</int>
<reference key="object" ref="1025892334"/>
<reference key="parent" ref="0"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">UIApplication</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="2.IBEditorWindowLastContentRect">{{190, 57}, {768, 1024}}</string>
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="3.CustomClassName">MGSplitViewAppDelegate</string>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="54.IBEditorWindowLastContentRect">{{0, 121}, {768, 1024}}</string>
<string key="54.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="55.CustomClassName">DetailViewController</string>
<string key="55.IBEditorWindowLastContentRect">{{0, 121}, {768, 1024}}</string>
<string key="55.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="56.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="57.CustomClassName">RootViewController</string>
<string key="57.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="58.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="62.CustomClassName">MGSplitViewController</string>
<string key="62.IBEditorWindowLastContentRect">{{0, 121}, {768, 1024}}</string>
<string key="62.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">70</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">DetailViewController</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="toggleMasterView:">id</string>
<string key="toggleVertical:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="toggleMasterView:">
<string key="name">toggleMasterView:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="toggleVertical:">
<string key="name">toggleVertical:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="detailDescriptionLabel">UILabel</string>
<string key="detailItem">id</string>
<string key="splitController">MGSplitViewController</string>
<string key="toggleItem">UIBarButtonItem</string>
<string key="toolbar">UIToolbar</string>
<string key="verticalItem">UIBarButtonItem</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="detailDescriptionLabel">
<string key="name">detailDescriptionLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="detailItem">
<string key="name">detailItem</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo" key="splitController">
<string key="name">splitController</string>
<string key="candidateClassName">MGSplitViewController</string>
</object>
<object class="IBToOneOutletInfo" key="toggleItem">
<string key="name">toggleItem</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo" key="toolbar">
<string key="name">toolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo" key="verticalItem">
<string key="name">verticalItem</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/DetailViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MGSplitViewAppDelegate</string>
<string key="superclassName">NSObject</string>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="detailViewController">DetailViewController</string>
<string key="rootViewController">RootViewController</string>
<string key="splitViewController">MGSplitViewController</string>
<string key="window">UIWindow</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="detailViewController">
<string key="name">detailViewController</string>
<string key="candidateClassName">DetailViewController</string>
</object>
<object class="IBToOneOutletInfo" key="rootViewController">
<string key="name">rootViewController</string>
<string key="candidateClassName">RootViewController</string>
</object>
<object class="IBToOneOutletInfo" key="splitViewController">
<string key="name">splitViewController</string>
<string key="candidateClassName">MGSplitViewController</string>
</object>
<object class="IBToOneOutletInfo" key="window">
<string key="name">window</string>
<string key="candidateClassName">UIWindow</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/MGSplitViewAppDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MGSplitViewController</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="showMasterPopover:">id</string>
<string key="toggleMasterView:">id</string>
<string key="toggleSplitOrientation:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="showMasterPopover:">
<string key="name">showMasterPopover:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="toggleMasterView:">
<string key="name">toggleMasterView:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="toggleSplitOrientation:">
<string key="name">toggleSplitOrientation:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="delegate">id</string>
<string key="detailViewController">UIViewController</string>
<string key="masterViewController">UIViewController</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="delegate">
<string key="name">delegate</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo" key="detailViewController">
<string key="name">detailViewController</string>
<string key="candidateClassName">UIViewController</string>
</object>
<object class="IBToOneOutletInfo" key="masterViewController">
<string key="name">masterViewController</string>
<string key="candidateClassName">UIViewController</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/MGSplitViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">RootViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">detailViewController</string>
<string key="NS.object.0">DetailViewController</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">detailViewController</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">detailViewController</string>
<string key="candidateClassName">DetailViewController</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/RootViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">RootViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
</array>
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="786211723">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIApplication</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarButtonItem</string>
<string key="superclassName">UIBarItem</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarItem</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UILabel</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="43289516">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="378153758">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationItem</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="43289516"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="786211723"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchDisplayController</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITableViewController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITableViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIToolbar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIToolbar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<reference key="sourceIdentifier" ref="378153758"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWindow</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="800" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3200" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">MGSplitView.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">117</string>
</data>
</archive>
platform :ios
pod 'MGSplitViewController', '1.0.0'
PODS:
- MGSplitViewController (1.0.0)
DEPENDENCIES:
- MGSplitViewController (= 1.0.0)
SPEC CHECKSUMS:
MGSplitViewController: e0b0bc01aa81e1559765c39e7a764c890dac373a
COCOAPODS: 0.16.0.rc2
**_NOTE: This is the MGSplitViewController example from https://github.com/mattgemmell/MGSplitViewController, but only updated to use CocoaPods. It does not contain the actual source files that make up the library, because those are fetched when running: $pod install_**
MGSplitViewController
=====================
MGSplitViewController is a replacement for UISplitViewController, with various useful enhancements.
Donations
---------
I wrote MGSplitViewController for my own use, but I'm making it available (as usual) for the benefit of the iOS developer community.
If you find it useful, a Paypal donation (or something from my Amazon.co.uk Wishlist) would be very much appreciated. Appropriate links can be found here: <http://mattgemmell.com/source>
Features
--------
Please note that, since split-views are commonly used for "Master-Detail" interfaces, I call the first sub-view the "master" and the second sub-view the "detail".
- By default, MGSplitViewController mimics the appearance and (complete) behaviour of UISplitViewController, including its delegate API. It accepts two UIViewControllers (or subclasses thereof).
- Allows toggling the _visibility of the master view_ in either interface-orientation; i.e. you can have master-detail or detail-only in either landscape and/or portrait orientations (independently, and/or interactively).
- Allows choosing whether the _split orientation_ is vertical (i.e. left/right, like UISplitViewController), or horizontal (master above, and detail below). You can toggle between modes interactively, with animation.
- Allows choosing whether the master view is _before_ (above, or to left of) the detail view, or _after_ it (below, or to the right).
- Allows you to choose (and change) the _position_ of the split, i.e. the relative sizes of the master and detail views.
- Allows you to enable _dragging_ of the split/divider between the master and detail views, with optional constraining via a delegate method.
- Allows you to choose the _width of the split_ between the master and detail views.
- Preset "_divider styles_": one for non-draggable UISplitViewController-like dividers, and one for draggable, thicker style with a grip-strip.
- Allows you to substitute your own divider-view (an MGSplitDividerView subclass), used to draw the split between the master and detail views.
How to use
----------
The "MGSplitViewController.h" header file (and the sample project) should be self-explanatory. It's recommended that you use the project as a reference.
Interface Builder support
-------------------------
At time of writing, MGSplitViewController cannot be quite as elegantly _visually_ configured like UISplitViewController using Interface Builder.
You can, however, (and it is recommended that you do) create an instance of it in a xib, and connect the masterViewController and detailViewController outlets to the required view-controllers.
License and Warranty
--------------------
The license for the code is included with the project; it's basically a BSD license with attribution.
You're welcome to use it in commercial, closed-source, open source, free or any other kind of software, as long as you credit me appropriately.
The MGSplitViewController code comes with no warranty of any kind. I hope it'll be useful to you (it certainly is to me), but I make no guarantees regarding its functionality or otherwise.
Support / Contact / Bugs / Features
-----------------------------------
I can't answer any questions about how to use the code, but I always welcome emails telling me that you're using it, or just saying thanks.
If you create an app which uses the code, I'd also love to hear about it. You can find my contact details on my web site, listed below.
Likewise, if you want to submit a feature request or bug report, feel free to get in touch. Better yet, fork the code and implement the feature/fix yourself, then submit a pull request.
Enjoy the code!
Cheers,
Matt Legend Gemmell
Writing: http://mattgemmell.com/
Contact: http://mattgemmell.com/about
Twitter: http://twitter.com/mattgemmell
Hire Me: http://instinctivecode.com/
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;\red51\green51\blue51;\red0\green180\blue128;\red255\green0\blue0;
\red31\green105\blue199;\red119\green119\blue119;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid1\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\deftab720
\pard\pardeftab720\ql\qnatural
\f0\b\fs24 \cf2 Matt Legend Gemmell / Instinctive Code Source Code License\
\b0\fs22 Last updated: 9th May 2010
\fs24 \
\
\
Thanks for downloading some of our source code!\
\
This is the license agreement for the source code which this document accompanies (don\'92t worry: you\'92re allowed to use it in your own products, commercial or otherwise).\
\
The full license text is further down this page, and you should only use the source code if you agree to the terms in that text. For convenience, though, we\'92ve put together a human-readable
\b non-authoritative
\b0 interpretation of the license which will hopefully answer any questions you have.\
\
\
\b \cf3 Green
\b0 \cf2 text shows
\b \cf3 what you can do with the code
\b0 \cf2 .\
\b \cf4 Red
\b0 \cf2 text means
\b \cf4 restrictions you must abide by
\b0 \cf2 .\
\
Basically, the license says that:\
\
\pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural
\ls1\ilvl0\cf2 {\listtext 1. }You can
\b \cf3 use the code in your own products, including commercial and/or closed-source products
\b0 \cf2 .\
{\listtext 2. }You can
\b \cf3 modify the code
\b0 \cf0 as you wish\cf2 , and
\b \cf3 use the modified code in your products
\b0 \cf2 .\
{\listtext 3. }You can
\b \cf3 redistribute the original, unmodified code
\b0 \cf2 , but you
\b \cf4 have to include the full license text below
\b0 \cf2 .\
{\listtext 4. }You can
\b \cf3 redistribute the modified code
\b0 \cf2 as you wish (
\b \cf4 without the full license text below
\b0 \cf2 ).\
{\listtext 5. }In all cases, you
\b \cf4 must include a credit mentioning Matt Legend Gemmell
\b0 \cf2 as the original author of the source.\
{\listtext 6. }Matt Legend Gemmell is \cf0 not liable for anything you do with the code\cf2 , no matter what. So be sensible.\
{\listtext 7. }You
\b \cf4 can\'92t use the name Matt Legend Gemmell, the name Instinctive Code, the Instinctive Code logo or any other related marks to promote your products
\b0 \cf2 based on the code.\
{\listtext 8. }If you agree to all of that, go ahead and use the source. Otherwise, don\'92t!\
\pard\pardeftab720\ql\qnatural
\cf2 \
\b \
\
Suggested Attribution Format\
\b0 \
The license requires that you give credit to Matt Legend Gemmell, as the original author of any of our source that you use. The placement and format of the credit is up to you, but we prefer the credit to be in the software\'92s \'93About\'94 window. Alternatively, you could put the credit in a list of acknowledgements within the software, in the software\'92s documentation, or on the web page for the software. The suggested format for the attribution is:\
\
\pard\pardeftab720\ql\qnatural
\b \cf0 Includes <Name of Code> code by {\field{\*\fldinst{HYPERLINK "http://mattgemmell.com/"}}{\fldrslt \cf5 Matt Legend Gemmell}}\cf6 .
\b0 \
\pard\pardeftab720\ql\qnatural
\cf2 \
where <Name of Code> would be replaced by the name of the specific source-code package you made use of. Where possible, please link the text \'93Matt Legend Gemmell\'94 to the following URL, or include the URL as plain text: {\field{\*\fldinst{HYPERLINK "http://mattgemmell.com/"}}{\fldrslt \cf5 http://mattgemmell.com/}}\
\
\
\b Full Source Code License Text\
\
\b0 Below you can find the actual text of the license agreement.
\b \
\
\pard\pardeftab720\ql\qnatural
\cf6 \
License Agreement for Source Code provided by Matt Legend Gemmell
\b0 \
\
This software is supplied to you by Matt Legend Gemmell in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this software.\
\
In consideration of your agreement to abide by the following terms, and subject to these terms, Matt Legend Gemmell grants you a personal, non-exclusive license, to use, reproduce, modify and redistribute the software, with or without modifications, in source and/or binary forms; provided that if you redistribute the software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the software, and that in all cases attribution of Matt Legend Gemmell as the original author of the source code shall be included in all such resulting software products or distributions.\uc0\u8232 \
Neither the name, trademarks, service marks or logos of Matt Legend Gemmell or Instinctive Code may be used to endorse or promote products derived from the software without specific prior written permission from Matt Legend Gemmell. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Matt Legend Gemmell herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the software may be incorporated.\
\
The software is provided by Matt Legend Gemmell on an "AS IS" basis. MATT LEGEND GEMMELL AND INSTINCTIVE CODE MAKE NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\
\
IN NO EVENT SHALL MATT LEGEND GEMMELL OR INSTINCTIVE CODE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF MATT LEGEND GEMMELL OR INSTINCTIVE CODE HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\
}
\ No newline at end of file
TODO
====
Interface Builder
-----------------
- Support visual configuration in Interface Builder, like UISplitViewController?
//
// main.m
// MGSplitView
//
// Created by Matt Gemmell on 26/07/2010.
// Copyright Instinctive Code 2010. All rights reserved.
//
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
//
// RKTStatus.h
// RKTwitter
//
// Created by Blake Watters on 9/5/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import "RKTUser.h"
@interface RKTStatus : NSObject {
NSNumber* _statusID;
NSDate* _createdAt;
NSString* _text;
NSString* _urlString;
NSString* _inReplyToScreenName;
NSNumber* _isFavorited;
RKTUser* _user;
}
/**
* The unique ID of this Status
*/
@property (nonatomic, retain) NSNumber* statusID;
/**
* Timestamp the Status was sent
*/
@property (nonatomic, retain) NSDate* createdAt;
/**
* Text of the Status
*/
@property (nonatomic, retain) NSString* text;
/**
* String version of the URL associated with the Status
*/
@property (nonatomic, retain) NSString* urlString;
/**
* The screen name of the User this Status was in response to
*/
@property (nonatomic, retain) NSString* inReplyToScreenName;
/**
* Is this status a favorite?
*/
@property (nonatomic, retain) NSNumber* isFavorited;
/**
* The User who posted this status
*/
@property (nonatomic, retain) RKTUser* user;
@end
//
// RKTStatus.m
// RKTwitter
//
// Created by Blake Watters on 9/5/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import "RKTStatus.h"
@implementation RKTStatus
@synthesize statusID = _statusID;
@synthesize createdAt = _createdAt;
@synthesize text = _text;
@synthesize urlString = _urlString;
@synthesize inReplyToScreenName = _inReplyToScreenName;
@synthesize isFavorited = _isFavorited;
@synthesize user = _user;
- (NSString*)description {
return [NSString stringWithFormat:@"%@ (ID: %@)", self.text, self.statusID];
}
- (void)dealloc {
[_statusID release];
[_createdAt release];
[_text release];
[_urlString release];
[_inReplyToScreenName release];
[_user release];
[super dealloc];
}
@end
//
// RKTUser.h
// RKTwitter
//
// Created by Blake Watters on 9/5/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
@interface RKTUser : NSObject {
NSNumber* _userID;
NSString* _name;
NSString* _screenName;
}
@property (nonatomic, retain) NSNumber* userID;
@property (nonatomic, retain) NSString* name;
@property (nonatomic, retain) NSString* screenName;
@end
//
// RKTUser.m
// RKTwitter
//
// Created by Blake Watters on 9/5/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import "RKTUser.h"
@implementation RKTUser
@synthesize userID = _userID;
@synthesize name = _name;
@synthesize screenName = _screenName;
- (void)dealloc {
[_userID release];
[_name release];
[_screenName release];
[super dealloc];
}
@end
//
// RKTwitterAppDelegate.h
// RKTwitter
//
// Created by Blake Watters on 9/5/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface RKTwitterAppDelegate : NSObject <UIApplicationDelegate> {
}
@end
//
// RKTwitterAppDelegate.m
// RKTwitter
//
// Created by Blake Watters on 9/5/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import <RestKit/RestKit.h>
#import "RKTwitterAppDelegate.h"
#import "RKTwitterViewController.h"
#import "RKTStatus.h"
#import "RKTUser.h"
@implementation RKTwitterAppDelegate
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
RKLogConfigureByName("RestKit/Network*", RKLogLevelTrace);
RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelTrace);
// Initialize RestKit
RKObjectManager* objectManager = [RKObjectManager managerWithBaseURLString:@"http://twitter.com"];
// Enable automatic network activity indicator management
objectManager.client.requestQueue.showsNetworkActivityIndicatorWhenBusy = YES;
// Setup our object mappings
RKObjectMapping* userMapping = [RKObjectMapping mappingForClass:[RKTUser class]];
[userMapping mapKeyPath:@"id" toAttribute:@"userID"];
[userMapping mapKeyPath:@"screen_name" toAttribute:@"screenName"];
[userMapping mapAttributes:@"name", nil];
RKObjectMapping* statusMapping = [RKObjectMapping mappingForClass:[RKTStatus class]];
[statusMapping mapKeyPathsToAttributes:@"id", @"statusID",
@"created_at", @"createdAt",
@"text", @"text",
@"url", @"urlString",
@"in_reply_to_screen_name", @"inReplyToScreenName",
@"favorited", @"isFavorited",
nil];
[statusMapping mapRelationship:@"user" withMapping:userMapping];
// Update date format so that we can parse Twitter dates properly
// Wed Sep 29 15:31:08 +0000 2010
[RKObjectMapping addDefaultDateFormatterForString:@"E MMM d HH:mm:ss Z y" inTimeZone:nil];
// Uncomment these lines to use XML, comment it to use JSON
// objectManager.acceptMIMEType = RKMIMETypeXML;
// statusMapping.rootKeyPath = @"statuses.status";
// Register our mappings with the provider using a resource path pattern
[objectManager.mappingProvider setObjectMapping:statusMapping forResourcePathPattern:@"/status/user_timeline/:username"];
// Create Window and View Controllers
RKTwitterViewController* viewController = [[[RKTwitterViewController alloc] initWithNibName:nil bundle:nil] autorelease];
UINavigationController* controller = [[UINavigationController alloc] initWithRootViewController:viewController];
UIWindow* window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
[window addSubview:controller.view];
[window makeKeyAndVisible];
return YES;
}
- (void)dealloc {
[super dealloc];
}
@end
//
// RKTwitterViewController.h
// RKTwitter
//
// Created by Blake Watters on 9/5/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <RestKit/RestKit.h>
@interface RKTwitterViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, RKObjectLoaderDelegate> {
UITableView* _tableView;
NSArray* _statuses;
}
@end
//
// RKTwitterViewController.m
// RKTwitter
//
// Created by Blake Watters on 9/5/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import "RKTwitterViewController.h"
#import "RKTStatus.h"
@interface RKTwitterViewController (Private)
- (void)loadData;
@end
@implementation RKTwitterViewController
- (void)loadTimeline {
// Load the object model via RestKit
RKObjectManager* objectManager = [RKObjectManager sharedManager];
objectManager.client.baseURL = [RKURL URLWithString:@"http://www.twitter.com"];
[objectManager loadObjectsAtResourcePath:@"/status/user_timeline/RestKit" delegate:self];
}
- (void)loadView {
[super loadView];
// Setup View and Table View
self.title = @"RestKit Tweets";
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackTranslucent;
self.navigationController.navigationBar.tintColor = [UIColor blackColor];
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(loadTimeline)] autorelease];
UIImageView* imageView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"BG.png"]] autorelease];
imageView.frame = CGRectOffset(imageView.frame, 0, -64);
[self.view insertSubview:imageView atIndex:0];
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 480-64) style:UITableViewStylePlain];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.backgroundColor = [UIColor clearColor];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.view addSubview:_tableView];
[self loadTimeline];
}
- (void)dealloc {
[_tableView release];
[_statuses release];
[super dealloc];
}
#pragma mark RKObjectLoaderDelegate methods
- (void)request:(RKRequest*)request didLoadResponse:(RKResponse*)response {
NSLog(@"Loaded payload: %@", [response bodyAsString]);
}
- (void)objectLoader:(RKObjectLoader*)objectLoader didLoadObjects:(NSArray*)objects {
NSLog(@"Loaded statuses: %@", objects);
[_statuses release];
_statuses = [objects retain];
[_tableView reloadData];
}
- (void)objectLoader:(RKObjectLoader*)objectLoader didFailWithError:(NSError*)error {
UIAlertView* alert = [[[UIAlertView alloc] initWithTitle:@"Error" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
[alert show];
NSLog(@"Hit error: %@", error);
}
#pragma mark UITableViewDelegate methods
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
CGSize size = [[[_statuses objectAtIndex:indexPath.row] text] sizeWithFont:[UIFont systemFontOfSize:14] constrainedToSize:CGSizeMake(300, 9000)];
return size.height + 10;
}
#pragma mark UITableViewDataSource methods
- (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section {
return [_statuses count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString* reuseIdentifier = @"Tweet Cell";
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
if (nil == cell) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier] autorelease];
cell.textLabel.font = [UIFont systemFontOfSize:14];
cell.textLabel.numberOfLines = 0;
cell.textLabel.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"listbg.png"]];
}
cell.textLabel.text = [[_statuses objectAtIndex:indexPath.row] text];
return cell;
}
@end
platform :ios
pod 'RestKit'
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:RKTwitter.xcodeproj">
</FileRef>
</Workspace>
<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:Pods/Pods.xcodeproj'/><FileRef location='group:RKTwitter.xcodeproj'/></Workspace>
\ No newline at end of file
//
// Prefix header for all source files of the 'RKTwitter' target in the 'RKTwitter' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
<?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>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${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>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
</dict>
</plist>
//
// main.m
// RKTwitter
//
// Created by Blake Watters on 9/5/10.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"RKTwitterAppDelegate");
[pool release];
return retVal;
}
# As this file is loaded pretty early, we can use this opportunity to clean
# the integrated project, if it exists, and setup an unintegrated version.
require 'fileutils'
integrated = File.expand_path('../RelativePathProject/RelativePathProject.xcodeproj', __FILE__)
unintegrated = File.expand_path('../RelativePathProject/RelativePathProject.xcodeproj.unintegrated', __FILE__)
FileUtils.rm_rf(integrated)
FileUtils.cp_r(unintegrated, integrated)
platform :ios
xcodeproj "RelativePathProject/RelativePathProject.xcodeproj"
pod "AFNetworking"
<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:Pods/Pods.xcodeproj'/><FileRef location='group:RelativePathProject/RelativePathProject.xcodeproj'/></Workspace>
\ No newline at end of file
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
B50504EA1509774600AFAE65 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B50504E91509774600AFAE65 /* UIKit.framework */; };
B50504EC1509774600AFAE65 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B50504EB1509774600AFAE65 /* Foundation.framework */; };
B50504EE1509774600AFAE65 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B50504ED1509774600AFAE65 /* CoreGraphics.framework */; };
B50504F41509774600AFAE65 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B50504F21509774600AFAE65 /* InfoPlist.strings */; };
B50504F61509774600AFAE65 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B50504F51509774600AFAE65 /* main.m */; };
B50504FA1509774600AFAE65 /* CCPAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B50504F91509774600AFAE65 /* CCPAppDelegate.m */; };
B50504FD1509774600AFAE65 /* CCPViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B50504FC1509774600AFAE65 /* CCPViewController.m */; };
B50505001509774600AFAE65 /* CCPViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = B50504FE1509774600AFAE65 /* CCPViewController_iPhone.xib */; };
B50505031509774600AFAE65 /* CCPViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = B50505011509774600AFAE65 /* CCPViewController_iPad.xib */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0655448A743D44CE9C8560F4 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
1BDBB6EEA4904D18883D5049 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
4B73544C9B594609B70257C2 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
60435663B02542A193962E58 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
7BE04F9FCDE24A588AF38CCA /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
968826D4F729428780EB11C7 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
A317BF0E1976499FAF0A148C /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
B50504E51509774600AFAE65 /* RelativePathProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RelativePathProject.app; sourceTree = BUILT_PRODUCTS_DIR; };
B50504E91509774600AFAE65 /* UIKit.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
B50504EB1509774600AFAE65 /* Foundation.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
B50504ED1509774600AFAE65 /* CoreGraphics.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
B50504F11509774600AFAE65 /* RelativePathProject-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "RelativePathProject-Info.plist"; sourceTree = "<group>"; };
B50504F31509774600AFAE65 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
B50504F51509774600AFAE65 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
B50504F71509774600AFAE65 /* RelativePathProject-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RelativePathProject-Prefix.pch"; sourceTree = "<group>"; };
B50504F81509774600AFAE65 /* CCPAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPAppDelegate.h; sourceTree = "<group>"; };
B50504F91509774600AFAE65 /* CCPAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCPAppDelegate.m; sourceTree = "<group>"; };
B50504FB1509774600AFAE65 /* CCPViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPViewController.h; sourceTree = "<group>"; };
B50504FC1509774600AFAE65 /* CCPViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCPViewController.m; sourceTree = "<group>"; };
B50504FF1509774600AFAE65 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/CCPViewController_iPhone.xib; sourceTree = "<group>"; };
B50505021509774600AFAE65 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/CCPViewController_iPad.xib; sourceTree = "<group>"; };
B883D8352B9842028C5C0F5D /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
BDDCC8E0B6B44EC5A067C887 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
DD3C7BABD6FA4FFB859BA028 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
E3F6CFE58972416FB95F9145 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
B50504E21509774600AFAE65 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B50504EA1509774600AFAE65 /* UIKit.framework in Frameworks */,
B50504EC1509774600AFAE65 /* Foundation.framework in Frameworks */,
B50504EE1509774600AFAE65 /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
B50504DA1509774600AFAE65 = {
isa = PBXGroup;
children = (
B50504EF1509774600AFAE65 /* RelativePathProject */,
B50504E81509774600AFAE65 /* Frameworks */,
B50504E61509774600AFAE65 /* Products */,
);
sourceTree = "<group>";
};
B50504E61509774600AFAE65 /* Products */ = {
isa = PBXGroup;
children = (
B50504E51509774600AFAE65 /* RelativePathProject.app */,
);
name = Products;
sourceTree = "<group>";
};
B50504E81509774600AFAE65 /* Frameworks */ = {
isa = PBXGroup;
children = (
B50504E91509774600AFAE65 /* UIKit.framework */,
B50504EB1509774600AFAE65 /* Foundation.framework */,
B50504ED1509774600AFAE65 /* CoreGraphics.framework */,
7BE04F9FCDE24A588AF38CCA /* libPods.a */,
BDDCC8E0B6B44EC5A067C887 /* libPods.a */,
B883D8352B9842028C5C0F5D /* libPods.a */,
60435663B02542A193962E58 /* libPods.a */,
1BDBB6EEA4904D18883D5049 /* libPods.a */,
A317BF0E1976499FAF0A148C /* libPods.a */,
4B73544C9B594609B70257C2 /* libPods.a */,
0655448A743D44CE9C8560F4 /* libPods.a */,
968826D4F729428780EB11C7 /* libPods.a */,
E3F6CFE58972416FB95F9145 /* libPods.a */,
DD3C7BABD6FA4FFB859BA028 /* libPods.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
B50504EF1509774600AFAE65 /* RelativePathProject */ = {
isa = PBXGroup;
children = (
B50504F81509774600AFAE65 /* CCPAppDelegate.h */,
B50504F91509774600AFAE65 /* CCPAppDelegate.m */,
B50504FB1509774600AFAE65 /* CCPViewController.h */,
B50504FC1509774600AFAE65 /* CCPViewController.m */,
B50504FE1509774600AFAE65 /* CCPViewController_iPhone.xib */,
B50505011509774600AFAE65 /* CCPViewController_iPad.xib */,
B50504F01509774600AFAE65 /* Supporting Files */,
);
path = RelativePathProject;
sourceTree = "<group>";
};
B50504F01509774600AFAE65 /* Supporting Files */ = {
isa = PBXGroup;
children = (
B50504F11509774600AFAE65 /* RelativePathProject-Info.plist */,
B50504F21509774600AFAE65 /* InfoPlist.strings */,
B50504F51509774600AFAE65 /* main.m */,
B50504F71509774600AFAE65 /* RelativePathProject-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
B50504E41509774600AFAE65 /* RelativePathProject */ = {
isa = PBXNativeTarget;
buildConfigurationList = B50505061509774600AFAE65 /* Build configuration list for PBXNativeTarget "RelativePathProject" */;
buildPhases = (
B50504E11509774600AFAE65 /* Sources */,
B50504E21509774600AFAE65 /* Frameworks */,
B50504E31509774600AFAE65 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = RelativePathProject;
productName = RelativePathProject;
productReference = B50504E51509774600AFAE65 /* RelativePathProject.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
B50504DC1509774600AFAE65 /* Project object */ = {
isa = PBXProject;
attributes = {
CLASSPREFIX = CCP;
LastUpgradeCheck = 0430;
ORGANIZATIONNAME = ChaiONE;
};
buildConfigurationList = B50504DF1509774600AFAE65 /* Build configuration list for PBXProject "RelativePathProject" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = B50504DA1509774600AFAE65;
productRefGroup = B50504E61509774600AFAE65 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
B50504E41509774600AFAE65 /* RelativePathProject */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
B50504E31509774600AFAE65 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B50504F41509774600AFAE65 /* InfoPlist.strings in Resources */,
B50505001509774600AFAE65 /* CCPViewController_iPhone.xib in Resources */,
B50505031509774600AFAE65 /* CCPViewController_iPad.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
B50504E11509774600AFAE65 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B50504F61509774600AFAE65 /* main.m in Sources */,
B50504FA1509774600AFAE65 /* CCPAppDelegate.m in Sources */,
B50504FD1509774600AFAE65 /* CCPViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
B50504F21509774600AFAE65 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
B50504F31509774600AFAE65 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
B50504FE1509774600AFAE65 /* CCPViewController_iPhone.xib */ = {
isa = PBXVariantGroup;
children = (
B50504FF1509774600AFAE65 /* en */,
);
name = CCPViewController_iPhone.xib;
sourceTree = "<group>";
};
B50505011509774600AFAE65 /* CCPViewController_iPad.xib */ = {
isa = PBXVariantGroup;
children = (
B50505021509774600AFAE65 /* en */,
);
name = CCPViewController_iPad.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
B50505041509774600AFAE65 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
B50505051509774600AFAE65 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
B50505071509774600AFAE65 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DSTROOT = /tmp/xcodeproj.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RelativePathProject/RelativePathProject-Prefix.pch";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "RelativePathProject/RelativePathProject-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = app;
};
name = Debug;
};
B50505081509774600AFAE65 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DSTROOT = /tmp/xcodeproj.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RelativePathProject/RelativePathProject-Prefix.pch";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "RelativePathProject/RelativePathProject-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
B50504DF1509774600AFAE65 /* Build configuration list for PBXProject "RelativePathProject" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B50505041509774600AFAE65 /* Debug */,
B50505051509774600AFAE65 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B50505061509774600AFAE65 /* Build configuration list for PBXNativeTarget "RelativePathProject" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B50505071509774600AFAE65 /* Debug */,
B50505081509774600AFAE65 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = B50504DC1509774600AFAE65 /* Project object */;
}
//
// CCPAppDelegate.h
// RelativePathProject
//
// Created by Ben Scheirman on 3/8/12.
// Copyright (c) 2012 ChaiONE. All rights reserved.
//
#import <UIKit/UIKit.h>
@class CCPViewController;
@interface CCPAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) CCPViewController *viewController;
@end
//
// CCPAppDelegate.m
// RelativePathProject
//
// Created by Ben Scheirman on 3/8/12.
// Copyright (c) 2012 ChaiONE. All rights reserved.
//
#import "CCPAppDelegate.h"
#import "CCPViewController.h"
@implementation CCPAppDelegate
@synthesize window = _window;
@synthesize viewController = _viewController;
- (void)dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.viewController = [[[CCPViewController alloc] initWithNibName:@"CCPViewController_iPhone" bundle:nil] autorelease];
} else {
self.viewController = [[[CCPViewController alloc] initWithNibName:@"CCPViewController_iPad" bundle:nil] autorelease];
}
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
//
// CCPViewController.h
// RelativePathProject
//
// Created by Ben Scheirman on 3/8/12.
// Copyright (c) 2012 ChaiONE. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface CCPViewController : UIViewController
@end
//
// CCPViewController.m
// RelativePathProject
//
// Created by Ben Scheirman on 3/8/12.
// Copyright (c) 2012 ChaiONE. All rights reserved.
//
#import "CCPViewController.h"
@interface CCPViewController ()
@end
@implementation CCPViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
} else {
return YES;
}
}
@end
<?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.cocoapods.${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>
//
// Prefix header for all source files of the 'RelativePathProject' target in the 'RelativePathProject' project
//
#import <Availability.h>
#ifndef __IPHONE_4_0
#warning "This project uses features only available in iOS SDK 4.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1280</int>
<string key="IBDocument.SystemVersion">11C25</string>
<string key="IBDocument.InterfaceBuilderVersion">1919</string>
<string key="IBDocument.AppKitVersion">1138.11</string>
<string key="IBDocument.HIToolboxVersion">566.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">916</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBProxyObject" id="606714003">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIView" id="766721923">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace">
<int key="NSID">2</int>
</object>
</object>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="766721923"/>
</object>
<int key="connectionID">3</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="606714003"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="766721923"/>
<reference key="parent" ref="0"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">CCPViewController</string>
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">3</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">CCPViewController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/CCPViewController.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">916</string>
</data>
</archive>
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1280</int>
<string key="IBDocument.SystemVersion">11C25</string>
<string key="IBDocument.InterfaceBuilderVersion">1919</string>
<string key="IBDocument.AppKitVersion">1138.11</string>
<string key="IBDocument.HIToolboxVersion">566.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">916</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="843779117">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="774585933">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC43NQA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace">
<int key="NSID">2</int>
</object>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="774585933"/>
</object>
<int key="connectionID">7</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="843779117"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="774585933"/>
<reference key="parent" ref="0"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">CCPViewController</string>
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">7</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">CCPViewController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/CCPViewController.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">916</string>
</data>
</archive>
//
// main.m
// RelativePathProject
//
// Created by Ben Scheirman on 3/8/12.
// Copyright (c) 2012 ChaiONE. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CCPAppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([CCPAppDelegate class]));
}
}
.DS_Store
*.mode1v3
*.pbxuser
*.perspectivev3
*.xcworkspace
xcuserdata
Documentation
[submodule "Vendor/AFNetworking"]
path = Vendor/AFNetworking
url = https://github.com/gowalla/AFNetworking.git
[submodule "Vendor/SSToolkit"]
path = Vendor/SSToolkit
url = https://github.com/samsoffes/sstoolkit.git
//
// SCAddressBarDemoViewController.h
// SSCatalog
//
// Created by Sam Soffes on 2/8/11.
// Copyright 2011 Sam Soffes. All rights reserved.
//
@interface SCAddressBarDemoViewController : UIViewController <UITextFieldDelegate, SSWebViewDelegate>
+ (NSString *)title;
@end
//
// SCAddressBarDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 2/8/11.
// Copyright 2011 Sam Soffes. All rights reserved.
//
#import "SCAddressBarDemoViewController.h"
@implementation SCAddressBarDemoViewController {
SSGradientView *_headerView;
UILabel *_titleLabel;
SSAddressBarTextField *_addressBar;
SSWebView *_webView;
}
#pragma mark - Class Methods
+ (NSString *)title {
return @"Address bar";
}
#pragma mark - NSObject
- (void)dealloc {
_webView.delegate = nil;
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
self.view.backgroundColor = [UIColor colorWithRed:0.851f green:0.859f blue:0.882f alpha:1.0f];
CGSize size = self.view.frame.size;
_headerView = [[SSGradientView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, size.width, 58.0f)];
_headerView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_headerView.topColor = [UIColor colorWithWhite:0.957f alpha:1.0f];
_headerView.bottomColor = [UIColor colorWithWhite:0.827f alpha:1.0f];
_headerView.bottomBorderColor = [UIColor colorWithWhite:0.369f alpha:1.0f];
_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10.0f, 0.0f, size.width - 20.0f, 21.0f)];
_titleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_titleLabel.backgroundColor = [UIColor clearColor];
_titleLabel.textColor = [UIColor colorWithWhite:0.404f alpha:1.0f];
_titleLabel.textAlignment = UITextAlignmentCenter;
_titleLabel.font = [UIFont boldSystemFontOfSize:12.0f];
_titleLabel.shadowColor = [UIColor whiteColor];
_titleLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
[_headerView addSubview:_titleLabel];
_addressBar = [[SSAddressBarTextField alloc] initWithFrame:CGRectMake(10.0f, 21.0f, size.width - 20.0f, 31.0f)];
_addressBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_addressBar.delegate = self;
[_headerView addSubview:_addressBar];
[self.view addSubview:_headerView];
_webView = [[SSWebView alloc] initWithFrame:CGRectMake(0.0f, 58.0f, size.width, size.height - 58.0f)];
_webView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_webView.scalesPageToFit = YES;
_webView.delegate = self;
[self.view addSubview:_webView];
[_addressBar.reloadButton addTarget:_webView action:@selector(reload) forControlEvents:UIControlEventTouchUpInside];
[_addressBar.stopButton addTarget:_webView action:@selector(stopLoading) forControlEvents:UIControlEventTouchUpInside];
[_webView loadURLString:@"http://samsoff.es"];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
#pragma mark - UITextFieldDelegate
- (void)textFieldDidBeginEditing:(UITextField *)textField {
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(_removeGrayView) object:nil];
// Gray Button
// UIButton *aGrayButton = [UIButton buttonWithType:UIButtonTypeCustom];
// aGrayButton.frame = _webView.frame;
// aGrayButton.backgroundColor = [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.5f];
// aGrayButton.alpha = 0.0f;
// aGrayButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
// [aGrayButton addTarget:textField action:@selector(resignFirstResponder) forControlEvents:UIControlEventTouchDown];
// self.grayButton = aGrayButton;
// [self.view addSubview:grayButton];
// [grayButton fadeIn];
}
- (void)textFieldDidEndEditing:(UITextField *)textField {
// [self performSelector:@selector(_removeGrayView) withObject:nil afterDelay:0.1];
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[_webView loadURLString:textField.text];
[textField resignFirstResponder];
return YES;
}
#pragma mark - SSWebViewDelegate
- (void)webViewDidStartLoadingPage:(SSWebView *)aWebView {
_addressBar.loading = YES;
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
NSString *urlString = [[[_webView lastRequest] mainDocumentURL] absoluteString];
static NSRegularExpression *regularExpression = nil;
if (!regularExpression) {
regularExpression = [[NSRegularExpression alloc] initWithPattern:@"^https?://" options:NSRegularExpressionCaseInsensitive error:nil];
}
NSString *addressBarUrlString = [regularExpression stringByReplacingMatchesInString:urlString options:0 range:NSMakeRange(0, [urlString length]) withTemplate:@""];
_addressBar.text = addressBarUrlString;
_titleLabel.text = urlString;
}
- (void)webViewDidFinishLoadingPage:(SSWebView *)aWebView {
_addressBar.loading = NO;
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
NSString *title = [_webView stringByEvaluatingJavaScriptFromString:@"document.title"];
if (title) {
_titleLabel.text = title;
}
}
- (void)webView:(SSWebView *)aWebView didFailLoadWithError:(NSError *)error {
_addressBar.loading = NO;
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
}
@end
//
// SCAppDelegate.h
// SSCatalog
//
// Created by Sam Soffes on 9/21/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
@interface SCAppDelegate : NSObject <UIApplicationDelegate>
@property (nonatomic, strong) UIWindow *window;
@property (nonatomic, strong) UINavigationController *navigationController;
@end
//
// SCAppDelegate.m
// SSCatalog
//
// Created by Sam Soffes on 9/21/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
#import "SCAppDelegate.h"
#import "SCRootViewController.h"
@implementation SCAppDelegate {
UIWindow *_window;
UINavigationController *_navigationController;
}
#pragma mark - Accessors
@synthesize window = _window;
@synthesize navigationController = _navigationController;
#pragma mark - UIApplicationDelegate
- (void)applicationDidFinishLaunching:(UIApplication *)application {
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
SCRootViewController *viewController = [[SCRootViewController alloc] initWithStyle:UITableViewStyleGrouped];
UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
self.navigationController = aNavigationController;
[_window addSubview:_navigationController.view];
[_window makeKeyAndVisible];
}
@end
//
// SCBadgeTableViewCellDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 01/29/11.
// Copyright 2011 Sam Soffes, Inc. All rights reserved.
//
@interface SCBadgeTableViewCellDemoViewController : UITableViewController
+ (NSString *)title;
@end
//
// SCBadgeTableViewCellDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 01/29/11.
// Copyright 2011 Sam Soffes, Inc. All rights reserved.
//
#import "SCBadgeTableViewCellDemoViewController.h"
@implementation SCBadgeTableViewCellDemoViewController
#pragma mark - Class Methods
+ (NSString *)title {
return @"Badge Table View Cell";
}
#pragma mark - NSObject
- (id)init {
return self = [super initWithStyle:UITableViewStyleGrouped];
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.tableView reloadData];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return (section == 0) ? 4 : 12;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"cell";
SSBadgeTableViewCell *cell = (SSBadgeTableViewCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[SSBadgeTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier];
}
if (indexPath.section == 0) {
switch (indexPath.row) {
case 0: {
cell.textLabel.text = @"Default Badge View";
cell.badgeView.textLabel.text = @"0";
cell.badgeView.badgeColor = [SSBadgeView defaultBadgeColor];
break;
}
case 1: {
cell.textLabel.text = @"Unread Count";
cell.badgeView.textLabel.text = @"3";
cell.badgeView.badgeColor = [UIColor colorWithRed:0.969f green:0.082f blue:0.078f alpha:1.0f];
break;
}
case 2: {
cell.textLabel.text = @"Text Badge";
cell.badgeView.textLabel.text = @"New";
cell.badgeView.badgeColor = [UIColor colorWithRed:0.388f green:0.686f blue:0.239f alpha:1.0f];
break;
}
case 3: {
cell.textLabel.text = @"Nil value";
cell.badgeView.textLabel.text = nil;
cell.badgeView.badgeColor = [SSBadgeView defaultBadgeColor];
break;
}
}
} else {
NSNumber *number = [NSNumber numberWithInteger:indexPath.row * 256];
cell.textLabel.text = [[NSNumberFormatter localizedStringFromNumber:number numberStyle:NSNumberFormatterSpellOutStyle] capitalizedString];
cell.badgeView.textLabel.text = [NSNumberFormatter localizedStringFromNumber:number numberStyle:NSNumberFormatterDecimalStyle];
cell.badgeView.badgeColor = [SSBadgeView defaultBadgeColor];
}
return cell;
}
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
@end
//
// SCCollectionViewDemoViewController.h
// SSCatalog
//
// Created by Sam Soffes on 8/24/10.
// Copyright 2010 Sam Soffes. All rights reserved.
//
@interface SCCollectionViewDemoViewController : SSCollectionViewController
+ (NSString *)title;
@end
//
// SCCollectionViewDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 8/24/10.
// Copyright 2010 Sam Soffes. All rights reserved.
//
#import "SCCollectionViewDemoViewController.h"
#import "SCImageCollectionViewItem.h"
@implementation SCCollectionViewDemoViewController
#pragma mark - Class Methods
+ (NSString *)title {
return @"Collection View";
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
self.collectionView.extremitiesStyle = SSCollectionViewExtremitiesStyleScrolling;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
#pragma mark - SSCollectionViewDataSource
- (NSUInteger)numberOfSectionsInCollectionView:(SSCollectionView *)aCollectionView {
return 10;
}
- (NSUInteger)collectionView:(SSCollectionView *)aCollectionView numberOfItemsInSection:(NSUInteger)section {
return 50;
}
- (SSCollectionViewItem *)collectionView:(SSCollectionView *)aCollectionView itemForIndexPath:(NSIndexPath *)indexPath {
static NSString *const itemIdentifier = @"itemIdentifier";
SCImageCollectionViewItem *item = (SCImageCollectionViewItem *)[aCollectionView dequeueReusableItemWithIdentifier:itemIdentifier];
if (item == nil) {
item = [[SCImageCollectionViewItem alloc] initWithReuseIdentifier:itemIdentifier];
}
CGFloat size = 80.0f * [[UIScreen mainScreen] scale];
NSInteger i = (50 * indexPath.section) + indexPath.row;
item.imageURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.gravatar.com/avatar/%i?s=%0.f&d=identicon", i, size]];
return item;
}
- (UIView *)collectionView:(SSCollectionView *)aCollectionView viewForHeaderInSection:(NSUInteger)section {
SSLabel *header = [[SSLabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.view.frame.size.width, 40.0f)];
header.autoresizingMask = UIViewAutoresizingFlexibleWidth;
header.text = [NSString stringWithFormat:@"Section %i", section + 1];
header.textEdgeInsets = UIEdgeInsetsMake(0.0f, 19.0f, 0.0f, 19.0f);
header.shadowColor = [UIColor whiteColor];
header.shadowOffset = CGSizeMake(0.0f, 1.0f);
header.backgroundColor = [UIColor colorWithWhite:1.0f alpha:0.8f];
return header;
}
#pragma mark - SSCollectionViewDelegate
- (CGSize)collectionView:(SSCollectionView *)aCollectionView itemSizeForSection:(NSUInteger)section {
return CGSizeMake(80.0f, 80.0f);
}
- (void)collectionView:(SSCollectionView *)aCollectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
NSString *title = [NSString stringWithFormat:@"You selected item %i in section %i!",
indexPath.row + 1, indexPath.section + 1];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:nil delegate:nil
cancelButtonTitle:@"Oh, awesome!" otherButtonTitles:nil];
[alert show];
}
- (CGFloat)collectionView:(SSCollectionView *)aCollectionView heightForHeaderInSection:(NSUInteger)section {
return 40.0f;
}
@end
//
// SCGradientViewDemoViewController.h
// SSCatalog
//
// Created by Sam Soffes on 10/27/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
@interface SCGradientViewDemoViewController : UIViewController
+ (NSString *)title;
- (void)changeColor:(id)sender;
- (void)updateScale:(id)sender;
@end
//
// SCGradientViewDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 10/27/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
#import "SCGradientViewDemoViewController.h"
@implementation SCGradientViewDemoViewController {
BOOL _blue;
SSGradientView *_gradientView;
}
#pragma mark - Class Methods
+ (NSString *)title {
return @"Gradient View";
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
self.view.backgroundColor = [UIColor whiteColor];
// Gradient view
_gradientView = [[SSGradientView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 280.0f, 280.0f)];
_gradientView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_gradientView.topBorderColor = [UIColor colorWithRed:0.558f green:0.599f blue:0.643f alpha:1.0f];
_gradientView.topInsetColor = [UIColor colorWithWhite:1.0f alpha:0.3f];
_gradientView.colors = [NSArray arrayWithObjects:
[UIColor colorWithRed:0.676f green:0.722f blue:0.765f alpha:1.0f],
[UIColor colorWithRed:0.514f green:0.568f blue:0.617f alpha:1.0f],
nil];
_gradientView.bottomBorderColor = [UIColor colorWithRed:0.428f green:0.479f blue:0.520f alpha:1.0f];
[self.view addSubview:_gradientView];
// Change color button
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.frame = CGRectMake(20.0f, 320.0f, 280.0f, 37.0f);
[button setTitle:@"Change Color" forState:UIControlStateNormal];
[button addTarget:self action:@selector(changeColor:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button];
// Scale slider
UISlider *scaleSlider = [[UISlider alloc] initWithFrame:CGRectMake(20.0f, 377.0f, 280.0f, 20.0f)];
scaleSlider.value = 1.0f;
scaleSlider.minimumValue = 0.0f;
scaleSlider.maximumValue = 1.0f;
[scaleSlider addTarget:self action:@selector(updateScale:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:scaleSlider];
_blue = YES;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
#pragma mark - Actions
- (void)changeColor:(id)sender {
if (_blue) {
_gradientView.colors = [NSArray arrayWithObjects:
[UIColor redColor],
[UIColor orangeColor],
nil];
} else {
_gradientView.colors = [NSArray arrayWithObjects:
[UIColor colorWithRed:0.676f green:0.722f blue:0.765f alpha:1.0f],
[UIColor colorWithRed:0.514f green:0.568f blue:0.617f alpha:1.0f],
nil];
}
_blue = !_blue;
}
- (void)updateScale:(id)sender {
_gradientView.gradientScale = [(UISlider *)sender value];
}
@end
//
// SCHUDViewDemoViewController.h
// SSCatalog
//
// Created by Sam Soffes on 11/18/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
@interface SCHUDViewDemoViewController : UIViewController
+ (NSString *)title;
- (void)complete:(id)sender;
- (void)pop:(id)sender;
@end
//
// SCHUDViewDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 11/18/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
#import "SCHUDViewDemoViewController.h"
@implementation SCHUDViewDemoViewController {
SSHUDView *_hud;
}
#pragma mark - Class Methods
+ (NSString *)title {
return @"HUD View";
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
self.view.backgroundColor = [UIColor whiteColor];
// Show HUD
_hud = [[SSHUDView alloc] initWithTitle:@"Loading..."];
// _hud.hudSize = CGSizeMake(60.0f, 60.0f);
// _hud.textLabelHidden = YES;
// _hud.hidesVignette = YES;
[_hud show];
// After 2 seconds, complete action
[self performSelector:@selector(complete:) withObject:nil afterDelay:2.0];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
#pragma mark - Actions
- (void)complete:(id)sender {
[_hud completeWithTitle:@"Finished"];
[self performSelector:@selector(pop:) withObject:nil afterDelay:0.7];
}
- (void)pop:(id)sender {
[_hud dismiss];
[self.navigationController popViewControllerAnimated:YES];
}
@end
//
// SCImageCollectionViewItem.h
// SSCatalog
//
// Created by Sam Soffes on 5/3/11.
// Copyright 2011 Sam Soffes. All rights reserved.
//
@interface SCImageCollectionViewItem : SSCollectionViewItem
@property (nonatomic, strong) NSURL *imageURL;
- (id)initWithReuseIdentifier:(NSString *)aReuseIdentifier;
@end
//
// SCImageCollectionViewItem.m
// SSCatalog
//
// Created by Sam Soffes on 5/3/11.
// Copyright 2011 Sam Soffes. All rights reserved.
//
#import "SCImageCollectionViewItem.h"
#import "UIImageView+AFNetworking.h"
@implementation SCImageCollectionViewItem
#pragma mark - Accessors
@synthesize imageURL = _imageURL;
- (void)setImageURL:(NSURL *)url {
_imageURL = url;
if (_imageURL) {
[self.imageView setImageWithURL:url placeholderImage:nil];
} else {
self.imageView.image = nil;
}
}
#pragma mark - Initializer
- (id)initWithReuseIdentifier:(NSString *)aReuseIdentifier {
if ((self = [super initWithStyle:SSCollectionViewItemStyleImage reuseIdentifier:aReuseIdentifier])) {
self.imageView.backgroundColor = [UIColor colorWithWhite:0.95f alpha:1.0f];
}
return self;
}
- (void)prepareForReuse {
[super prepareForReuse];
self.imageURL = nil;
}
@end
//
// SCLineViewDemoViewController.h
// SSCatalog
//
// Created by Sam Soffes on 4/19/10.
// Copyright 2010 Sam Soffes, Inc. All rights reserved.
//
@interface SCLineViewDemoViewController : UIViewController
+ (NSString *)title;
@end
//
// SCLineViewDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 4/19/10.
// Copyright 2010 Sam Soffes, Inc. All rights reserved.
//
#import "SCLineViewDemoViewController.h"
@implementation SCLineViewDemoViewController
#pragma mark - Class Methods
+ (NSString *)title {
return @"Line View";
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
self.view.backgroundColor = [UIColor colorWithRed:0.851f green:0.859f blue:0.882f alpha:1.0f];
SSLineView *lineView1 = [[SSLineView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 280.0f, 2.0f)];
[self.view addSubview:lineView1];
SSLineView *lineView2 = [[SSLineView alloc] initWithFrame:CGRectMake(20.0f, 42.0f, 280.0f, 2.0f)];
lineView2.lineColor = [UIColor blueColor];
[self.view addSubview:lineView2];
SSLineView *lineView3 = [[SSLineView alloc] initWithFrame:CGRectMake(20.0f, 64.0f, 280.0f, 2.0f)];
lineView3.lineColor = [UIColor orangeColor];
lineView3.dashLengths = [NSArray arrayWithObjects:[NSNumber numberWithFloat:5.0f], [NSNumber numberWithFloat:2.0f], nil];
[self.view addSubview:lineView3];
SSLineView *lineView4 = [[SSLineView alloc] initWithFrame:CGRectMake(20.0f, 86.0f, 280.0f, 2.0f)];
lineView4.lineColor = [UIColor greenColor];
lineView4.dashLengths = [NSArray arrayWithObjects:[NSNumber numberWithFloat:2.0f], [NSNumber numberWithFloat:2.0f], nil];
[self.view addSubview:lineView4];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
@end
//
// SCLoadingViewDemoViewController.h
// SSCatalog
//
// Created by Sam Soffes on 11/15/10.
// Copyright 2010 Sam Soffes. All rights reserved.
//
@interface SCLoadingViewDemoViewController : UIViewController
+ (NSString *)title;
@end
//
// SCLoadingViewDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 11/15/10.
// Copyright 2010 Sam Soffes. All rights reserved.
//
#import "SCLoadingViewDemoViewController.h"
@implementation SCLoadingViewDemoViewController
#pragma mark - Class Methods
+ (NSString *)title {
return @"Loading View";
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
self.view.backgroundColor = [UIColor colorWithRed:0.851f green:0.859f blue:0.882f alpha:1.0f];
CGSize size = self.view.frame.size;
SSLoadingView *loadingView = [[SSLoadingView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, size.width, size.height)];
[self.view addSubview:loadingView];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
@end
//
// SCPickerDemoViewController.h
// SSCatalog
//
// Created by Sam Soffes on 10/9/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
@interface SCPickerDemoViewController : UITableViewController
@property (nonatomic, strong) NSString *selectedAbbreviation;
+ (NSString *)title;
@end
//
// SCPickerDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 10/9/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
#import "SCPickerDemoViewController.h"
#import "SCPickerDetailViewController.h"
@implementation SCPickerDemoViewController
#pragma mark - Accessors
@synthesize selectedAbbreviation = _selectedAbbreviation;
#pragma mark - Class Methods
+ (NSString *)title {
return @"Settings Picker";
}
#pragma mark - NSObject
- (id)init {
return self = [super initWithStyle:UITableViewStyleGrouped];
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
self.selectedAbbreviation = [[NSTimeZone defaultTimeZone] abbreviation];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.tableView reloadData];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier];
}
cell.textLabel.text = @"Picker Value";
cell.detailTextLabel.text = [[NSTimeZone timeZoneWithAbbreviation:self.selectedAbbreviation] name];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
SCPickerDetailViewController *viewController = [[SCPickerDetailViewController alloc] initWithStyle:UITableViewStyleGrouped];
viewController.selectedKey = self.selectedAbbreviation;
[self.navigationController pushViewController:viewController animated:YES];
}
@end
//
// SCPickerDetailViewController.h
// SSCatalog
//
// Created by Sam Soffes on 10/9/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
@interface SCPickerDetailViewController : SSPickerViewController
@end
//
// SCPickerDetailViewController.m
// SSCatalog
//
// Created by Sam Soffes on 10/9/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
#import "SCPickerDetailViewController.h"
#import "SCPickerDemoViewController.h"
@implementation SCPickerDetailViewController
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Choose";
}
#pragma mark - SSPickerViewController
- (void)loadKeys {
self.keys = [[NSTimeZone abbreviationDictionary] allKeys];
}
- (NSString *)cellTextForKey:(NSString *)key {
return [[NSTimeZone timeZoneWithAbbreviation:key] name];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
// Notify the parent view controller of the change
SCPickerDemoViewController *viewController = (SCPickerDemoViewController *)[self.navigationController.viewControllers objectAtIndex:([self.navigationController.viewControllers count] - 2)];
viewController.selectedAbbreviation = [self.keys objectAtIndex:indexPath.row];
[self.navigationController popViewControllerAnimated:YES];
}
@end
//
// SCPieProgressViewDemoViewController.h
// SSCatalog
//
// Created by Sam Soffes on 4/22/10.
// Copyright 2010 Sam Soffes, Inc. All rights reserved.
//
@interface SCPieProgressViewDemoViewController : UIViewController
+ (NSString *)title;
- (void)incrementProgress:(NSTimer *)timer;
@end
//
// SCPieProgressViewDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 4/22/10.
// Copyright 2010 Sam Soffes, Inc. All rights reserved.
//
#import "SCPieProgressViewDemoViewController.h"
@implementation SCPieProgressViewDemoViewController {
SSPieProgressView *_progressView7;
NSTimer *_timer;
}
#pragma mark - Class Methods
+ (NSString *)title {
return @"Pie Progress View";
}
#pragma mark - NSObject
- (void)dealloc {
[_timer invalidate];
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
self.view.backgroundColor = [UIColor colorWithRed:0.851f green:0.859f blue:0.882f alpha:1.0f];
SSPieProgressView *progressView1 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 55.0f, 55.0f)];
progressView1.progress = 0.25;
[self.view addSubview:progressView1];
SSPieProgressView *progressView2 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(95.0f, 20.0f, 55.0f, 55.0f)];
progressView2.progress = 0.50;
[self.view addSubview:progressView2];
SSPieProgressView *progressView3 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(170.0f, 20.0f, 55.0f, 55.0f)];
progressView3.progress = 0.75;
[self.view addSubview:progressView3];
SSPieProgressView *progressView4 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(245.0f, 20.0f, 55.0f, 55.0f)];
progressView4.progress = 1.0;
[self.view addSubview:progressView4];
SSPieProgressView *progressView5 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(20.0f, 95.0f, 130.0f, 130.0f)];
progressView5.progress = 0.33;
[self.view addSubview:progressView5];
SSPieProgressView *progressView6 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(170.0f, 95.0f, 130.0f, 130.0f)];
progressView6.progress = 0.66;
[self.view addSubview:progressView6];
_progressView7 = [[SSPieProgressView alloc] initWithFrame:CGRectMake(95.0f, 245.0f, 130.0f, 130.0f)];
[self.view addSubview:_progressView7];
_timer = [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(incrementProgress:) userInfo:nil repeats:YES];
}
- (void)viewDidUnload {
[super viewDidUnload];
[_timer invalidate];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
#pragma mark - Timer
- (void)incrementProgress:(NSTimer *)timer {
_progressView7.progress = _progressView7.progress + 0.01;
if (_progressView7.progress == 1.0f) {
_progressView7.progress = 0.0;
}
}
@end
//
// SCRootViewController.h
// SSCatalog
//
// Created by Sam Soffes on 10/9/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
@interface SCRootViewController : UITableViewController
@end
//
// SCRootViewController.m
// SSCatalog
//
// Created by Sam Soffes on 10/9/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
#import "SCRootViewController.h"
#import "SCPickerDemoViewController.h"
#import "SCGradientViewDemoViewController.h"
static NSString *const kTitleKey = @"title";
static NSString *const kClassesKey = @"classes";
@interface UIViewController (SCRootViewControllerAdditions)
+ (id)setup;
@end
@implementation SCRootViewController {
NSArray *_viewControllers;
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"SSCatalog";
_viewControllers = [[NSArray alloc] initWithObjects:
[NSDictionary dictionaryWithObjectsAndKeys:
[NSArray arrayWithObjects:
@"SCBadgeTableViewCellDemoViewController",
@"SCCollectionViewDemoViewController",
@"SCGradientViewDemoViewController",
@"SCHUDViewDemoViewController",
@"SCLineViewDemoViewController",
@"SCLoadingViewDemoViewController",
@"SCPieProgressViewDemoViewController",
nil], kClassesKey,
@"Views", kTitleKey,
nil],
[NSDictionary dictionaryWithObjectsAndKeys:
[NSArray arrayWithObjects:
@"SCAddressBarDemoViewController",
nil], kClassesKey,
@"Controls", kTitleKey,
nil],
[NSDictionary dictionaryWithObjectsAndKeys:
[NSArray arrayWithObjects:
@"SCPickerDemoViewController",
@"SSRatingDemoViewController",
nil], kClassesKey,
@"View Controllers", kTitleKey,
nil],
nil];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
return YES;
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return [_viewControllers count];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [[[_viewControllers objectAtIndex:section] objectForKey:kClassesKey] count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; }
Class klass = [[NSBundle mainBundle] classNamed:[[[_viewControllers objectAtIndex:indexPath.section] objectForKey:kClassesKey] objectAtIndex:indexPath.row]];
cell.textLabel.text = [klass title];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
return [[_viewControllers objectAtIndex:section] objectForKey:kTitleKey];
}
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
Class klass = [[NSBundle mainBundle] classNamed:[[[_viewControllers objectAtIndex:indexPath.section] objectForKey:kClassesKey] objectAtIndex:indexPath.row]];
UIViewController *viewController = [[klass alloc] init];
[self.navigationController pushViewController:viewController animated:YES];
}
@end
//
// SSRatingDemoViewController.h
// SSCatalog
//
// Created by Sam Soffes on 2/3/11.
// Copyright 2011 Sam Soffes. All rights reserved.
//
@interface SSRatingDemoViewController : SSRatingPickerViewController
+ (NSString *)title;
@end
//
// SSRatingDemoViewController.m
// SSCatalog
//
// Created by Sam Soffes on 2/3/11.
// Copyright 2011 Sam Soffes. All rights reserved.
//
#import "SSRatingDemoViewController.h"
@implementation SSRatingDemoViewController
#pragma mark - Class Methods
+ (NSString *)title {
return @"Rating Picker";
}
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [[self class] title];
}
@end
Copyright (c) 2008-2011 Sam Soffes
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.
//
// SSCatalog_Prefix.pch
// SSCatalog
//
// Created by Sam Soffes on 9/21/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
// Prefix header for all source files of the 'SSCatalog' target in the 'SSCatalog' project
//
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <SSToolkit/SSToolkit.h>
#endif
//
// main.m
// SSCatalog
//
// Created by Sam Soffes on 9/21/09.
// Copyright 2009 Sam Soffes, Inc. All rights reserved.
//
#import "SCAppDelegate.h"
int main(int argc, char *argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([SCAppDelegate class]));
}
}
platform :ios
pod 'AFNetworking'
pod 'SSToolkit'
# SSCatalog
SSCatalog is an example application to demonstrate various features of [SSToolkit](https://github.com/samsoffes/sstoolkit).
To get the source code, run the following command:
$ git clone https://github.com/samsoffes/sscatalog.git --recursive
If you are seeing errors that SSToolkit isn't found, you probably forgot the `--recursive` flag. You can initialize the submodules manually by running the following in the SSCatalog directory:
$ git submodule update --init --recursive
If you have trouble getting SSCatalog running, please open an issue.
<?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>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleDocumentTypes</key>
<array/>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon-29.png</string>
<string>Icon-48.png</string>
<string>Icon-72.png</string>
<string>Icon-114.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>com.samsoffes.sscatalog</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchImageFile~iphone</key>
<string>Default.png</string>
<key>UIPrerenderedIcon</key>
<true/>
<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>
<key>UTExportedTypeDeclarations</key>
<array/>
<key>UTImportedTypeDeclarations</key>
<array/>
</dict>
</plist>
<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:Pods/Pods.xcodeproj'/><FileRef location='group:SSCatalog.xcodeproj'/></Workspace>
\ No newline at end of file
PODS:
PODS:
- JSONKit (1.5pre)
DEPENDENCIES:
- JSONKit
COCOAPODS: 0.16.1
SPEC CHECKSUMS:
JSONKit: a01a22c75f27eae76b4badd55a91c20fe6e86477
DEPENDENCIES:
- JSONKit
COCOAPODS: 0.16.0.rc2
SPEC CHECKSUMS:
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
require 'rubygems'
module Pod
require 'cocoapods-core'
require 'cocoapods/downloader'
require 'cocoapods/file_list'
require 'cocoapods/config'
require 'cocoapods/dependency_injection'
require 'cocoapods/gem_version'
# Indicates a runtime error **not** caused by a bug.
......@@ -22,6 +16,12 @@ module Pod
end
end
require 'cocoapods-core'
require 'cocoapods/downloader'
require 'cocoapods/file_list'
require 'cocoapods/config'
require 'cocoapods/dependency_injection'
autoload :Command, 'cocoapods/command'
autoload :Executable, 'cocoapods/executable'
autoload :ExternalSources, 'cocoapods/external_sources'
......
......@@ -15,6 +15,7 @@ module Pod
klass = if params.key?(:git) then GitSource
elsif params.key?(:svn) then SvnSource
elsif params.key?(:hg) then MercurialSource
elsif params.key?(:podspec) then PodspecSource
elsif params.key?(:local) then LocalSource
end
......@@ -211,7 +212,7 @@ module Pod
UI.info("->".green + " Pre-downloading: `#{name}`") do
target = sandbox.root + name
target.rmtree if target.exist?
downloader = Downloader.for_target(sandbox.root + name, @params)
downloader = Downloader.for_target(target, @params)
downloader.download
store_podspec(sandbox, target + "#{name}.podspec")
sandbox.predownloaded_pods << name
......@@ -231,6 +232,45 @@ module Pod
#-------------------------------------------------------------------------#
# Provides support for fetching a specification file from a Svn source
# remote.
#
# Supports all the options of the downloader (is similar to the git key of
# `source` attribute of a specification).
#
# @note The podspec must be in the root of the repository and should have a
# name matching the one of the dependency.
#
class MercurialSource < AbstractExternalSource
# @see AbstractExternalSource#copy_external_source_into_sandbox
#
# @note To prevent a double download of the repository the pod is marked
# as pre-downloaded indicating to the installer that only clean
# operations are needed.
#
def copy_external_source_into_sandbox(sandbox)
UI.info("->".green + " Pre-downloading: `#{name}`") do
target = sandbox.root + name
target.rmtree if target.exist?
downloader = Downloader.for_target(target, @params)
downloader.download
store_podspec(sandbox, target + "#{name}.podspec")
sandbox.predownloaded_pods << name
end
end
# @see AbstractExternalSource#description
#
def description
"from `#{@params[:hg]}`".tap do |description|
description << ", revision `#{@params[:revision]}`" if @params[:revision]
end
end
end
#-------------------------------------------------------------------------#
# Provides support for fetching a specification file from an URL. Can be
# http, file, etc.
#
......
......@@ -8,12 +8,12 @@ install_resource()
{
case $1 in
*\.storyboard)
echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$1\\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$1\\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*\.xib)
echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$1\\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$1\\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.framework)
echo "rsync -rp ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
......
......@@ -91,6 +91,11 @@ module Pod
library.target = @target
end
ENABLE_OBJECT_USE_OBJC_FROM = {
:ios => Version.new('6'),
:osx => Version.new('10.8')
}
# Adds the build files of the pods to the target and adds a reference to
# the frameworks of the Pods.
#
......@@ -103,9 +108,7 @@ module Pod
UI.message "- Adding Build files" do
library.file_accessors.each do |file_accessor|
consumer = file_accessor.spec_consumer
flags = consumer.compiler_flags.dup
flags << '-fobjc-arc' if consumer.requires_arc
flags = flags * " "
flags = compiler_flags_for_consumer(consumer)
source_files = file_accessor.source_files
file_refs = source_files.map { |sf| project.file_reference(sf) }
target.add_file_references(file_refs, flags)
......@@ -312,6 +315,57 @@ module Pod
relative_path = path.relative_path_from(sandbox.root)
support_files_group.new_file(relative_path)
end
# Returns the compiler flags for the source files of the given specification.
#
# The following behavior is regarding the `OS_OBJECT_USE_OBJC` flag. When
# set to `0`, it will allow code to use `dispatch_release()` on >= iOS 6.0
# and OS X 10.8.
#
# * New libraries that do *not* require ARC don’t need to care about this
# issue at all.
#
# * New libraries that *do* require ARC _and_ have a deployment target of
# >= iOS 6.0 or OS X 10.8:
#
# These no longer use `dispatch_release()` and should *not* have the
# `OS_OBJECT_USE_OBJC` flag set to `0`.
#
# **Note:** this means that these libraries *have* to specify the
# deployment target in order to function well.
#
# * New libraries that *do* require ARC, but have a deployment target of
# < iOS 6.0 or OS X 10.8:
#
# These contain `dispatch_release()` calls and as such need the
# `OS_OBJECT_USE_OBJC` flag set to `1`.
#
# **Note:** libraries that do *not* specify a platform version are
# assumed to have a deployment target of < iOS 6.0 or OS X 10.8.
#
# For more information, see: http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h
#
# @param [Specification::Consumer] consumer
# The consumer for the specification for wich the compiler flags
# are needed.
#
# @return [String] The compiler flags.
#
def compiler_flags_for_consumer(consumer)
flags = consumer.compiler_flags.dup
if consumer.requires_arc
flags << '-fobjc-arc'
platform_name = consumer.platform.symbolic_name unless consumer.platform.is_a?(Symbol) #TODO
spec_deployment_target = consumer.spec.deployment_target(platform_name)
if spec_deployment_target.nil? || Version.new(spec_deployment_target) < ENABLE_OBJECT_USE_OBJC_FROM[platform_name]
flags << '-DOS_OBJECT_USE_OBJC=0'
end
end
flags = flags * " "
end
#-----------------------------------------------------------------------#
end
end
end
......
Removed comments.
\ No newline at end of file
data/MercurialSource.podspec.i
data/README.i
1 3d2759856083e6dbb5b5d0b702aa625b5b21a10a
1 3d2759856083e6dbb5b5d0b702aa625b5b21a10a
Pod::Spec.new do |s|
s.name = "MercurialSource"
s.version = "0.0.1"
s.summary = "A short description of MercurialSource."
s.homepage = "http://EXAMPLE/MercurialSource"
s.license = 'MIT (example)'
s.author = { "Dan Cutting" => "dcutting@gmail.com" }
s.source = { :git => "http://EXAMPLE/MercurialSource.git", :tag => "0.0.1" }
s.source_files = 'Classes', 'Classes/**/*.{h,m}'
end
......@@ -111,6 +111,31 @@ module Pod
#---------------------------------------------------------------------------#
describe ExternalSources::MercurialSource do
before do
dependency = Dependency.new("MercurialSource", :hg => fixture('mercurial-repo'))
@external_source = ExternalSources.from_dependency(dependency)
end
it "creates a copy of the podspec" do
@external_source.copy_external_source_into_sandbox(config.sandbox)
path = config.sandbox.root + 'Local Podspecs/MercurialSource.podspec'
path.should.exist?
end
it "marks a LocalPod as downloaded" do
@external_source.copy_external_source_into_sandbox(config.sandbox)
config.sandbox.predownloaded_pods.should == ["MercurialSource"]
end
it "returns the description" do
@external_source.description.should.match %r|from `.*/mercurial-repo`|
end
end
#---------------------------------------------------------------------------#
describe ExternalSources::PodspecSource do
before do
......
......@@ -48,6 +48,11 @@ module Pod
#--------------------------------------#
xit "sets the deployment target of the native target" do
# Test iOS and OS X
# @see https://github.com/CocoaPods/CocoaPods/commit/76b5b7f9c02a4d36425bde745ecd6d7ff289a00d
end
it 'adds the target for the static library to the project' do
@installer.install!
@project.targets.count.should == 1
......@@ -204,6 +209,52 @@ module Pod
dummy = config.sandbox.root + 'Pods-dummy.m'
dummy.read.should.include?('@interface PodsDummy_Pods')
end
#--------------------------------------------------------------------------------#
describe "concerning ARC before and after iOS 6.0 and OS X 10.8" do
before do
@spec = Pod::Spec.new
end
it "does not do anything if ARC is *not* required" do
@spec.requires_arc = false
@spec.ios.deployment_target = '5'
@spec.osx.deployment_target = '10.6'
ios_flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:ios))
osx_flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:osx))
ios_flags.should.not.include '-DOS_OBJECT_USE_OBJC'
osx_flags.should.not.include '-DOS_OBJECT_USE_OBJC'
end
it "does *not* disable the `OS_OBJECT_USE_OBJC` flag if ARC is required and has a deployment target of >= iOS 6.0 or OS X 10.8" do
@spec.requires_arc = false
@spec.ios.deployment_target = '6'
@spec.osx.deployment_target = '10.8'
ios_flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:ios))
osx_flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:osx))
ios_flags.should.not.include '-DOS_OBJECT_USE_OBJC'
osx_flags.should.not.include '-DOS_OBJECT_USE_OBJC'
end
it "*does* disable the `OS_OBJECT_USE_OBJC` flag if ARC is required but has a deployment target < iOS 6.0 or OS X 10.8" do
@spec.requires_arc = true
@spec.ios.deployment_target = '5.1'
@spec.osx.deployment_target = '10.7.2'
ios_flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:ios))
osx_flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:osx))
ios_flags.should.include '-DOS_OBJECT_USE_OBJC'
osx_flags.should.include '-DOS_OBJECT_USE_OBJC'
end
it "*does* disable the `OS_OBJECT_USE_OBJC` flag if ARC is required and *no* deployment target is specified" do
@spec.requires_arc = true
ios_flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:ios))
osx_flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:osx))
ios_flags.should.include '-DOS_OBJECT_USE_OBJC'
osx_flags.should.include '-DOS_OBJECT_USE_OBJC'
end
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment