Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

26 changes: 12 additions & 14 deletions EZLoadingActivity.podspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
Pod::Spec.new do |s|
s.name = "EZLoadingActivity"
s.version = "1.01"
s.summary = "Lightweight Swift loading activity for iOS7+"
s.description = "Lightweight Swift loading activity for iOS7+. Really simple to use, just add the class and write 1 line of code."
s.homepage = "https://github.com/goktugyil/EZLoadingActivity"
s.license = 'MIT'
s.author = { "goktugyil" => "[email protected]" }
s.source = { :git => "https://github.com/goktugyil/EZLoadingActivity.git", :tag => s.version.to_s }
s.platform = :ios, '8.0'
s.requires_arc = true

# If more than one source file: https://guides.cocoapods.org/syntax/podspec.html#source_files
s.source_files = 'EZLoadingActivity.swift'

s.name = "EZLoadingActivity"
s.version = "1.2"
s.summary = "Lightweight Swift loading activity for iOS8+"
s.description = "Lightweight Swift loading activity for iOS8+. Really simple to use, just add the class and write 1 line of code."
s.homepage = "https://github.com/goktugyil/EZLoadingActivity"
s.license = 'MIT'
s.author = { "goktugyil" => "[email protected]" }
s.source = { :git => "https://github.com/goktugyil/EZLoadingActivity.git", :tag => s.version.to_s }
s.platform = :ios, '8.0'
s.swift_version = '4.2'
s.requires_arc = true
s.source_files = 'EZLoadingActivity.swift'
end
14 changes: 7 additions & 7 deletions EZLoadingActivity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public struct EZLoadingActivity {

let yPosition = frame.height/2 - 20

activityView = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.whiteLarge)
activityView = UIActivityIndicatorView(style: UIActivityIndicatorView.Style.whiteLarge)
activityView.frame = CGRect(x: 10, y: yPosition, width: 40, height: 40)
activityView.color = Settings.ActivityColor
activityView.startAnimating()
Expand Down Expand Up @@ -285,17 +285,17 @@ private extension UIView {
/// Extension: insert view.fadeTransition right before changing content
func fadeTransition(_ duration: CFTimeInterval) {
let animation: CATransition = CATransition()
animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
animation.type = kCATransitionFade
animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
animation.type = CATransitionType.fade
animation.duration = duration
self.layer.add(animation, forKey: kCATransitionFade)
self.layer.add(animation, forKey: CATransitionType.fade.rawValue)
}
}

private extension NSObject {
func callSelectorAsync(_ selector: Selector, delay: TimeInterval) {
let timer = Timer.scheduledTimer(timeInterval: delay, target: self, selector: selector, userInfo: nil, repeats: false)
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
RunLoop.main.add(timer, forMode: RunLoop.Mode.common)
}
}

Expand All @@ -307,7 +307,7 @@ private extension UIScreen {
}
class var ScreenWidth: CGFloat {
get {
if UIInterfaceOrientationIsPortrait(Orientation) {
if Orientation.isPortrait {
return UIScreen.main.bounds.size.width
} else {
return UIScreen.main.bounds.size.height
Expand All @@ -316,7 +316,7 @@ private extension UIScreen {
}
class var ScreenHeight: CGFloat {
get {
if UIInterfaceOrientationIsPortrait(Orientation) {
if Orientation.isPortrait {
return UIScreen.main.bounds.size.height
} else {
return UIScreen.main.bounds.size.width
Expand Down
32 changes: 23 additions & 9 deletions EZLoadingActivity.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@
E13884661C02D85500663C96 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = "Goktug Yilmaz";
TargetAttributes = {
1F764D521C1EA1AF007C51AD = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
};
E138846D1C02D85500663C96 = {
CreatedOnToolsVersion = 7.0.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
};
};
};
Expand Down Expand Up @@ -254,7 +254,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.gbf.EZLoadingActivity-iOS";
PRODUCT_NAME = EZLoadingActivity;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -276,7 +275,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.gbf.EZLoadingActivity-iOS";
PRODUCT_NAME = EZLoadingActivity;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -290,14 +288,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -325,7 +331,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -338,14 +344,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand All @@ -366,7 +380,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -381,7 +395,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.gbf.EZLoadingActivity;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
};
name = Debug;
};
Expand All @@ -394,7 +408,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.gbf.EZLoadingActivity;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down