iCulture forum | iPhone, iPad,  iPod touch, Apple TV en iOS

iCulture forum | iPhone, iPad, iPod touch, Apple TV en iOS (https://forum.iculture.nl/)
-   Ontwikkelen voor iOS (https://forum.iculture.nl/f133/development/f58/ontwikkelen-voor-ios/)
-   -   Error: expected identifier or '(' (https://forum.iculture.nl/f133/development/f58/ontwikkelen-voor-ios/163811-error-expected-identifier-or.html)

techchunky 13-04-15 16:55

Error: expected identifier or '('
 
Als ik deze code wil plaatsen om te checken of healthkit aanwezig is krijg ik Error: expected identifier or '('

if(NSClassFromString(@"HKHealthStore") && [HKHealthStore isHealthDataAvailable]){

}

XIII 13-04-15 17:32

Zet eens haakjes om de volledige guard (boolean conditie) van het if statement?

techchunky 13-04-15 23:24

Gefixed
 
Ik had hem niet in de viewdidload functie gezet :P
door hem daarin te zetten doet hij het natuurlijk :D

XIII 14-04-15 09:41

Ah, dat was zonder context niet te zien.

En ik had zelf de haakjes in jouw voorbeeld fout gelezen... :O


Alle tijden zijn GMT +2. Het is nu 06:45.