i'm testing code i've found on tutorial, animated png. code:
code:
- (void)viewdidload { [super viewdidload]; // animazione intro // load images nsarray *imagenames = @[@"1.png", @"2.png", @"3.png", @"4.png", @"5.png", @"6.png", @"7.png", @"8.png", @"9.png", @"10.png", @"11.png", @"12.png", @"13.png", @"14.png", @"15.png", @"16.png"]; nsmutablearray *images = [[nsmutablearray alloc] init]; (int = 0; < imagenames.count; i++) { [images addobject:[uiimage imagenamed:[imagenames objectatindex:i]]]; nslog(@"%d", i); } // normal animation uiimageview *animationimageview = [[uiimageview alloc] initwithframe:cgrectmake(0, 0, 1024, 768)]; animationimageview.animationimages = images; animationimageview.animationduration = 8; animationimageview.animationrepeatcount = 1; animationimageview.image = [animationimageview.animationimages lastobject]; [self.view addsubview:animationimageview]; [animationimageview startanimating]; uistoryboard *sb = [uistoryboard storyboardwithname:@"main" bundle:nil]; uiviewcontroller *vc = [sb instantiateviewcontrollerwithidentifier:@"secondaschermata"]; [[[[uiapplication sharedapplication] delegate] window] setrootviewcontroller:vc]; }
but don't see animation, next view. why? how can fix this?
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
Comments
Post a Comment