摘要:
cocos2dx 3.x UI之Button的初使用 1 Button使用的先决条件
在cocos2dx 3.x 在中使用Button,需要包含头文件 include "cocos ext.h" 同时使用命名空间 UI using namespace ui; 2 Button的使用 B... 阅读全文
摘要:
获取当前显示屏幕某一点的颜色1、 获取当前屏幕的截图-(UIImage *)fullScreenshots{ UIWindow *screenWindow = [[UIApplication sharedApplication] keyWindow]; UIGraphic... 阅读全文
摘要:
UITableViewCell 的Separator 间隔线,在iOS7之前它是满屏的,也就是等于width,而在iOS7开始之后,缩进了大约15像素,而在iOS7的时候增加了一个属性:@property (nonatomic) UIEdgeInsets ... 阅读全文
摘要:
访问栈和堆对象成员 你已经了解到,C++中既可以在栈上也可以在堆上创建对象。然而,这两种方法还有一点微妙但是很重要的区别,即访问成员变量和成员函数的方式稍有不同。使用栈对象时,你需要点运算符(.);使用堆对象时,你需要使用箭头操作符(->)。如下:Person stackPerson... 阅读全文
摘要:
在XCode7中 pin消失了,怎么办? 通过搜索得到http://stackoverflow.com/questions/28766210/autolayout-add-constraint-to-superview-and-not-top-layout-guide 在约束输入框右... 阅读全文
摘要:
- (void)drawRect:(CGRect)rect { // Drawing code // 绘制坐标轴 [self drawAxic]; // 绘制曲线 [self drawCurve];}- (void) drawCurve { CGC... 阅读全文
摘要:
生成方法如下:+(NSInteger)getRandomNumber:(NSInteger)from to:(NSInteger)to{ //eg:[1,10) 包含 1,不包含10; return (NSInteger)(from + (arc4random() % (... 阅读全文
摘要:
集合(NSSet)和数组(NSArray)有相似之处,都是存储不同的对象的地址; 不过NSArray,NSDictionary是有序的集合,NSSet是无序的集合。(有序存储:在内存中的存储位置连续) 集合是一种哈希表,运用散列算法,查找集合中的元素比数组速度更快,但是它没有顺序。N... 阅读全文
摘要:
下载下来 Genymotion eclipse插件 并复制到eclipse插件文件夹,点击eclipse 上的 Genymotion 模拟器图标,eclipse打印错误,如下:Loading Genymotion libraryGenymotion directory: C:... 阅读全文
摘要:
正则表达式提取电话号码方法:+ (NSArray *) getPhoneNumbersFromString:(NSString *) str { NSError* error = nil; NSString* regulaStr = @"(([0-9]{11})|((40... 阅读全文