Skip to content

Commit ba66c50

Browse files
RicardoBarrosoflovilmart
authored andcommitted
Fix/update sample code on "Saving Objects" section from iOS Guide documentation (#459)
* Update errors.mdown * Fixed Swift syntax on sample code for PFObject "saveInBackground" calls.
1 parent 466e7e0 commit ba66c50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_includes/ios/objects.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ var gameScore = PFObject(className:"GameScore")
3737
gameScore["score"] = 1337
3838
gameScore["playerName"] = "Sean Plott"
3939
gameScore["cheatMode"] = false
40-
gameScore.saveInBackgroundWithBlock {
41-
(success: Bool, error: NSError?) -> Void in
40+
gameScore.saveInBackground {
41+
(success: Bool, error: Error?) in
4242
if (success) {
4343
// The object has been saved.
4444
} else {
@@ -298,8 +298,8 @@ To help with storing counter-type data, Parse provides methods that atomically i
298298

299299
<pre><code class="swift">
300300
gameScore.incrementKey("score")
301-
gameScore.saveInBackgroundWithBlock {
302-
(success: Bool, error: NSError?) -> Void in
301+
gameScore.saveInBackground {
302+
(success: Bool, error: Error?) in
303303
if (success) {
304304
// The score key has been incremented
305305
} else {

0 commit comments

Comments
 (0)