objective c - how to make objects appear from one side when I rotate them in iOS ? (code + gif ) inside -


how make objects appear (one side only), when rotate them in ios ?

what want happen, (as can see can add face uitableview cell)

enter image description here

what happening, can't add face since previous 1 showing again

enter image description here

the code i'm using

func animate() {     var id = catransform3didentity     id.m34 =  -1.0 / 1000      var transformanim            = cakeyframeanimation(keypath:"transform")     transformanim.values         = [         nsvalue(catransform3d: catransform3drotate(id, 0 * cgfloat(-m_pi_2), 0, 1.0, 0)),         nsvalue(catransform3d: catransform3drotate(id, 1 * cgfloat(-m_pi_2), 0, 1.0, 0)),         nsvalue(catransform3d: catransform3drotate(id, 0 * cgfloat(-m_pi_2), 0, 1.0, 0))     ]     transformanim.keytimes       = [0, 0.5, 1.0]     transformanim.duration       = 0.7      self.imageviewlogo.layoutifneeded()      self.imageviewlogo.layer.addanimation(transformanim, forkey: "transform") } 

if know feature called [force 2 sided] in 3ds max example, want turned of here, seems ios has no feature this.

  • this advanced question, wish expert answers me.

thanks.

edit

if still not sure i'm asking, mean :

how make object show 1 side when rotate ?

that standard flip transition. take @ uiview method +transitionfromview:toview:duration:options:completion:, uiviewanimationoptiontransitionflipfromleft , uiviewanimationoptiontransitionflipfromright settings.

there view controller transition if want flip transition different view controller.

if want build animation it's more work.

what have create 2 separate animations, 1 front face , 1 face:

first, animate front face rotating 90 degrees, @ point disappears because viewing edge-on. @ point add half view/layer, facing other way. in second animation rotate new view 90 degrees, leaves flat , face-up. it's possible seamless animation gives effect want, it's difficult, fussy code write.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -