Skip to content

Commit

Permalink
add example of UIActivityItemProvider and UIActivityItemSource; use b…
Browse files Browse the repository at this point in the history
…uilt-in AVPlayer time observer instead of NSTimer
  • Loading branch information
mattneub committed Oct 1, 2015
1 parent 78ce5d0 commit 4b6d328
Show file tree
Hide file tree
Showing 10 changed files with 567 additions and 11 deletions.
@@ -0,0 +1,289 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
3217DF21199688DF001092A9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3217DF20199688DF001092A9 /* ViewController.swift */; };
3219EB3C1BB0F58E0037939C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3219EB3B1BB0F58E0037939C /* AppDelegate.swift */; settings = {ASSET_TAGS = (); }; };
3219EB3E1BB0F5B10037939C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3219EB3D1BB0F5B10037939C /* LaunchScreen.storyboard */; settings = {ASSET_TAGS = (); }; };
C97D40F61822B36D002DFE75 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C97D40F41822B36D002DFE75 /* Main.storyboard */; };
C97D40FB1822B36D002DFE75 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C97D40FA1822B36D002DFE75 /* Assets.xcassets */; };
C97D41231822B626002DFE75 /* sunglasses.png in Resources */ = {isa = PBXBuildFile; fileRef = C97D41221822B626002DFE75 /* sunglasses.png */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
3217DF20199688DF001092A9 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
3219EB3B1BB0F58E0037939C /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3219EB3D1BB0F5B10037939C /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
C97D40DF1822B36D002DFE75 /* ch26p901activityView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ch26p901activityView.app; sourceTree = BUILT_PRODUCTS_DIR; };
C97D40EA1822B36D002DFE75 /* ch26p901activityView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ch26p901activityView-Info.plist"; sourceTree = "<group>"; };
C97D40F51822B36D002DFE75 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
C97D40FA1822B36D002DFE75 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
C97D41221822B626002DFE75 /* sunglasses.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sunglasses.png; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
C97D40DC1822B36D002DFE75 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
C97D40D61822B36D002DFE75 = {
isa = PBXGroup;
children = (
C97D40E81822B36D002DFE75 /* ch26p901activityView */,
C97D40E01822B36D002DFE75 /* Products */,
);
sourceTree = "<group>";
};
C97D40E01822B36D002DFE75 /* Products */ = {
isa = PBXGroup;
children = (
C97D40DF1822B36D002DFE75 /* ch26p901activityView.app */,
);
name = Products;
sourceTree = "<group>";
};
C97D40E81822B36D002DFE75 /* ch26p901activityView */ = {
isa = PBXGroup;
children = (
3219EB3B1BB0F58E0037939C /* AppDelegate.swift */,
C97D40F41822B36D002DFE75 /* Main.storyboard */,
3217DF20199688DF001092A9 /* ViewController.swift */,
C97D41221822B626002DFE75 /* sunglasses.png */,
C97D40FA1822B36D002DFE75 /* Assets.xcassets */,
3219EB3D1BB0F5B10037939C /* LaunchScreen.storyboard */,
C97D40EA1822B36D002DFE75 /* ch26p901activityView-Info.plist */,
);
path = ch26p901activityView;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
C97D40DE1822B36D002DFE75 /* ch26p901activityView */ = {
isa = PBXNativeTarget;
buildConfigurationList = C97D41111822B36D002DFE75 /* Build configuration list for PBXNativeTarget "ch26p901activityView" */;
buildPhases = (
C97D40DB1822B36D002DFE75 /* Sources */,
C97D40DC1822B36D002DFE75 /* Frameworks */,
C97D40DD1822B36D002DFE75 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = ch26p901activityView;
productName = ch26p901activityView;
productReference = C97D40DF1822B36D002DFE75 /* ch26p901activityView.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
C97D40D71822B36D002DFE75 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = "Matt Neuburg";
};
buildConfigurationList = C97D40DA1822B36D002DFE75 /* Build configuration list for PBXProject "ch26p901activityView" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = C97D40D61822B36D002DFE75;
productRefGroup = C97D40E01822B36D002DFE75 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
C97D40DE1822B36D002DFE75 /* ch26p901activityView */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
C97D40DD1822B36D002DFE75 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C97D40FB1822B36D002DFE75 /* Assets.xcassets in Resources */,
C97D41231822B626002DFE75 /* sunglasses.png in Resources */,
3219EB3E1BB0F5B10037939C /* LaunchScreen.storyboard in Resources */,
C97D40F61822B36D002DFE75 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
C97D40DB1822B36D002DFE75 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3217DF21199688DF001092A9 /* ViewController.swift in Sources */,
3219EB3C1BB0F58E0037939C /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
C97D40F41822B36D002DFE75 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
C97D40F51822B36D002DFE75 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
C97D410F1822B36D002DFE75 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"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_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
C97D41101822B36D002DFE75 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
C97D41121822B36D002DFE75 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ch26p901activityView/ch26p901activityView-Prefix.pch";
INFOPLIST_FILE = "ch26p901activityView/ch26p901activityView-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
C97D41131822B36D002DFE75 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ch26p901activityView/ch26p901activityView-Prefix.pch";
INFOPLIST_FILE = "ch26p901activityView/ch26p901activityView-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
C97D40DA1822B36D002DFE75 /* Build configuration list for PBXProject "ch26p901activityView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C97D410F1822B36D002DFE75 /* Debug */,
C97D41101822B36D002DFE75 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C97D41111822B36D002DFE75 /* Build configuration list for PBXNativeTarget "ch26p901activityView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C97D41121822B36D002DFE75 /* Debug */,
C97D41131822B36D002DFE75 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = C97D40D71822B36D002DFE75 /* Project object */;
}
12 changes: 12 additions & 0 deletions bk2ch13p635activityView2/ch26p901activityView/AppDelegate.swift
@@ -0,0 +1,12 @@
import UIKit

@UIApplicationMain
class AppDelegate : UIResponder, UIApplicationDelegate {
var window : UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

return true
}
}

@@ -0,0 +1,38 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,23 @@
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"subtype" : "retina4",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

0 comments on commit 4b6d328

Please sign in to comment.