swift firebase retrieving data error -


my if not working

    feelingref.child("conditions/needsattention").observeeventtype(.value) { (snap: firdatasnapshot) in             print((snap.value?.description)!)             if (snap.value?.description)! == 1 {                 self.conditionlabel.text = "관심필요"             }         } 

when print snap's value prints 1 if not working!!!

it can string type check dynamictype of variable

print(snap.value!.description.dynamictype)  if (snap.value!.description)! == "1" {                 self.conditionlabel.text = "관심필요" } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -