Questions tagged [completion]

250 questions
0
votes
0 answers

Empty array after completion handler?

I've created a method which returns an array, but the array gets constructed inside of a completion handler of URLSession.shared.dataTask(with: URL) method. I inserted a url and the data task gets executed fine. I used the debug logger to check up…
Freddy Benson
  • 735
  • 4
  • 11
  • 30
0
votes
1 answer

In swift, how can I wait until a server response is received before I proceed?

I would like to only execute a segue if I get a certain response from the server. In swift, how can I wait until I get a response to continue?
OOProg
  • 189
  • 1
  • 5
  • 16
0
votes
1 answer

Do something on button tap then segue to another view controller

I turned an image into a UIgesturerecognizer so that I can press it like a button. When I press it I want it to segue out, but the next view loads a camera so I'm getting kind of a freeze while it's loading. I can't really run an activity…
Wayne Filkins
  • 494
  • 6
  • 20
0
votes
0 answers

Eclipse - Add Completion For /* Comment

How can I add completion support for the /* */ comment in eclipse? So that it automatically appends */ when I type /*.
user116804
  • 185
  • 2
  • 2
  • 8
0
votes
1 answer

iOS TextView get crash after UIView animation completion block

[UIView animateWithDuration:0.3 delay:0.0f options:UIViewAnimationOptionCurveEaseInOut animations:^{ [viewMain setFrame:CGRectMake(0, 30, 1024, 378)]; } completion:^(BOOL finished){ [txtViewNote…
Solid Line
  • 63
  • 9
0
votes
1 answer

When retrieving data from completion statement variables are returning blank

I'm fairly new to iOS programming and I'm having trouble when using variables from a completion statement. I have included the code below, I'm not sure why when I store the completion variables in a dataType array it seems to only return blank…
0
votes
0 answers

Finishing the completion handler that fetches JSON from web, SWIFT

This is how the code looks like right now: func fetchSalahtimes (){ let url = NSURL(string: "http://irvingmasjid.org/salah2016.php") let request = NSURLRequest(URL: url!) let config =…
Timo Cengiz
  • 3,367
  • 4
  • 23
  • 45
0
votes
1 answer

Swift: How to re-run a function based on the results within a completion block?

This is a rough example (the actual use-case I am working on has to do with the internals of PHImageManager's requestImageForAsset: function), but I'm looking for a pattern that allows you to re-run a function based on the results in the completion…
Jeffrey Berthiaume
  • 4,054
  • 3
  • 35
  • 45
0
votes
0 answers

ref completion in latex suite

When I press f9 at \ref{ in vim with latex suite plugin, I just get an error saying E484: Can't open file C:/Temp/tempfilename.tmp When I went to the location, tempfilename.tmp was not there. I assumed this file is the result of calling…
user44442
  • 103
  • 2
0
votes
1 answer

Suggest with search on multiple index gives "ElasticsearchException[Field [] is not a completion suggest field]"

I have two indices: X and Y I need to search on X index and run suggest on Y. Mapping for Y $config['params']['suggestion']['body']['mappings']['suggester'] = [ 'properties' => [ 'search_id' => [ 'type' => 'string', 'index' =>…
Moghira
  • 317
  • 5
  • 10
0
votes
2 answers

Course Completion is stuck at pending status how ever the student passed all the activites and Quizzes in Moodle

After creating a course and checking that all completion tracking settings are correctly modified in the Course settings and in the Activity settings. And after the student successfully passed the activities and quizzes, the Course Completion status…
0
votes
1 answer

Vim slow down in python mode after I type "=" (equal) or " "(while space).

It seems to happen after I installed YCM. I also have Python-mode plugin installed because I like the lint and "run inside vim" feature, but I turned off "rope". My YCM settings are like below. 31 " Use gcc syntastic checker 30 let…
F. Wang
  • 1
  • 1
0
votes
1 answer

completion handler at alamofire multipart upload request

I have an issue with my func in swift to get the data (JSON) back. I know its the completion handling but I am struggling so maybe someone can help. The code below shows my function. The API needs the json as string in a field. The request itself…
Armin Mandel
  • 117
  • 11
0
votes
0 answers

elastic search suggest type broken by keywords analyzer

CustomAnalyzer productIndexAnalyzer = new CustomAnalyzer { Tokenizer = "standard", Filter = new List { TURKISH_LOWERCASE, "apostrophe", "asciifolding", ENGRAM_FILTER } }; …
hezarfen
  • 25
  • 1
  • 5
0
votes
1 answer

Display / Hiding Activity Indicator View in Completion Handler

I am creating an image filtering app, basically you have the image displayed on the view controller and few different image filters in the bottom; clicking on one will effect the main image brightness (for example). I noticed that applying the…