ios - Add GIF on tabBarItem -


i have uitabbarcontroller, in 1 of tabbaritem needs display gif. tried using 3rd party library display gif. but, gif displayed distorted. because accepts 1x size. there way add gif on single tabbarcontroller. not want use custom tabbarcontroller. here code set gif on tabbaritem

   uitabbaritem *tabbaritematindex2 = [self.tabbarcontroller.tabbar.items objectatindex:2];     [tabbaritematindex2 setimage:[[uiimage imagenamed:@"instanttabbar.png"] imagewithrenderingmode:uiimagerenderingmodealwaysoriginal]];      uitabbaritem *tabbaritem1 = [self.tabbarcontroller.tabbar.items objectatindex:1]; //    uiimage *img = [uiimage imagenamed:nslocalizedstring(@"ijptabbar", nil)];      nsurl *url = [[nsbundle mainbundle] urlforresource:@"instant" withextension:@"gif"];      uiimage *img = [uiimage animatedimagewithanimatedgifdata:[nsdata datawithcontentsofurl:url]];     [tabbaritem1 setimage:img]; 

thanks

i able add gif tabbaritem. used 2x gif , managed edgeinsets of tabbaritem. now, gif not blurry .


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -