ios - Error when load images like gif in uiimageview -


i want load images gif. work when go viewcontroller push segue when go viewcontroller modal segue not load images in imageview.

_ivdummy.animationimages = [nsmutablearray arraywithobjects:                                          [uiimage imagenamed:@"1.png"],                                          [uiimage imagenamed:@"2.png"],                                          [uiimage imagenamed:@"3.png"],                                          [uiimage imagenamed:@"4.png"],                                          [uiimage imagenamed:@"5.png"],                                          [uiimage imagenamed:@"6.png"],                                          [uiimage imagenamed:@"7.png"],                                          [uiimage imagenamed:@"8.png"],                                          nil];     [_ivdummy setbackgroundcolor:[uicolor redcolor]];      _ivdummy.animationduration = 1.0f;     _ivdummy.animationrepeatcount = infinity;     [_ivdummy startanimating]; 

please, me.

in progress hud

[indicator removefromsuperview];         uiimageview* animatedimageview = [[uiimageview alloc] initwithframe:cgrectmake(0.0f, 0.0f, 45.0f, 45.0f)];         animatedimageview.animationimages = [nsmutablearray arraywithobjects:                                                [uiimage imagenamed:@"1.png"],                                                [uiimage imagenamed:@"2.png"],                                                [uiimage imagenamed:@"3.png"],                                                [uiimage imagenamed:@"4.png"],                                                [uiimage imagenamed:@"5.png"],                                                [uiimage imagenamed:@"6.png"],                                                [uiimage imagenamed:@"7.png"],                                                [uiimage imagenamed:@"8.png"],                                                nil];         //[animatedimageview setbackgroundcolor:[uicolor redcolor]];          animatedimageview.animationduration = 1.0f;         animatedimageview.animationrepeatcount = infinity;         [animatedimageview startanimating];         indicator=animatedimageview;         [self addsubview:indicator]; 

instead of using
- (void)viewdidload method try using
- (void)viewwillappear:(bool)animated

-(void)viewwillappear:(bool)animated {     _ivdummy.animationimages = [nsmutablearray arraywithobjects:                                 [uiimage imagenamed:@"1.png"],                                 [uiimage imagenamed:@"2.png"],                                 [uiimage imagenamed:@"3.png"],                                 [uiimage imagenamed:@"4.png"],                                 [uiimage imagenamed:@"5.png"],                                 [uiimage imagenamed:@"6.png"],                                 [uiimage imagenamed:@"7.png"],                                 [uiimage imagenamed:@"8.png"],                                 nil];     [_ivdummy setbackgroundcolor:[uicolor redcolor]];     _ivdummy.animationduration = 1.0f;     _ivdummy.animationrepeatcount = infinity;     [_ivdummy startanimating]; } 

you can override method perform custom tasks associated displaying view.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -