ios - CATextLayer in SCNBox shows in portrait mode -


i trying write text onto scnbox node. see text in box text orientation portrait. how make landscape?

screenshot

calayer *layer = [calayer new];  [layer setframe:cgrectmake(0, 0, 100, 100)];  [layer setbackgroundcolor:[uicolor redcolor].cgcolor];  catextlayer *textlayer = [catextlayer new]; [textlayer setframe:[layer bounds]]; [textlayer setfontsize:24]; [textlayer setstring:@"test"]; [textlayer setalignmentmode:kcaalignmentleft]; [textlayer setforegroundcolor:[uicolor blackcolor].cgcolor]; [textlayer display]; [layer addsublayer:textlayer];  scnbox *box = [scnbox boxwithwidth:1 height:2 length:0.005 chamferradius:0.0]; [[[box firstmaterial] diffuse] setcontents:layer]; // [[[box firstmaterial] diffuse] setcontents:[uicolor redcolor]];  [[box firstmaterial] setlightingmodelname:scnlightingmodelconstant];  [[box firstmaterial] setdoublesided:yes];  scnnode *node = [scnnode nodewithgeometry:box]; 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -