ios - Unable to add the SKNode image buttons inside a scrollable layout in Swift spritekit -
hi i'm totally new swift , spritekit , having trouble setting buttons sample below inside scrollable view or layout (if there such thing in spritekit). have experience in android development , want know if there way add sknode buttons inside scrollable android's scrollview? want add sknodes vertically in scrollable. example, how set sklabels or sknode images scollable ? sorry poor english.
scorelabel.fontsize = 15 scorelabel.position = cgpoint(x: self.size.width * 0.5 , y: (self.size.height * 0.5) + 100) scorelabel.zposition = 2 scorelabel.fontcolor = uicolor.whitecolor() //titlelabel.color = uicolor.blackcolor() self.addchild(scorelabel) startlabel.name = "hard" startlabel.text = "hard" startlabel.fontsize = 30 startlabel.position = cgpoint(x: self.size.width * 0.5, y: 300) startlabel.zposition = 2 startlabel.fontcolor = uicolor.whitecolor() self.addchild(startlabel) startlabel2.name = "previousbutton" startlabel2.text = "normal" startlabel2.fontsize = 30 startlabel2.position = cgpoint(x: self.size.width * 0.5, y: 250) startlabel2.zposition = 2 startlabel2.fontcolor = uicolor.whitecolor() self.addchild(startlabel2)
you can mixup sprite kit , uikit situation uicollectionview best add uicollectionview subview , pass data uicollectionview example images , text remember uicollectionview part of uikit sknode can't added uicollectionview can add view subview sprite kit skscene more information read
https://developer.apple.com/library/ios/documentation/uikit/reference/uikit_framework/
https://developer.apple.com/library/ios/samplecode/collectionview-simple/introduction/intro.html
Comments
Post a Comment