SKNode和UITextView、UIColor新认识

SKNode

+ (id)node 初始化。

@property(atomic, copy) NSString *name 节点的命名。

@property(atomic) CGPoint position 节点在父坐标系中的位置。

@property(atomic) CGPoint zPosition 可视深度。默认为0.0。

@property (nonatomic) CGPoint anchorPoint 锚点的位置。默认为(0.5,0.5)。

@property(atomic, retain) NSDictionary *userData 在节点中存储自己的数据。使用之前,需要初始化。

UITextView新增内容后,显示底部内容。

CGFloat x, y;

x = 0;

y = self.textView.contentSize.height - self.textView.frame.size.height;

self.textView.contentOffset = CGPointMake(x, y);

self.textView.layoutManager.allowsNonContiguousLayout = NO;

根据UIColor获取RGB的值 

CGFloat r, g, b, a;

[self.normalColor getRed:&r green:&g blue:&b alpha:&a];

 NSLog(@"UIColor colorWithRed:%f green:%f blue:%f",r,g,b);

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容