Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
xcode 9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hongxinhope committed Apr 8, 2018
1 parent 7510cca commit e690422
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 21 deletions.
6 changes: 5 additions & 1 deletion RefreshDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = ZouLiangming;
TargetAttributes = {
86ECCB291C97F535008A6D58 = {
Expand Down Expand Up @@ -217,12 +217,14 @@
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;
Expand Down Expand Up @@ -271,12 +273,14 @@
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;
Expand Down
12 changes: 6 additions & 6 deletions RefreshDemo/SecondViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class SecondViewController: UITableViewController {
let minseconds = 2 * Double(NSEC_PER_SEC)
let dtime = DispatchTime.now() + Double(Int64(minseconds)) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: dtime, execute: {
for i in 1...10 {
self.content.append(String(i))
for index in 1...10 {
self.content.append(String(index))
self.tableView.reloadData()
self.tableView.isShowLoadingView = false
self.tableView.refreshFooter?.isShowLoadingView = true
Expand All @@ -43,8 +43,8 @@ class SecondViewController: UITableViewController {
let dtime = DispatchTime.now() + Double(Int64(minseconds)) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: dtime, execute: {
let count = self.content.count
for i in count+1...count+5 {
self.content.append(String(i))
for index in count+1...count+5 {
self.content.append(String(index))
self.tableView.reloadData()
}
self.tableView.refreshHeader?.endRefreshing()
Expand All @@ -58,8 +58,8 @@ class SecondViewController: UITableViewController {
let dtime = DispatchTime.now() + Double(Int64(minseconds)) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: dtime, execute: {
let count = self.content.count
for i in count+1...count+5 {
self.content.append(String(i))
for index in count+1...count+5 {
self.content.append(String(index))
self.tableView.reloadData()
}
self.tableView.refreshFooter?.endRefreshing()
Expand Down
8 changes: 4 additions & 4 deletions RefreshDemo/UIViewControllerDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class UIViewControllerDemo: UIViewController {
let minseconds = 3 * Double(NSEC_PER_SEC)
let dtime = DispatchTime.now() + Double(Int64(minseconds)) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: dtime, execute: {
for i in 0...20 {
self.array.append(String(i))
for index in 0...20 {
self.array.append(String(index))
}
self.tableView.refreshHeader?.endRefreshing()
self.tableView.reloadData()
Expand All @@ -59,8 +59,8 @@ class UIViewControllerDemo: UIViewController {
let dtime = DispatchTime.now() + Double(Int64(minseconds)) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: dtime, execute: {
let count = self.array.count
for i in count+1...count+5 {
self.array.append(String(i))
for index in count+1...count+5 {
self.array.append(String(index))
self.tableView.reloadData()
}
self.tableView.refreshFooter?.endRefreshing()
Expand Down
6 changes: 5 additions & 1 deletion RefreshView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
C40F22F61C6331EE00F075CF /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = ZouLiangming;
TargetAttributes = {
C40F22FE1C6331EE00F075CF = {
Expand Down Expand Up @@ -220,12 +220,14 @@
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;
Expand Down Expand Up @@ -278,12 +280,14 @@
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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -37,7 +36,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
8 changes: 8 additions & 0 deletions RefreshView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
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>
8 changes: 4 additions & 4 deletions RefreshView/CustomRefreshFooterView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ open class CustomRefreshFooterView: CustomRefreshView {
}
}

override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
if !isUserInteractionEnabled {
return
}
Expand All @@ -192,7 +192,7 @@ open class CustomRefreshFooterView: CustomRefreshView {
}
}

fileprivate func scrollViewContentOffsetDidChange(_ change: [NSKeyValueChangeKey : Any]?) {
fileprivate func scrollViewContentOffsetDidChange(_ change: [NSKeyValueChangeKey: Any]?) {
if state != .idle || !isAutomaticallyRefresh || originY == 0 || cellsCount() == 0 || !isShowLoadingView {
return
}
Expand All @@ -211,11 +211,11 @@ open class CustomRefreshFooterView: CustomRefreshView {
}
}

fileprivate func scrollViewContentSizeDidChange(_ change: [NSKeyValueChangeKey : Any]?) {
fileprivate func scrollViewContentSizeDidChange(_ change: [NSKeyValueChangeKey: Any]?) {
originY = scrollView!.contentHeight
}

fileprivate func scrollViewPanStateDidChange(_ chnage: [NSKeyValueChangeKey : Any]?) {
fileprivate func scrollViewPanStateDidChange(_ chnage: [NSKeyValueChangeKey: Any]?) {
if state != .idle || cellsCount() == 0 || !isShowLoadingView {
return
}
Expand Down
5 changes: 3 additions & 2 deletions RefreshView/CustomRefreshHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ open class CustomRefreshHeaderView: CustomRefreshView {
}
}

override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
if !isUserInteractionEnabled || isHidden {
return
}
Expand All @@ -154,6 +154,7 @@ open class CustomRefreshHeaderView: CustomRefreshView {
}
}

// swiftlint:disable identifier_name
fileprivate func changeCircleLayer(to value: CGFloat) {
let startAngle = kPai/2
let endAngle = kPai/2+2*kPai*CGFloat(value)
Expand All @@ -179,7 +180,7 @@ open class CustomRefreshHeaderView: CustomRefreshView {
}
}

fileprivate func scrollViewContentOffsetDidChange(_ change: [NSKeyValueChangeKey : Any]?) {
fileprivate func scrollViewContentOffsetDidChange(_ change: [NSKeyValueChangeKey: Any]?) {
if state == .refreshing {
if window != nil {
var insetT = -scrollView!.offsetY > scrollViewOriginalInset!.top ? -scrollView!.offsetY : scrollViewOriginalInset!.top
Expand Down

0 comments on commit e690422

Please sign in to comment.