Saturday 15 June 2013

ios - xCode 6 centre of image not working -



ios - xCode 6 centre of image not working -

i updated xcode 6 long time ago. when had xcode 5 game working fine, , on ios 7 works fine, on xcode 6 / ios 8 not work. ive got arc4random(), doesn't work - it's meant select random number between 9 , ever number x , y coordinates of image changes - tried using other versions of arc4random(), never worked. i'm confused because select random number, , run switch statement correctly, coordinates of image not change?? arc4random() or .center not work on ios 8 / xcode 6?? (i'm using objective-c , not swift)

-(ibaction)button:(id)sender { int place = arc4random() % 9; nslog(@"the number is: %i", place); switch(place) { case 0: nslog(@"one selected"): image.center = cgpointmake(10,10); break; case 1: image.center = cgpointmake(20,20); nslog(@"two selected"); break; etc... }

could there's confusion naming? happens if alter name of uiimageview object image else doesn't have same name method?

ios objective-c iphone

No comments:

Post a Comment