ios - UILabel Animation in a Function Returning UIImageView -



ios - UILabel Animation in a Function Returning UIImageView -

i having problem animating uilabels in ios. used thread reference (ios - animate motion of label or image), doesn't seem work me. i've tried several others, , don't work.

i want smoothly move label location in set amount of time (by smoothly mean no jumps). however, when tested it, labels not move. here code. i've shortened think problem. because besides animation works.

- (uiimageview *)createimagewithtransitionto:(nsmutablearray *) nextpois { //imageview uiimageview homecoming value of function imageview = [[uiimageview alloc] initwithimage:[uiimage imagenamed@"blank1.gif"]]; //initialize label , manipulate needs uilabel * label = /.../; //create animation [uiview animatewithduration:1.0 animations:^{ label.frame = nextlabelframe; //nextlabelframe cgrect }]; [imageview addsubview:label]; homecoming imageview; }

my intuition tells me it's because animation uiview , adding label sub-view uiimageview object (i.e. imageview). however, i've tried [uiimageview animatewithduration ..]. because i'm using in function outside of view controller? how can prepare it?

i sure doing great. in point of view, need alter code. reposting piece of code slight change. (pardon me , if wrong)

- (uiimageview *)createimagewithtransitionto:(nsmutablearray *) nextpois

{ //imageview uiimageview homecoming value of function imageview = [[uiimageview alloc] initwithimage:[uiimage imagenamed@"blank1.gif"]];

//initialize label , manipulate needs uilabel * label = /.../;

//add label before animating

[imageview addsubview:label]; //create animation [uiview animatewithduration:1.0 animations:^{ label.frame = nextlabelframe; //nextlabelframe cgrect }]; homecoming imageview;

}

ios objective-c animation uiimageview uilabel

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -