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
f4f1645c
Unverified
Commit
f4f1645c
authored
Dec 10, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: updated Reminders callback escaping
parent
735947b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
Sources/iOS/Reminders/Reminders.swift
+5
-5
Sources/iOS/RemindersController.swift
+2
-2
No files found.
Sources/iOS/Reminders/Reminders.swift
View file @
f4f1645c
...
...
@@ -109,7 +109,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
{
...
...
@@ -137,7 +137,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
...
...
@@ -177,7 +177,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
...
...
@@ -243,7 +243,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
{
fetchLists
(
completion
:
{
(
calendars
)
in
...
...
@@ -283,7 +283,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/RemindersController.swift
View file @
f4f1645c
...
...
@@ -54,7 +54,7 @@ open class RemindersController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepare
View
()
prepare
()
}
/**
...
...
@@ -67,7 +67,7 @@ open class RemindersController: UIViewController {
open
func
prepare
()
{
view
.
clipsToBounds
=
true
view
.
backgroundColor
=
Color
.
white
view
.
contentScaleFactor
=
Device
.
scale
view
.
contentScaleFactor
=
Screen
.
scale
prepareReminders
()
}
}
...
...
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