cocos2d-x中uilabel怎么设置对齐方式

cocos2d-x中uilabel怎么设置对齐方式


holdtom
浏览 738回答 2
2回答

牛魔王的故事

基本上ios中用到文字的空间都有属性来控制文本对其的方式的,其中UILabel的对其方式是label1.textAlignment = UITextAlignmentCenter;文本对齐方式有以下三种typedef enum {UITextAlignmentLeft = 0,左对齐UITextAlignmentCenter,居中对齐UITextAlignmentRight, 右对齐} UITextAlignment;按钮对其的方式是:button.titleLabel.textAlignment = NSTextAlignmentCenter;typedef enum {UITextAlignmentLeft = 0,左对齐UITextAlignmentCenter,居中对齐UITextAlignmentRight, 右对齐} UITextAlignment;
打开App,查看更多内容
随时随地看视频慕课网APP