Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

iphone - How can I add an image to the back of a CALayer after rotate 90 degrees? -


i want add image calayer when rotation transform degree higher 90.

it flipboard flip animation.

this current code:

 calayer *layer = self.view.layer;   int frames = 130;   layer.anchorpoint = cgpointmake(0, 0.5);   catransform3d transform = catransform3didentity;  transform.m34 = 1.0 / -2000.0;  transform = catransform3drotate(transform, -frames * m_pi / 180.0, 0.0, 1.0, 0.0);   self.view.layer.transform = transform;   cakeyframeanimation *pivot = [cakeyframeanimation animationwithkeypath:@"transform"];   nsmutablearray *values = [[nsmutablearray alloc] initwithcapacity:45];  nsmutablearray *times = [[nsmutablearray alloc] initwithcapacity:45];   (int = 0; < frames; i++) {    catransform3d transform = catransform3didentity;   transform.m34 = 1.0 / -2000.0;   transform = catransform3drotate(transform, -m_pi / 180.0 * i, 0.0, 1.0, 0.0);    [values addobject:[nsvalue valuewithcatransform3d:transform]];   [times addobject:[nsnumber numberwithfloat:(float)i / (frames - 1)]];  }   pivot.values = values;  pivot.keytimes = times;   [values release];  [times release];   pivot.duration = 0.5f;  pivot.calculationmode = kcaanimationlinear;   [layer addanimation: pivot forkey: @"pivot"]; 

could tell me how add image flip effect.

alt text

as far know, easiest way add 2 sublayers representing front side , side of page. set both sublayers' doublesided property no. set side layer transform same flipped transform you're animating to. then, when page's front side faces viewer, front side layer visible , side layer "hidden", , vice versa.

see geekgameboard source code (card.m) sample of technique.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -