Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Damon authored and Damon committed Aug 15, 2016
1 parent 39d10df commit b3b52b3
Show file tree
Hide file tree
Showing 6 changed files with 347 additions and 0 deletions.
137 changes: 137 additions & 0 deletions FullScreenActivity.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
#
# Be sure to run `pod spec lint FullScreenActivity.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

Pod::Spec.new do |s|

# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#

s.name = "FullScreenActivity"
s.version = "0.0.1"
s.summary = "A short description of FullScreenActivity."

# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
DESC

s.homepage = "https://github.com/DamonChen117/FullScreenActivity"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"


# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#

s.license = "MIT"
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }


# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#

s.author = { "" => "" }
# Or just: s.author = ""
# s.authors = { "" => "" }
# s.social_media_url = "http://twitter.com/"

# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#

# s.platform = :ios
s.platform = :ios, "9.0"

# When using multiple platforms
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# s.watchos.deployment_target = "2.0"
# s.tvos.deployment_target = "9.0"


# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#

s.source = { :git => "https://github.com/DamonChen117/FullScreenActivity.git", :tag => "#{s.version}" }


# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#

s.source_files = "FullScreenActivity/**/*.{swift,h,m}"
# s.exclude_files = "Classes/Exclude"

# s.public_header_files = "Classes/**/*.h"


# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#

# s.resource = "icon.png"
s.resources = "FullScreenActivity/*.xib"

# s.preserve_paths = "FilesToSave", "MoreFilesToSave"


# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#

# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"

# s.library = "iconv"
# s.libraries = "iconv", "xml2"


# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.

s.requires_arc = true

# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "JSONKit", "~> 1.4"

end
15 changes: 15 additions & 0 deletions FullScreenActivity.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@

/* Begin PBXBuildFile section */
E4A6D3251D61973600EA5E69 /* FullScreenActivity.h in Headers */ = {isa = PBXBuildFile; fileRef = E4A6D3241D61973600EA5E69 /* FullScreenActivity.h */; settings = {ATTRIBUTES = (Public, ); }; };
E4A6D32F1D61976B00EA5E69 /* FullScreenActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4A6D32C1D61976B00EA5E69 /* FullScreenActivity.swift */; };
E4A6D3301D61976B00EA5E69 /* FullScreenActivity.xib in Resources */ = {isa = PBXBuildFile; fileRef = E4A6D32D1D61976B00EA5E69 /* FullScreenActivity.xib */; };
E4A6D3311D61976B00EA5E69 /* UIView+FullScreenActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4A6D32E1D61976B00EA5E69 /* UIView+FullScreenActivity.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
E4A6D3211D61973600EA5E69 /* FullScreenActivity.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FullScreenActivity.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E4A6D3241D61973600EA5E69 /* FullScreenActivity.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FullScreenActivity.h; sourceTree = "<group>"; };
E4A6D3261D61973600EA5E69 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E4A6D32C1D61976B00EA5E69 /* FullScreenActivity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FullScreenActivity.swift; sourceTree = "<group>"; };
E4A6D32D1D61976B00EA5E69 /* FullScreenActivity.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FullScreenActivity.xib; sourceTree = "<group>"; };
E4A6D32E1D61976B00EA5E69 /* UIView+FullScreenActivity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+FullScreenActivity.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -46,6 +52,9 @@
E4A6D3231D61973600EA5E69 /* FullScreenActivity */ = {
isa = PBXGroup;
children = (
E4A6D32C1D61976B00EA5E69 /* FullScreenActivity.swift */,
E4A6D32D1D61976B00EA5E69 /* FullScreenActivity.xib */,
E4A6D32E1D61976B00EA5E69 /* UIView+FullScreenActivity.swift */,
E4A6D3241D61973600EA5E69 /* FullScreenActivity.h */,
E4A6D3261D61973600EA5E69 /* Info.plist */,
);
Expand Down Expand Up @@ -120,6 +129,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E4A6D3301D61976B00EA5E69 /* FullScreenActivity.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -130,6 +140,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E4A6D3311D61976B00EA5E69 /* UIView+FullScreenActivity.swift in Sources */,
E4A6D32F1D61976B00EA5E69 /* FullScreenActivity.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -230,6 +242,7 @@
E4A6D32A1D61973600EA5E69 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -240,12 +253,14 @@
PRODUCT_BUNDLE_IDENTIFIER = com.damon.FullScreenActivity;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
E4A6D32B1D61973600EA5E69 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4A6D3201D61973600EA5E69"
BuildableName = "FullScreenActivity.framework"
BlueprintName = "FullScreenActivity"
ReferencedContainer = "container:FullScreenActivity.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand All @@ -26,6 +42,15 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4A6D3201D61973600EA5E69"
BuildableName = "FullScreenActivity.framework"
BlueprintName = "FullScreenActivity"
ReferencedContainer = "container:FullScreenActivity.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand All @@ -35,6 +60,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4A6D3201D61973600EA5E69"
BuildableName = "FullScreenActivity.framework"
BlueprintName = "FullScreenActivity"
ReferencedContainer = "container:FullScreenActivity.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
41 changes: 41 additions & 0 deletions FullScreenActivity/FullScreenActivity.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// FullScreenToastActivity.swift
// AdClear Lite
//
// Created by Damon on 16/8/15.
// Copyright © 2016年 Seven. All rights reserved.
//

import UIKit

class FullScreenActivity: UIView {

@IBOutlet weak var activityCenter: NSLayoutConstraint!
@IBOutlet weak var messageLabel: UILabel!

static func create() -> FullScreenActivity {
let view = UINib(nibName: "FullScreenActivity", bundle: nil).instantiateWithOwner(nil, options: nil)[0]

return view as! FullScreenActivity
}

var message:String? {
set{
messageLabel.text = message

if message == nil
{
activityCenter.constant = 0
}
else
{
activityCenter.constant = -15
}
}

get {
return messageLabel.text
}
}

}
63 changes: 63 additions & 0 deletions FullScreenActivity/FullScreenActivity.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="FullScreenActivity" customModule="AdClear_Lite" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6F5-LE-eAR">
<rect key="frame" x="240" y="240" width="120" height="120"/>
<subviews>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="vtY-YP-UAh">
<rect key="frame" x="41" y="42" width="37" height="37"/>
<constraints>
<constraint firstAttribute="height" constant="37" id="h1I-7d-2Xq"/>
<constraint firstAttribute="width" constant="37" id="hDF-oT-zHQ"/>
</constraints>
</activityIndicatorView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="znv-VL-PnQ">
<rect key="frame" x="8" y="91" width="104" height="21"/>
<constraints>
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="300" id="04I-li-hZN"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="104" id="JNA-h8-PXJ"/>
<constraint firstAttribute="height" constant="21" id="iRW-XT-f8K"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="120" id="6o3-aQ-5kE"/>
<constraint firstItem="znv-VL-PnQ" firstAttribute="leading" secondItem="6F5-LE-eAR" secondAttribute="leading" constant="8" id="IE3-ep-sAi"/>
<constraint firstAttribute="trailing" secondItem="znv-VL-PnQ" secondAttribute="trailing" constant="8" id="Us4-7Q-UkY"/>
<constraint firstItem="znv-VL-PnQ" firstAttribute="top" secondItem="vtY-YP-UAh" secondAttribute="bottom" constant="12" id="bbp-jm-Vmp"/>
<constraint firstItem="vtY-YP-UAh" firstAttribute="centerY" secondItem="6F5-LE-eAR" secondAttribute="centerY" id="vLV-ql-8kb"/>
<constraint firstItem="vtY-YP-UAh" firstAttribute="centerX" secondItem="6F5-LE-eAR" secondAttribute="centerX" id="xC9-jX-7G2"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="6F5-LE-eAR" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="TIQ-h1-aCm"/>
<constraint firstItem="6F5-LE-eAR" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="jXU-s9-nGD"/>
</constraints>
<connections>
<outlet property="activityCenter" destination="vLV-ql-8kb" id="Hyx-HT-MWK"/>
<outlet property="messageLabel" destination="znv-VL-PnQ" id="o8N-JC-d1n"/>
</connections>
</view>
</objects>
</document>
Loading

0 comments on commit b3b52b3

Please sign in to comment.