Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
77094658
Commit
77094658
authored
Sep 12, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: fixed issue where Xcode 8 GM updated @escaping behaviour issue-514
parent
42b26c64
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
13 deletions
+13
-13
Sources/iOS/Animation.swift
+1
-1
Sources/iOS/Material+UIImage.swift
+2
-2
Sources/iOS/PageTabBarController.swift
+1
-1
Sources/iOS/PhotoLibrary.swift
+0
-0
Sources/iOS/Reminders.swift
+5
-5
Sources/iOS/Snackbar.swift
+1
-1
Sources/iOS/SnackbarController.swift
+1
-1
Sources/iOS/TabBar.swift
+2
-2
No files found.
Sources/iOS/Animation.swift
View file @
77094658
...
...
@@ -126,7 +126,7 @@ public struct Animation {
/**
:name: animateWithDelay
*/
public
static
func
animateWithDelay
(
delay
d
:
CFTimeInterval
,
duration
:
CFTimeInterval
,
animations
:
(()
->
Void
),
completion
:
(()
->
Void
)?
=
nil
)
{
public
static
func
animateWithDelay
(
delay
d
:
CFTimeInterval
,
duration
:
CFTimeInterval
,
animations
:
@escaping
(()
->
Void
),
completion
:
(()
->
Void
)?
=
nil
)
{
_
=
delay
(
time
:
d
)
{
animateWithDuration
(
duration
:
duration
,
animations
:
animations
,
completion
:
completion
)
}
...
...
Sources/iOS/Material+UIImage.swift
View file @
77094658
...
...
@@ -185,8 +185,8 @@ extension UIImage {
- Parameter completion: A completion block that is executed once the image
has been retrieved.
*/
open
class
func
contentsOfURL
(
url
:
URL
,
completion
:
((
UIImage
?,
Error
?)
->
Void
))
{
URLSession
.
shared
.
dataTask
(
with
:
URLRequest
(
url
:
url
))
{
(
data
:
Data
?,
response
:
URLResponse
?,
error
:
Error
?)
in
open
class
func
contentsOfURL
(
url
:
URL
,
completion
:
@escaping
((
UIImage
?,
Error
?)
->
Void
))
{
URLSession
.
shared
.
dataTask
(
with
:
URLRequest
(
url
:
url
))
{
[
completion
=
completion
]
(
data
:
Data
?,
response
:
URLResponse
?,
error
:
Error
?)
in
DispatchQueue
.
main
.
async
{
if
let
v
=
error
{
completion
(
nil
,
v
)
...
...
Sources/iOS/PageTabBarController.swift
View file @
77094658
...
...
@@ -173,7 +173,7 @@ open class PageTabBarController: RootController {
- Parameter animated: A boolean indicating to include animation.
- Parameter completion: An optional completion block.
*/
open
func
setViewControllers
(
_
viewControllers
:
[
UIViewController
],
direction
:
UIPageViewControllerNavigationDirection
,
animated
:
Bool
,
completion
:
(
@escaping
(
Bool
)
->
Void
)?
=
nil
)
{
open
func
setViewControllers
(
_
viewControllers
:
[
UIViewController
],
direction
:
UIPageViewControllerNavigationDirection
,
animated
:
Bool
,
completion
:
((
Bool
)
->
Void
)?
=
nil
)
{
pageViewController
?
.
setViewControllers
(
viewControllers
,
direction
:
direction
,
animated
:
animated
,
completion
:
completion
)
preparePageTabBarItems
()
}
...
...
Sources/iOS/PhotoLibrary.swift
View file @
77094658
This diff is collapsed.
Click to expand it.
Sources/iOS/Reminders.swift
View file @
77094658
...
...
@@ -108,7 +108,7 @@ open class Reminders: NSObject {
/// A reference to a RemindersDelegate.
open
weak
var
delegate
:
RemindersDelegate
?
open
func
requestAuthorization
(
_
completion
:
(
@escaping
(
RemindersAuthorizationStatus
)
->
Void
)?
=
nil
)
{
open
func
requestAuthorization
(
_
completion
:
((
RemindersAuthorizationStatus
)
->
Void
)?
=
nil
)
{
eventStore
.
requestAccess
(
to
:
.
reminder
)
{
[
weak
self
,
completion
=
completion
]
(
permission
,
_
)
in
DispatchQueue
.
main
.
async
{
[
weak
self
,
completion
=
completion
]
in
guard
let
s
=
self
else
{
...
...
@@ -136,7 +136,7 @@ extension Reminders {
- Parameter list title: the name of the list
- Parameter completion: optional completion call back
*/
public
func
create
(
list
title
:
String
,
completion
:
(
@escaping
(
Bool
,
Error
?)
->
Void
)?
=
nil
)
{
public
func
create
(
list
title
:
String
,
completion
:
((
Bool
,
Error
?)
->
Void
)?
=
nil
)
{
DispatchQueue
.
global
(
qos
:
.
default
)
.
async
{
[
weak
self
,
completion
=
completion
]
in
guard
let
s
=
self
else
{
return
...
...
@@ -176,7 +176,7 @@ extension Reminders {
- Parameter list identifier: the name of the list
- Parameter completion: optional completion call back
*/
public
func
delete
(
list
identifier
:
String
,
completion
:
(
@escaping
(
Bool
,
Error
?)
->
Void
)?
=
nil
)
{
public
func
delete
(
list
identifier
:
String
,
completion
:
((
Bool
,
Error
?)
->
Void
)?
=
nil
)
{
DispatchQueue
.
global
(
qos
:
.
default
)
.
async
{
[
weak
self
,
completion
=
completion
]
in
guard
let
s
=
self
else
{
return
...
...
@@ -242,7 +242,7 @@ extension Reminders {
if the list does not exist it will be added to the default reminders list.
- Parameter completion: optional completion call back
*/
public
func
create
(
title
:
String
,
dateComponents
:
DateComponents
,
in
list
:
EKCalendar
?
=
nil
,
completion
:
(
@escaping
(
Error
?)
->
Void
)?
=
nil
)
{
public
func
create
(
title
:
String
,
dateComponents
:
DateComponents
,
in
list
:
EKCalendar
?
=
nil
,
completion
:
((
Error
?)
->
Void
)?
=
nil
)
{
var
reminderCal
=
[
EKCalendar
]()
if
list
!=
nil
{
...
...
@@ -289,7 +289,7 @@ extension Reminders {
if the list does not exist it will be added to the default reminders list.
- Parameter completion: optional completion call back
*/
public
func
delete
(
reminder
:
EKReminder
,
completion
:
(
@escaping
(
Error
?)
->
Void
)?
=
nil
)
{
public
func
delete
(
reminder
:
EKReminder
,
completion
:
((
Error
?)
->
Void
)?
=
nil
)
{
var
deleted
:
Bool
=
false
var
error
:
Error
?
do
{
...
...
Sources/iOS/Snackbar.swift
View file @
77094658
...
...
@@ -38,7 +38,7 @@ public enum SnackbarStatus: Int {
open
class
Snackbar
:
BarView
{
/// A convenience property to set the titleLabel text.
public
var
text
:
String
?
{
open
var
text
:
String
?
{
get
{
return
textLabel
.
text
}
...
...
Sources/iOS/SnackbarController.swift
View file @
77094658
...
...
@@ -102,7 +102,7 @@ open class SnackbarController: RootController {
Animates to a SnackbarStatus.
- Parameter status: A SnackbarStatus enum value.
*/
open
func
animate
(
snackbar
status
:
SnackbarStatus
,
delay
:
TimeInterval
=
0
,
animations
:
(
@escaping
(
Snackbar
)
->
Void
)?
=
nil
,
completion
:
(
@escaping
(
Snackbar
)
->
Void
)?
=
nil
)
->
AnimationDelayCancelBlock
{
open
func
animate
(
snackbar
status
:
SnackbarStatus
,
delay
:
TimeInterval
=
0
,
animations
:
(
(
Snackbar
)
->
Void
)?
=
nil
,
completion
:
(
(
Snackbar
)
->
Void
)?
=
nil
)
->
AnimationDelayCancelBlock
{
return
Animation
.
delay
(
time
:
delay
)
{
[
weak
self
,
status
=
status
,
animations
=
animations
,
completion
=
completion
]
in
guard
let
s
=
self
else
{
return
...
...
Sources/iOS/TabBar.swift
View file @
77094658
...
...
@@ -167,7 +167,7 @@ open class TabBar: BarView {
- Parameter at index: An Int.
- Paramater completion: An optional completion block.
*/
open
func
select
(
at
index
:
Int
,
completion
:
(
@escaping
(
UIButton
)
->
Void
)?
=
nil
)
{
open
func
select
(
at
index
:
Int
,
completion
:
((
UIButton
)
->
Void
)?
=
nil
)
{
guard
-
1
<
index
,
index
<
buttons
.
count
else
{
return
}
...
...
@@ -179,7 +179,7 @@ open class TabBar: BarView {
- Parameter to button: A UIButton.
- Paramater completion: An optional completion block.
*/
open
func
animate
(
to
button
:
UIButton
,
completion
:
(
@escaping
(
UIButton
)
->
Void
)?
=
nil
)
{
open
func
animate
(
to
button
:
UIButton
,
completion
:
((
UIButton
)
->
Void
)?
=
nil
)
{
delegate
?
.
tabBarWillSelectButton
?(
tabBar
:
self
,
button
:
button
)
selected
=
button
isAnimating
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment