Questions tagged [completion]
250 questions
-1
votes
1 answer
Swift: completion handler after network request
I know, there are lots of similar threads regarding asynchronous functions and completion handlers in Swift... But after reading quite a lot of them, I still can't figure out how to process the responded data of a network request and save certain…

alju2404
- 31
- 5
-1
votes
1 answer
Swift Closure Completion Handler
I have a function right now that is determining the hide behavior of a UILabel: func shouldHideLabel() -> Bool.
I need to retrieve data from a web request to determine whether or not to hide this label, so inside of shouldHideLabel() I'm making a…

Logan
- 1,172
- 9
- 23
-1
votes
3 answers
Store Variable inside Completion handler IOS Swift
I am trying to store the local player score in pScore but after the block the variable always equals 0, How can i store the "localPlayerScore!.value" into pScore:Int.
let leaderBoardRequest = GKLeaderboard()
leaderBoardRequest.identifier =…

uk_rules_ok
- 29
- 4
-1
votes
1 answer
Bash function that returns matches for *a*/*b*/*c*/*d* based on input of a/b/c/d?
Basically, I'd like to write a bash script or function where given an input of a/b/c/d, it would return all matches where each path component had wildcards at the start and end, e.g. *a*/*b*/*c*/*d*. It would be nice to respect the tilde (~) as home…
user1002430
-1
votes
2 answers
How to reregister for IO Completion ports for a handle
I have a Windows named pipe that I create with CreateFile (the server side was created using CreateNamedPipe). I use IO completion ports to read/write data asynchronously on both ends.
I need to send these handles to other processes after they've…

John S
- 19
- 2
-1
votes
2 answers
Setting check box to lock after a certain event.
So I am new to coding and am just trying to make a simple background project for something a friend and I thought up. I am using HTML for this just to start.
I want to make a list of checkboxes with the fifty states and a progress bar. Now as you…

Kaxwell
- 1
-1
votes
1 answer
ssh with command loses tab-completion
I have a handy alias as follows:
sshpass -p "the_password" ssh -o StrictHostKeyChecking=no root@192.168.0.123
That will give me a quick way to login to a remote device, and get a command prompt which has tab completion.
But the first thing I then…

Nick
- 191
- 2
- 13
-1
votes
2 answers
How do I support/add a completion handler to my asynchronous method?
I am following this answer to test an asynchronous method I defined in a class. However I am unable to add a completion handler defintion to it. Any help?
I got a method defined as following:
//.h
- (void)loadData;
//.m
- (void)loadData{
…

mm24
- 9,280
- 12
- 75
- 170
-2
votes
1 answer
Why does the completion handler does not return anything?
So, I have a json get request which gets all horse objects of class Horse. This works successfully. I have a completion handler which is supposed to let me use the horses object again in another view where I call the getHorses request but when I try…

Tator
- 125
- 1
- 7
-2
votes
1 answer
How to execute function after animation completion in Swift for WatchKit
I'm trying to create a simple animation in watch kit and i don't find the helpful "completion" that allows to perform a method at the end of the animation.
In the code the updateLabel is executed at the same time of the animation.
Here is the…

Antonio Viscomi
- 227
- 2
- 5
- 15